Skip to main content

Questions tagged [probability]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
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 ...
Killian's user avatar
  • 101
4 votes
2 answers
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 ...
ireth92's user avatar
  • 81
1 vote
2 answers
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 ...
user2108462's user avatar
1 vote
0 answers
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 ...
Josh Laird's user avatar
1 vote
1 answer
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, ...
suburb1a's user avatar
1 vote
1 answer
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, ...
Bill's user avatar
  • 11
1 vote
1 answer
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 ...
Josh M's user avatar
  • 11
0 votes
1 answer
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. ...
SomeTypeFoo's user avatar
2 votes
1 answer
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 ...
ManoTech's user avatar
  • 147
5 votes
0 answers
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 ...
MSD's user avatar
  • 51
3 votes
2 answers
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 ...
wondra's user avatar
  • 4,930
1 vote
2 answers
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 ...
Ultroman the Tacoman's user avatar
1 vote
1 answer
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 ...
Stubbs's user avatar
  • 11
3 votes
1 answer
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 ...
Mr. C's user avatar
  • 33
1 vote
5 answers
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 ...
Javasamurai's user avatar
1 vote
1 answer
303 views

PUZZLE MAZE using probability - HOW TO [closed]

is there an easier way to do this? perhaps a formula?
Leonzo Escolar's user avatar
2 votes
1 answer
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 ...
rafvasq's user avatar
  • 123
0 votes
1 answer
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 ...
James Simpson's user avatar
3 votes
2 answers
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 ...
Piomicron's user avatar
  • 279
2 votes
3 answers
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 ...
Octopus's user avatar
  • 269
17 votes
3 answers
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 ...
Tasos's user avatar
  • 571
34 votes
12 answers
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: ...
Standard's user avatar
  • 485
15 votes
3 answers
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 ...
user avatar
2 votes
4 answers
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 ...
sdgfsdh's user avatar
  • 295
0 votes
3 answers
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/...
jokoon's user avatar
  • 5,253
0 votes
2 answers
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 ...
Lewis's user avatar
  • 511
9 votes
7 answers
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 ...
Lai Yu-Hsuan's user avatar
3 votes
4 answers
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 ...
Komal Sharma's user avatar
3 votes
3 answers
545 views

Generate slot combinations

How do you generate combinations in slots to achieve a wanted probability of the user winning? Say, you decide that he should win $200. How do you generate combinations that'll cause winnings ...
user1437328's user avatar
4 votes
1 answer
238 views

Estimating players' odds of winning in a fighting game

I'm creating a fighting game where two opponents face off against each other in the ring. While I've been able to figure out the odds of a player winning based on previous wins/losses, I have yet to ...
thinkfuture's user avatar