Recommend
2 
 Thumb up
 Hide
17 Posts

BoardGameGeek» Forums » Board Game Design » Board Game Design

Subject: Help with yahtzee style math rss

Your Tags: Add tags
Popular Tags: [View All]
Graham Walker
Netherlands
Hilversum
flag msg tools
badge
what the chit!?
Avatar
mbmbmbmbmb
I am working on simple game and I am having trouble with what i thought would be fairly simple calculation.

Assume I have 5 identical d6's that have pips from 1 to 3.
- 1 appears on one side
- 2 appears on two sides
- 3 appears on three sides

Is there an understandable way for a non-math oriented person to figure out the different probabilities of getting:
- 3 dice to show a 1,
- 3 dice to show a 2
- 3 dice to show a 3

given that you have 3 throws to achieve this? ie done Yahtzee style where you can decide to keep a die if what you want to focus on comes up.

Not looking to add in the case where you change what numbers you are focusing on mid way through (ie 1st throw you decide to focus on 1s, then second throw you change you mind and focus on something else)

I tried figuring it out and quickly realised it was too much for my math skills. Doing search only confused me more.

Any insight into how I can calculate this in a way that leaves room for me to change the conditions on my own to explore different assumptions. (ie if I wanted explore probabilities of getting 4 of a kind vs. the current 3 of a kind or if I gave 2 throws instead of the current 3 throws

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Di Giacomo
Canada
Ottawa
Ontario
flag msg tools
mbmbmb
I'm sure there are more probability experienced bgg folk here than me who can provide the correct formulae.

All I can contribute is this. Probability is deceptively hard to calculate, it sometimes defies intuition, and sometimes leads to heated debates (just look up the kerfuffle over the whole Monty Hall probability problem).

I don't know what your background is but if you have even rudimentary programming skills, you can just make the computer toss those dice an ungodly number of times and have it report back results in percentages.

To me that is the fastest way to check on probabilities, you can tweak the parameters easily and see what changes.

My 1 cent,
Dave
3 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Christopher Yaure
United States
Plymouth Meeting
Pennsylvania
flag msg tools
mbmbmbmbmb
1. Calculate it for one die only.
a. Calculate likelihood of fail, then subtract from 1
1) 1: fail = (5/6)*(5/6)*(5/6) = 125/216. Success = 1-(125/216) - 91/216
2) 2: fail = (4/6)*(4/6)*(4/6) = 64/216 = 8/27. Success = 1-(8/27) = 19/27
3) 3: fail = (3/6)*(3/6)*(3/6) = 27/216 = 1/8. Success = 1-(1/8) = 7/8
2. Cube the likelihood of one success to calculate likelihood of 3 successes
a: 1: (91/216)^3 = approx .075
b. (19/27)^3 = approx. .348
c. (7/8)^3 = approx .670

Edit - the above is wrong - I misread the numer of dce. The calculations above assume you were rolling only three dice and needed 3 of a number. My apologies
1 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Nick Hayes
United States
Los Angeles
California
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Rolling three 3s will be very easy.
Rolling three 2s will be less common.
And rolling three 1s will be difficult.

I'm not sure how much more information you need to know beyond that to test your game. Play it a few times to see how it feels, then if you feel you need to change the difficulty of certain rolls, you can begin adjusting the number of faces showing each number.
3 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Nick Doe
msg tools
For clarity is the rare five of a kind on the first roll enough to win once you call your target number or must it be three dice exactly.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Lizzie
Scotland
Edinburgh
flag msg tools
designer
“Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed.” ― G.K. Chesterton
badge
A Hug a Day keeps the Doctor away!
Avatar
mbmbmbmbmb
gerwalker wrote:
I am working on simple game and I am having trouble with what i thought would be fairly simple calculation.

Assume I have 5 identical d6's that have pips from 1 to 3.
- 1 appears on one side
- 2 appears on two sides
- 3 appears on three sides

Is there an understandable way for a non-math oriented person to figure out the different probabilities of getting:
- 3 dice to show a 1,
- 3 dice to show a 2
- 3 dice to show a 3

