

I made a neat little probabilty calculator for a game that I am working on, but the results seem kinda strange to me...
I have a bunch of heroes, who roll a number of colored dice in 3 colors. Each success substracts a value from the monsters power, based on the color of the dice it was rolled with.
So for example I have a monster, Dire Wolf, who has a total power of 2. The substract chart is as follows (color of dice):
2 (success with RED DIE) 0 (success with GREEN DIE) 1 (success with BLUE DIE)
(So basicaly, you need to roll a success with either one red die to defeat this monster, or at least two blue dice. Green dice doesn't count here)
I have the following heroes, and in parantheses you can see how many dice of each color they can roll:
Orc Barbarian (2  1  0) Probability of success: 70.3703703704 %
Human Shieldbearer (2  1  1) Probability of success: 68.5185185185 %
Human Cleric (0  0  4) Probability of success: 60.8465608466 %
The strangeness: How come the second hero, the Shieldbearer, who rolls the same kind of dice as the Orc Barbarian, plus an additional blue die, has a lower probability of defeating this monster?
How am I calculating this: It is possible that I have a problem in the calculation of the probabilities. What I am basicaly doing is, calculating the permutation of the available dice, and using this number as the Total Possible Rolls number (TPR), and calculating which TPR results in defeating the monster (DPR). Then from these two values I am calculating the probability (P) as follows:
P=(DPR*100)/TPR
Where is this off? Thanks for the help in advance, and sorry if I bored you with the maths



ekr3peeK wrote: I made a neat little probabilty calculator for a game that I am working on, but the results seem kinda strange to me... I have a bunch of heroes, who roll a number of colored dice in 3 colors. Each success substracts a value from the monsters power, based on the color of the dice it was rolled with. So for example I have a monster, Dire Wolf, who has a total power of 2. The substract chart is as follows (color of dice): 2 (success with RED DIE) 0 (success with GREEN DIE)1 (success with BLUE DIE)(So basicaly, you need to roll a success with either one red die to defeat this monster, or at least two blue dice. Green dice doesn't count here) I have the following heroes, and in parantheses you can see how many dice of each color they can roll: Orc Barbarian ( 2  1  0) Probability of success: 70.3703703704 %Human Shieldbearer ( 2  1  1) Probability of success: 68.5185185185 % Human Cleric ( 2  1  4) Probability of success: 60.8465608466 %The strangeness: How come the second hero, the Shieldbearer, who rolls the same kind of dice as the Orc Barbarian, plus an additional 1 valued blue die, has a lower probability of defeating this monster? How am I calculating this: It is possible that I have a problem in the calculation of the probabilities. What I am basicaly doing is, calculating the permutation of the available dice, and using this number as the Total Possible Rolls number (TPR), and calculating which TPR results in defeating the monster (DPR). Then from these two values I am calculating the probability (P) as follows: P=(DPR*100)/TPRWhere is this off? Thanks for the help in advance, and sorry if I bored you with the maths Well, I can't rerun the calculations without knowing the number of sides on the dice and what you need for success.
But obviously the blue dice can't make success less likely. I fact, if I understand you correctly, it can't contribute either way: you need two 'hits' to have an effect, and there's only one blue dice so it can't add to any others to get a 'hit', so it's completely irrelevant.
I think you're overcomplicating things with permutations etc. I'd completely ignore the dice that have no effect (so the green ones and a singleton blue) and work out what happens with the rest.



The dices that are used are D6, and successes are 5+.
That is exactly what I tought, they are irrelevant in this situation, but the probability of success is still lower somehow. There must be a problem in my calculation somewhere. I will try simplifying the script as you suggested.



Okay, I managed to find the error!
I wasn't initializing the dice in the script, now everything is dandy
Thanks for the help

Evil Brother
Netherlands Enschede

I am wondering whether all is dandy, because:
ekr3peeK wrote: Orc Barbarian (2  1  0) Probability of success: 70.3703703704 % As has been noted only the red dice are interesting in this case. The probability of a success on one red die is 1/3. The probability of failure is thus 2/3. If you throw two red dice, the probability of both failing is 2/3 * 2/3 = 4/9. Them not both failing (means at least 1 success) is thus 5/9 which is approximately 0.55. That is not the 0.70 you are finding.

Richard Irving
United States Salinas California

Quote: Where is this off? Thanks for the help in advance, and sorry if I bored you with the maths
I could not figure exactly how your system works.
I think you were saying that when attack, you roll a certain combination of dice and if the total number of points exceed the defending creature's point level it dies.
But you never said how each type of die is constructed (i.e. how many points are on each side.) Red 0 0 0 0 2 2 (or whatever) So we can't do the calculation ourselves. (Did say they were all D6's)
Also if you are only 5 or fewer dice, you can easily "brute force" every possible roll and figure out the exact odds for every possible roll This is not that difficult. which means you denominator if it is done properly should be evenly divisible by 216 (with 3 dice), 1296 (with 4) and 7776 (with 5).
Your third roll 4 blue dice is not divisible by 1296, there appears an error in that calculation. The first two rolls are divisible by the correct amount (except for rounding error.)but there may be other errors in the calculation.



There were multiple errors in my script, so the values that I included in the original post are all wrong. I've corrected most of them, and right now the numbers look okay, but if any of you would take the time to crosscheck it, I would be really gratefull
http://www.class.ro/blightstone/bestiary/functions/levelcalc...
At this link you can "play" with the script I made. Once again, the numbers look okay to me at the moment, but one could never know
As for explanation on what you see if you access the above webpage: The first few lines are information about the monster, and the minimum amount of dice required to beat it(and the correct combinations that you should roll).
Then comes the monsters stat table, and below that, the different kind of heroes one could have, and the ammount of dice they throw with in each phase(ATT/DEF).
If you need further explanation, just post here, and I'll try harder to explain it
(NOTE: Monsters Attack Power is modified by Heroes Defense Dice, and Monsters Defense Power is modified by Heroes Attack Dice)



rri1 wrote: Quote: Where is this off? Thanks for the help in advance, and sorry if I bored you with the maths I could not figure exactly how your system works. I think you were saying that when attack, you roll a certain combination of dice and if the total number of points exceed the defending creature's point level it dies. But you never said how each type of die is constructed (i.e. how many points are on each side.) Red 0 0 0 0 2 2 (or whatever) So we can't do the calculation ourselves. (Did say they were all D6's) Also if you are only 5 or fewer dice, you can easily "brute force" every possible roll and figure out the exact odds for every possible roll This is not that difficult. which means you denominator if it is done properly should be evenly divisible by 216 (with 3 dice), 1296 (with 4) and 7776 (with 5). Your third roll 4 blue dice is not divisible by 1296, there appears an error in that calculation. The first two rolls are divisible by the correct amount (except for rounding error.)but there may be other errors in the calculation.
The system is fairly simple: Each hero has a number of colored dice they can roll, They are all standard pipped D6's. When a monster attacks a hero, it has a predefined attack value, and the hero either lowers this value to 0 or less by rolling, OR takes damage. The monsters attack value can be lowered by different proportions with each SUCCESS rolled with a colored dice. For example: the Dire Wolf has an Attack Power of 2, and it can be lowered by 2 for each success rolled with a Red Dice or Blue Dice, but it can't be lowered with successes rolled with Green Dice. (Successes are rolls that have a value of 5+).
Hope this clears things up


