Jump to content
  • Advertisement
Sign in to follow this  
Bradley M. Small

Creating Probability Table for Multi-throw dice game

This topic is 2114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having some trouble coming up with a probability table for a game that I wrote.


The game uses 6 dice. The player can throw the dice multiple times, but must retain at least 1 on each throw. In order to complete a game with a score the player must retain one '2' and one '4'. The score is equal to the sum of the other 4 retained dice.


As I understand this to throw a perfect roll (2,4,6,6,6,6) (score of 24) is calculated as 6!/4! which gives me 30 possibilities out of 6^6 (46656). Which should happen ~ 1 in every 1555.2 6 dice throws.


However, because the player can toss all 6 dice and then retain either 1,2,3,4,5  of them and rethrow the rest. The play is much easier than 1 : 1555.


So the first question is, How do I calculate each of the other possible methods as well as other scores besides 24 perfect score.


I started out thinking about breaking down each combination of rolls for example 2 throws. 1,5 ; 2,4; 3,3; 4,2; 5,1

I assumed there are 6 ways to throw 6 dice and retain 1 of them. Then depending on which value was retained there are either 5!/3! (if the one kept was a 6) or 5!/4! (if the one kept was a 2 or a 4).


So if my thinking is correct there are 6 ways to roll a 6, 6 ways to roll a 2 and 6 ways to roll a 4.


Given a 6 then there are 20 ways to roll 6,6,6,2,4

      6 * 20 = 120 ways to roll this pair of two rolls

Given a 4 then there are  5 ways to roll 6,6,6,6,2

      6 * 5 = 30 ways to roll this pair of two rolls

Given a 2 then there are  5 ways to roll 6,6,6,6,4

      6 * 5 = 30 ways to roll this pair of two rolls


This would give me   30 ways to get the score with 1 roll retaining all the dice on a single throw.

This would give me 180 ways to get the score with two rolls retaining 1 die and rethrowing 5 dice.


To take this a step further if the player retains 2 dice from the first toss and rethrows the remaining 4 then:

I have 6 choose 2 (15) ways to throw each of the following:






Given them there are either 4!/2! or 4!/3! or 4!/4! ways to thow the remaining winning throw (depending on the number of 6's retained in the initial throw). If I do the math like on the first one I get 315 ways to get the perfect score with 2 rolls where 2 dice are held, and the remaining 4 are thrown and kept.


More questions:

Am I doing this correctly? Are these the correct assumptions to do this calculation?

How does this change when I get to 3,4,5,6 rolls?

Is there formula for doing what I am attempting to do?

Do any of these gyrations have any affect on the 46656 (6^6) that I am using for the total possibilities?

Share this post

Link to post
Share on other sites

It does not look like you can just add some numbers and keep 46656 as your "total possibilities". Your player might roll 6 dice and be done, or roll a total of (6 + 5 + 4 + 3 + 2 + 1) dice, or some number in-between. You'll have to sum together many fractions.


The way I see it, after accounting for symmetry, there are 3 x 5 = 15 different states in your game:


(a) I either have neither, one, or both of the 2/4 combo.

(b) I have zero to four sixes.


I think you'll have to work out the odds you land on each of those branches. Landing on the same state you're already on is game over - you have nothing new to retain. Landing on the last state is winning immediately. The other 13 will each have their own chances of winning, based on the odds for their rolls to take them to the 15 game states. If it turns out that the odds of winning are actually better for retaining fewer dice on some branch, you would know this from having figured out the other branches anyway, so you can just replace each branch's odds with the maximum available. I don't really think that'll happen but I don't really know.


Anyway, I broke it down this way because these are exclusive categories - each roll belongs to only one of them. I wasn't sure exactly what you were going to do, but it looked like you would end up double-counting some rolls, such as counting immediate wins in with the wins by re-rolling some dice.

From Initial (0,0) State:
2+4   6    Occurs     Win Chance     Product
0     0    729/46656  0              0
0     1    ?          ?              ?
0     2    ?          ?              ?
0     3    ?          ?              ?
0     4    ?          ?              ?
1     0    ?          ?              ?
1     1    ?          ?              ?
1     2    ?          ?              ?
1     3    ?          ?              ?
1     4    222/46656  1/6            222/279936
2     0    ?          ?              ?
2     1    ?          ?              ?
2     2    ?          ?              ?
2     3    480/46656  1/6            480/279936
2     4    30/46656   1              30/46656
       SUM 1                     SUM 882/279936 (so far...)

From (1,4) State:
2+4   6    Occurs     Win Chance     Product
1     4    5/6        0              0
2     4    1/6        1              1/6
       SUM 1                     SUM 1/6

Your win chance at each stage is recursively figuring the the odds for each of the 15 branches again and making a new table for that sub-game. When there's only one roll left it's trivial, so I filled them in as an example. I also threw some guesses in there for the chance to get there but I'm not sure my math was right. The denominators for some of those win chances are likely to grow through the process, so you can imagine what the final sum will look like.


Share this post

Link to post
Share on other sites

Thanks for the quick reply. Let's see if I can state some assumptions and you can show me where I was wrong:


When I began I came up with 46656 as the number of final outcome values on the dice. That accounts for 1,1,1,1,1,1 through 6,6,6,6,6,6. When I came up with the 30 (6!/4!) that was based on throwing 6 dice and coming up with 3 specific values with 4 of them being equal. That accounted for 2,4,6,6,6,6 as well as 6,6,6,6,2,4 and all the ones in between.


It seems that no matter how many times one tosses the 6 dice there will never be more than 46,656 outcomes.


I was not trying to calculate the chances of each state, but rather the instances of each state so that I can come up with the fractional relationship between how many different ways one can come up with the final desired value over the number of potential outcome values. Is this wrong?


I also need a little help following your table, I am missing some key/translation at some point but I will study it further and see if it makes sense.


Initially, I came at it from the direction of the chances of each roll and trying to put them together. There seemed to be an inordinate amount of rolls to hand calculate that way.


Just to be clear, I am looking to fashion a "pay table" not a strategy. I don't really care whether the player gets a score of 24 or 23 or whatever in one roll or 6 rolls, I just need to figure out the probability that he will get such score by the time he has chosen to retain all dice. 


Please stop me if I am attacking this from the wrong direction.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!