given that you have 3 throws to achieve this? ie done Yahtzee style where you can decide to keep a die if what you want to focus on comes up.

Not looking to add in the case where you change what numbers you are focusing on mid way through (ie 1st throw you decide to focus on 1s, then second throw you change you mind and focus on something else)

I tried figuring it out and quickly realised it was too much for my math skills. Doing search only confused me more.

Any insight into how I can calculate this in a way that leaves room for me to change the conditions on my own to explore different assumptions. (ie if I wanted explore probabilities of getting 4 of a kind vs. the current 3 of a kind or if I gave 2 throws instead of the current 3 throws



I started trying to help and then remembered why I don't much like probability... So here goes,

Interestingly if you don't care which number you have it is impossible not to roll atleast 2 of a kind...

With one die the probabilities are 1/6 of getting a 1, 1/3 of getting a 2 and 1/2 of getting a 3. I'll call these z so you can work it out for each number. The number of dice is q=5.

On the first roll the probability (p) of getting x of a kind is
p= (1-z)^(q-x) * (z^x). The first part is the probability the other dice don't roll the number, the second part is the probability that the dice do. If you don't care what number makes up the 3 of a kind you add together the probabilities for each z. So for 3 3s p=1/4*1/8=1/32 because q=5, x=3, and z=1/2.

For rerolls you have to add together the probability of each way of achieving the goal, done by multiply the probability of the first throw with the probability of the second. For example I throw two of a kind, then reroll the three other dice and get my 3 of a kind. P= p(getting 2 3s)*p(rerolling 3 dice and getting 1 3), p= (1/2^3 * 1/2^2) * (1/2^2 * 1/2^1) = 1/32*1/8 = 1/512 BUT that is the probability of getting exactly 3 3s in exactly 2 rolls, it is more likely than that it you want atleast 3of a kind as you add the probability of rolling 4 or 5 of a kind on as well.

Hope that helps, sorry I can't draw a diagram right now...


1 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Franz Kafka
United States
St. Charles
Missouri
flag msg tools
badge
Avatar
mbmbmbmbmb
actuaryesquire wrote:
1. Calculate it for one die only.
a. Calculate likelihood of fail, then subtract from 1
1) 1: fail = (5/6)*(5/6)*(5/6) = 125/216. Success = 1-(125/216) - 91/216
2) 2: fail = (4/6)*(4/6)*(4/6) = 64/216 = 8/27. Success = 1-(8/27) = 19/27
3) 3: fail = (3/6)*(3/6)*(3/6) = 27/216 = 1/8. Success = 1-(1/8) = 7/8
2. Cube the likelihood of one success to calculate likelihood of 3 successes
a: 1: (91/216)^3 = approx .075
b. (19/27)^3 = approx. .348
c. (7/8)^3 = approx .670

Edit - the above is wrong - I misread the numer of dce. The calculations above assume you were rolling only three dice and needed 3 of a number. My apologies


Start with step one here.
Then look up "binomial distribution" for details.
I came up with...
35.48% for 1s
84.18% for 2s
98.39% for 3s
Assuming that you want at least three of a kind, not exactly three of a kind.

I'll write more later if no one else fills in the blanks.
2 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Jeremy Lennert
United States
California
flag msg tools
designer
Avatar
mbmbmbmbmb
Assuming there's no penalty for having more than 3 of your desired number, since the dice are rerolled independently, you'll reroll each die until it gets the number you want or until you run out of rerolls. That means the probability of getting the number you want is:

1 - (1-p)^r

where p is the probability of getting that number on a single roll and r is the maximum number of rolls (intuition: 1-p is the probability of failing a roll, (1-p)^r is the probability of failing r consecutive rolls, so 1 minus that is the probability of not failing r consecutive rolls). actuaryesquire appears to have calculated these correctly for you in the first part of this post.

If you roll n total dice, the probability that exactly m of them will be the number you want when you're done is:

z^m * (1-z)^(n-m) * (n choose m)

