# Questions tagged [probability]

The tag has no usage guidance.

30 questions
Filter by
Sorted by
Tagged with
109 views

### How "Dodge" characteristic is calculated on enemy troops

I was torn about whether to post this as a game problem or as a maths problem. My maths is a little shaky, so thought maybe best to post here. The game, for anyone who is familiar with it, is War and ...
• 101
877 views

### How to calculate Chance of Success in a turn-based battle with chance to hit and damage roll + damage modifier?

I'm coding a choice-driven role-playing game and I want to give the player a percentage of his success chance in winning a battle before he chooses to start it. However, I have no clue how to make ...
• 81
1 vote
169 views

### Methods for generating unevenly distributed item stats?

Conceptually, generating item stats is the same as placing balls into buckets. An even distribution of 50 balls into 5 buckets looks like this: [10,10,10,10,10] whereas an uneven distribution might ...
• 635
1 vote
148 views

### Attack/Defence formula: ensure defender wins a certain percentage of the time

I have two simple stats for my attack formula, attack and defence. I was reading through this answer which made it seem like ...
• 111
1 vote
3k views

### How to generate boards for a game like GamePigeon's Word Hunt?

Naively, I would assume that there's an even probability of any of the 26 given letters appearing in a tile and that each tile is generated independently. After playing around a hundred times, though, ...
• 13
1 vote
135 views

### RNG random numbers/preset payout rate contradiction

Taking a casino slot machine for example: How can the probability of a payout TRULY be random with a preset payout rate? If a casino has slots programmed to a specific rate or percentage of payout, ...
• 11
1 vote
215 views

### Calculating probabilities for a custom drop table system

I have a "drop table" / "loot table" / "item table" / "whatever you want to call it" system and I need to solve two Problems. Apologies in advance for the text ...
• 11
94 views

### Preferred way of calculating run chances in Game of Cricket

For modelling a simple game of cricket, Considering a batsman has a single attribute rating. I can go about deciding run chances by weighted probabilities. ...
4k views

### How to make MathNet.Numerics work with Unity?

I have installed the latest version of MathNet on Visual Studio using the NuGet Package Manager. I've also, copied the MathNet.Numerics.dll to an Plugins folder in ...
• 147
95 views

### Slot Probability Function

Please can someone point me in the right direction. I'm working on a slot game. that I'm having trouble figuring how to implement the probability function for. The game has a set of symbols that bets ...
• 51
362 views

### Pathfinding with non-deterministic transitions between nodes

Consider a map not unlike a board game, where some of the moves are made non-deterministic. For example, moving onto certain cells will require you to roll a dice to determine where you should move ...
• 4,930
1 vote
222 views

### Spawn chance, modulated by probability weighted by progress

I've been struggling with this for over a day now. What seemed a simple task, has just wrecked me. I hope someone here can help me figure out what I'm missing. Please, please help me :) The ...
1 vote
271 views

### How simulate a random distribution?

I'm working on a battle algorithm for a text-based game and I stumble when it comes to randomly distributing attacks on a set of units. E.G, 100 archers shoot 100 targets at the same time. I thought ...
• 11
220 views

### Figuring out damage distribution

My problem - Each round, each of the 5 champions get to strike each of the 99 monsters once; however, their attacks are such that one third of each champion's attacks are ineffective, causing 0 ...
• 33
1 vote
283 views

### How can I select an enemy to act next, biased toward smaller enemies?

Suppose there are X number of enemies in the game. They all have to attack one by one. Each enemy is picked randomly, and can be of Y size. How can we attain biased randomness in such a way that ...
• 145
1 vote
303 views

### PUZZLE MAZE using probability - HOW TO [closed]

is there an easier way to do this? perhaps a formula?
322 views

### Poisson Distribution and Traffic Flow

I'm attempting to create a simulation of car traffic and to model the flow, it seems like Poisson Distribution would be useful here. I'm still trying to get my head around the variables I would ...
• 123
93 views

### Generate random number biased to an input value

I've got enemies with a difficulty rating from 0 to 1. I want to generate a random reward that tends to increase as the difficulty rating rises, but still be possible to have a value anywhere in the ...
309 views

### How do I balance these numbers in a rock-paper-scissors attack system?

I have three arrays of numbers. If you take a random one from x, it will 'win' more times than a random number from z, which will win more times than a number from y, which will win more times than a ...
• 279
162 views

### Spawn rates and variable time steps

How would I work a spawning algorithm into a sim engine with variable time steps? If each engine step is, say, 1/30 of a second and I have some event occur with a 0.001 probability each step, how do ...
• 269
630 views

### How do you handle loss aversion in probability-based games?

The psychological phenomenon of loss aversion refers to how players feel losses twice as powerfully as victories. For example, Bite Fight's PvP is a simulation based on probabilities related on ...
• 571
34k views

### Random number in a range, biased toward the low end of the range [duplicate]

I have an input of two values, let's say 1 and 10. Lesser numbers should overall occur more often in the output than higher numbers, while there is a peak in the probability at #2: ...
• 485
5k views

### Accurately simulating the lots of dice rolls without loops?

OK so if your game rolls lots of dice you can just call a random number generator in a loop. But for any set of dice being rolled often enough you will get a distribution curve/histogram. So my ...
208 views

### How can I achieve a constant drop rate with a variable frame rate?

In my game, I have particles that should spawn at random intervals but with an average rate of x per second. However, the frame-rate varies from around 60 fps all ...
• 295
196 views

### Non equi-probable random function

I was trying to find or make a function which is not equi-probable, meaning some values are less probable than others. Apparently what I want has something to deal with http://en.wikipedia.org/wiki/...
• 5,253
57 views

### Percentages for different platform generation [duplicate]

I have a level manager, which creates levels and levels create platforms. Levels can contain a variety of platforms. I dont really understand how I can say: I want a 10% of one platform being ...
• 511
957 views

### Make a fake random distribution?

Sometimes a "real" random event seems unfair and makes players frustrated. For instance a enemy has probability of 20% to cause double damage("critical hit"). Thus he could make 4 critical hits in a ...
• 311
2k views

### How do I apply different probability factors in an algorithm for a cricket simulation game?

I am trying to write the algorithm for a cricket simulation game which generates runs on each ball between 0 to 6. The run rate or runs generated changes when these factors come into play like skill ...