where z is the probability that a given die gets the number you want (calculated above), and "n choose m" is the combination function--how many different ways there are to choose m out of n dice. (Intuition: z^m is the probability that the first m dice will succeed, (1-z)^(n-m) is the probability that the rest of the dice will fail, and (n choose m) is the number of different ways to have m dice succeed and (n-m) dice fail.)

So to calculate the probability that you get at least three of the number you want, you sum the above expression over m = 3 to n.

I get:
35.48% chance of rolling at least three 1s
84.18% chance of rolling at least three 2s
98.39% chance of rolling at least three 3s

That assumes you choose which number you're going for before you start rolling. If you allow yourself to change strategies depending on what numbers you actually get (and assuming you choose your strategy optimally, which is far from certain in actual play), your odds of getting 3-of-a-kind of something will be at least as high as the highest probability listed above, and probably noticeably higher.

If you wanted to determine the optimal reroll strategies, you'd want to construct a table of probabilities to answer the question "if you currently have x of a certain number showing and you have y rerolls left, what is the probability that you'll end up with at least 3 of that number if you switch reroll strategies right now?" You can calculate that by setting r = y (since you only have y rolls remaining) and reducing both m and n by x (since x of the dice are already "locked" at the correct number).
2 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Jeremy Lennert
United States
California
flag msg tools
designer
Avatar
mbmbmbmbmb
stargazingchild wrote:
(just look up the kerfuffle over the whole Monty Hall probability problem).

That is partly because people tend to describe the problem in a vague way that allows for multiple interpretations of the rules (which of course lead to different answers).

When I first read about this problem, it was described so poorly that I had to peek at the answer just to figure out what the question was actually intended to be!
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Cornixt
msg tools
badge
Cheap as chips
Avatar
mbmbmbmbmb
Black Canyon wrote:
Rolling three 3s will be very easy.
Rolling three 2s will be less common.
And rolling three 1s will be difficult.

I'm not sure how much more information you need to know beyond that to test your game. Play it a few times to see how it feels, then if you feel you need to change the difficulty of certain rolls, you can begin adjusting the number of faces showing each number.


This is probably the best advice. If you don't know how to calculate probabilities, then you're probably not great at knowing how to evaluate which ones are better for the game, or spot the weird outliers that break the game, and you might even overlook a cool mechanism that makes the game more fun. Just play it lots of times and see what feels right.
4 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Nick Doe
msg tools
If I read all that right I think this accurately describes the game?
Flow of game:
1. Name one, two, or three as target.
2. First roll
A: Five of what you want; win (yeahh!!!)
B: Four of what you want; win (yeahh!!!)
C:Three of what you want; win (yeahh!!!)
D:Two of what you want; Save those Move to Step 3
E:One of what you want; Save those Move to Step 4
F:Zero of what you want;(Curse fate) Move to Step 5

3. Second roll (three dice in hand, banked two success)
A: Three of what you want; win (hooray!)
B: Two of what you want; win (hooray!)
C: One of what you want, win (hooray!)
D: Zero of what you want, Move to Step 6

4. Second Roll (four dice in hand , one banked success)
A: Four of what you want; win (hooray!)
B: Three of what you want, win (hooray!)
C: Two of what you want, win (hooray!)
D: One of what you want, Save it Move to Step 6
E: Zero of what you want, Move to Step 7

5. Second Roll (five dice in hand, no success)
A: Five of what you want; win (hooray!)
B: Four of what you want; win (hooray!)
C:Three of what you want; win (hooray!)
D:Two of what you want; Save those Move to Step 6
E:One of what you want; Save those Move to Step 7
F:Zero of what you want;(Curse fate) Move to Step 8

6. Third Roll (three dice in hand, two banked success)
A: Three of what you want; win (Whew)
B: Two of what you want; win (Whew)
C: One of what you want; win (Whew)
D: Zero of what you want; lose

7. Third Roll (four dice in hand, one banked success)
A: Four of what you want; win (Whew)
B: Three of what you want, win (Whew)
C: Two of what you want, win (Whew)
D: One of what you want, lose
E: Zero of what you want, lose

8. Third Roll (five dice in hand, no success)
A: Five of what you want; win (Whew)
B: Four of what you want; win (Whew)
C:Three of what you want; win (Whew)
D:Two of what you want; lose
E:One of what you want; lose
F:Zero of what you want; lose

Tell me if this isn't what the rest of you picture.
1 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Sturv Tafvherd
United States
North Carolina
flag msg tools
mbmbmbmbmb
This essentially a statistics question that involves the Binomial distribution. Search for that, figure out your p's and q's, number of successes, and number of trials.
1 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Nick Doe
msg tools
Just to see it done, I took the flow of the game I gave earlier (again hope it is right) assigned values that the binomial distribution says to, while leaving p as an unknown, multiplied and added where needed. This gives me a thirteen term, 15th degree polynomial in terms p, the probability that a single die succeeds(doesn't sound much simpler but it is graph-able).
So still five dice total; three successes; in three rolls; are needed to win. But now you could use other kind of dice if, 1/6,1/3,1/2 doesn't sit right anymore. If you want it:

(6p^15)-(70p^14)+(390p^13)-(1395p^12)+(3610p^11)-(7128p^10)+(10900p^9)-(12795p^8)+(11250p^7)-(7110p^6)+(2998p^5)-(705p^4)+(30p^3)+(20p^2)

You might want to delete the extraneous parenthesis. I just think it separating terms makes for easier reading by people. Please feel free to check my work.
 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Graham Walker
Netherlands
Hilversum
flag msg tools
badge
what the chit!?
Avatar
mbmbmbmbmb
Quote:
If I read all that right I think this accurately describes the game?
1. Name one, two, or three as target.


It does...almost. I was figuring that you would not need to call out your target until after you made your first throw. Not sure if this changes the probabilities, but I assume not.

And yes, if you roll more than the 3 symbols needed then that is a win condition. Ie 3, 4, or 5 of the same symbol leads to a achievement.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Graham Walker
Netherlands
Hilversum
flag msg tools
badge
what the chit!?
Avatar
mbmbmbmbmb
Quote:
For clarity is the rare five of a kind on the first roll enough to win once you call your target number or must it be three dice exactly.

It need not be 3 exactly. So rolling 5 of the same thing on the first throw would be a 'win', just like if you rolled 3 or 4 on the first throw.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Graham Walker
Netherlands
Hilversum
flag msg tools
badge
what the chit!?
Avatar
mbmbmbmbmb
Thanks to everyone for their help with this. Makes a lot more sense know, and I don't feel nearly as 'dumb' for not being ale to figure this out on my own. It certainly is deceptively complex

I gave out some GG as a tips. I tried to hand it out based on contribution, but my iPad fingers ended up giving out 5 when I wanted to give out 1, so some people got some extra.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
John
United Kingdom
Southampton
flag msg tools
Avatar
mbmbmbmbmb
I would expect deciding after your first roll would change the probabilities.

http://anydice.com/ is good for calculating dice probabilities. I've not worked out how to do yatzee style re-rolls, but calculating the chances of rolling 3 of a number on your first roll can be done with the following syntax:

output [count 1 in 5d{1,2,2,3,3,3}]
output [count 2 in 5d{1,2,2,3,3,3}]
output [count 3 in 5d{1,2,2,3,3,3}]

It's possible to combine these like this: http://anydice.com/program/2522

That gives the chance of getting 3 of the number on your first roll as:

1. 3.22%
2. 16.46%
3. 31.25%

You say someone calls the target after rolling the dice, but some more information about how they decide might be useful. For instance in the first roll of yatzee you can freely decide your target, but each round you have less options. For instance if I leave 6s until last then I've already decided what I'm going for before I roll the dice. I'm assuming there is going to be some reason to go for 1s in your game, the question is how is that managed? Will a player be in a position where they'd roll for 1s even after getting no ones on their first (and possibly 2nd) roll?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.