Optimal_solitaire_Yahtzee_strategies
Optimal_solitaire_Yahtzee_strategies
net/publication/228756223
CITATIONS READS
3 1,372
1 author:
Tom Verhoeff
Eindhoven University of Technology
90 PUBLICATIONS 1,303 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Tom Verhoeff on 28 May 2014.
Tom Verhoeff
[email protected]
http://www.win.tue.nl/~wstomv/yahtzee/
c 1999–2004, Tom Verhoeff Yahtzee–1
Micro Yahtzee: Equipment & Rules
Category Score
Double value doubled
Square value squared
TOTAL sum above
Yahtzee–2
Micro Yahtzee: Dilemma
Category Score
Double ...
Square ...
TOTAL ...
Score 8 in Double?
Score 16 in Square?
Yahtzee–3
Game Tree
Turn 1 Turn 2
roll choose roll “choose”
j
u
X j
u
XX
1 1
j
u
j
u
2 XXX
2
3 Sqr
3 j
u
XXX
u j u End
Dbl
Begin
u
XXX X
u
XXX
Z
\ Z
\Z
XXX
X
4
XXX
Z
\ Z
\ Z
XXX
XXX4
XXj
u X
Xu j
\ Z XX \ Z
\ ZZ XXX Sqr
XX \ Z
\ XXX
\ Z
\
Z
Z5 X
X u
X
Z
X X \
Z
Z 5
\ Z \Z \ Z
Z \
\Z Z
\ Z \ Z
\ Zu
j
XXX \ Zu j
\6 \ 6
\ \
\ \
\ \
\\u
j \
\uj
XXX
Yahtzee–4
Micro Yahtzee: Analysis
Number of games: 6 · 2 · 6 · 1 = 72
Yahtzee–5
Solving Micro Yahtzee
Yahtzee–6
Micro Yahtzee: Game Graph
1
2
3
4
Sq
1 5
ua
6
re
e
2
bl
ou
D
Begin 3 En
4
b le
5 Sq u
uar
e 1 Do
6 2
3
4
5
6
Roll Choose Roll "Choose"
Copyright (c) 2004, Tom Verhoeff
Micro Yahtzee: Expected Scores
2+ 1+
4+
1+
1/6 x
4+ 9+
1/6 x
4+ 16 +
1/6 x 25 +
6+
1/6 x 9+ 36 +
8+
1/6 x
2+
1/6 x 16 + 4+
10 + 6+
1/6 x 25 +
1/6 x 8+
12 +
10 +
36 + 12 +
1/6 x 16 + 4+
4
10 + 7 6+
1/6 x 32 25 + 6
1/6 x 8+
12 + 8
10 +
43 36 + 10 12 +
Yahtzee–7
Yahtzee Score Card
Category Score
Aces ... ↑
Twos ... |
Threes ... Upper
Fours ... |
Fives ... Section
Sixes ... |
Upper Section Bonus ... ↓
Three of a Kind ... ↑
Four of a Kind ... |
Full House ... Lower
Small Straight ... |
Large Straight ... Section
Yahtzee ... |
Chance ... ↓
Extra Yahtzee Bonus ... Yahtzee–8
GRAND TOTAL ...
Official Yahtzee Playing Rules
50 at Y. 100 each
GRAND TOTAL — sum above
Joker Rule
Yahtzee–11
Dilemmas
Keep 6 6 6?
Score 24 in Sixes?
Yahtzee–12
Random Play (without Bonuses and Jokers)
Expected
Category Probability Score
Aces 1 0.83
Twos 1 1.67
Threes 1 2.50
Fours 1 3.33
Fives 1 4.17
Sixes 1 5.00
Three of a Kind 1656/7776 3.73
Four of a Kind 156/7776 0.35
Full House 300/7776 0.96
Small Straight 1200/7776 4.63
Large Straight 240/7776 1.23
Yahtzee 6/7776 0.04
Chance 1 17.50
GRAND TOTAL 45.95 Yahtzee–13
Optimality Criteria
Yahtzee–14
Yathzee Turn Tree
u 1 node
@
A
AA@
@
roll @
@
all @
@
j
u ... j
u ... @
@j
u 65 nodes
@
A A
@
AA@ AA@
@
@
choose @
@
keepers @
@
u ... u ... @
@u 6525
@
A A
@
AA@ AA@
@
@
reroll @
@
others @
@
j
u ... j
u ... @
@j
u 6575
@
A A
@
AA@ AA@
@
@
choose @
@
keepers @
@
u ... u ... @
@u 657525
@
A A
@
AA@ AA@
@
@
reroll @
@
others @
@
j
u ... j
u ... @
@j
u 657575 Yahtzee–15
@
A A
@
AA@ AA@
@
@
choose @
@
category @
Yahtzee Game Tree
• Number of games:
6 · 7 · 7 · 13! ≈ 1.7 × 10170
5 5 5
to
13
6−5 ≈ 3.8 × 10−50
Yahtzee–16
Reduced Yathzee Turn Graph
u 1 node
@
A
AA@
@
roll @
@
all @
@
@
j
u ... j
u ... @j u 252 nodes
A
@ @
A
AA@
@ AA@
@
choose @
@
keepers @
@
@
u ... u ... @u 462
A
@ @
A
AA@
@ AA@
@
reroll @
@
others @
@
@
j
u ... u
j ... @j u 252
A
@ @
A
AA@
@
AA@
@
choose @
@
keepers @
@
@
u ... u ... @u 462
A
@ @
A
AA@
@ AA@
@
reroll @
@
others @
@
@ Yahtzee–17
j
u ... j
u ... @j u 252
A
@ @
A
AA@
@ AA@
@
choose @
@
category @
Reduced Yahtzee Game States
64 = 26 (0 .. 63)
• Roll index: 3 (1 .. 3)
5+6−1
• Rolled dice: 5 = 252
5+7−1
Kept dice: 5 = 462
Yahtzee–18
Computational Approach
• Dynamic programming
• Two-level
• Self-initializing
Yahtzee–19
And now what?
Yahtzee–20
What’s in it for you?
Yahtzee–21
Approximate Results
Issues:
Issues:
Yahtzee–22
Dilemmas Resolved
Keep 6 6 6: 265.12 ± 61
Keep all and score 25 in Full House: 253.91 ± 57
Keep 3 4: 245.17 ± 57
Keep 1 1: 245.14 ± 57
Keep 4: 244.96 ± 57
Keep 3: 244.74 ± 57
Keep none: 244.55 ± 57
Keep 6: 244.52 ± 57
Yahtzee–23
Dilemmas Resolved
Yahtzee–23
Optimal Strategy Trivia
Keep 6: 249.83 ± 58
Yahtzee–24
Optimal Strategy Trivia
• Minimum score: 12
Yahtzee–24
Final Scores per Category for Optimal Strategy
Category E SD % 0
Aces 1.88 1.22 10.84
Twos 5.28 2.00 1.80
Threes 8.57 2.71 0.95
Fours 12.16 3.29 0.60
Fives 15.69 3.85 0.50
Sixes 19.19 4.64 0.53
U. S. Bonus 23.84 16.31 31.88
Three of a Kind 21.66 5.62 3.26
Four of a Kind 13.10 11.07 36.34
Full House 22.59 7.38 9.63
Small Straight 29.46 3.99 1.80
Large Straight 32.71 15.44 18.22
Yahtzee 16.87 23.64 66.26
Chance 22.01 2.54 0.00
Extra Y. Bonus 9.58 34.08 91.76
GRAND TOTAL 254.59 59.61 0.00
Yahtzee–25
Yahtzees Rolled 0.46 0.69 63.24
Jokers Applied 0.04 0.19 96.30
Final Scores, playing w/o Extra Yahtzee Bonus and Jokers
Category E SD % 0
Aces 1.82 1.14 9.19
Twos 5.25 1.95 1.31
Threes 8.57 2.65 0.59
Fours 12.19 3.24 0.46
Fives 15.74 3.81 0.40
Sixes 19.29 4.61 0.46
U. S. Bonus 24.14 16.19 31.02
Three of a Kind 22.23 5.50 3.44
Four of a Kind 13.04 11.44 39.38
Full House 22.86 6.99 8.54
Small Straight 29.53 3.71 1.55
Large Straight 33.04 15.16 17.40
Yahtzee 15.89 23.28 68.21
Chance 22.26 2.44 0.00
GRAND TOTAL 245.87 39.82 0.00
Yahtzees Rolled 0.41 0.61 64.76 Yahtzee–26
Jokers Applied – – –
Distribution of Final Score for Optimal Strategy
Score range % Cum.%
100 – 119 0 % 0 %
120 – 139 0 % 0 %
140 – 159 2 % 2 %
160 – 179 3 % 5 %
180 – 199 9 % 14 %
200 – 219 13 % 27 %
220 – 239 14 % 41 %
240 – 259 20 % 60 %
260 – 279 19 % 80 %
280 – 299 6 % 86 %
300 – 319 5 % 90 %
320 – 339 2 % 92 %
340 – 359 1 % 93 %
360 – 379 1 % 94 %
380 – 399 2 % 96 %
400 – 419 2 % 98 %
420 – 439 1 % 99 % Yahtzee–27
440 – 459 0 % 99 %
460 – 479 0 % 99 %
Distribution, playing w/o Extra Yahtzee Bonus and Jokers
Score range % Cum.%
100 – 119 0 % 0 %
120 – 139 0 % 0 %
140 – 159 2 % 2 %
160 – 179 3 % 5 %
180 – 199 9 % 14 %
200 – 219 13 % 27 %
220 – 239 14 % 40 %
240 – 259 21 % 61 %
260 – 279 21 % 82 %
280 – 299 8 % 90 %
300 – 319 6 % 97 %
320 – 339 3 % 100 %
340 – 359 0 % 100 %
Results based on simulation of 105 games
Yahtzee–28
Cumulative Distribution of Optimal Final Score
Yahtzee–29
Cumulative Distribution of Final Score
Category E SD % 0
Aces 2.11 1.10 6.49
Twos 4.21 2.21 6.49
Threes 6.32 3.31 6.49
Fours 8.43 4.42 6.49
Fives 10.53 5.52 6.49
Sixes 12.64 6.62 6.49
Three of a Kind 15.19 10.42 28.76
Four of a Kind 5.61 9.66 72.26
Full House 9.15 12.04 63.39
Small Straight 18.48 14.59 38.40
Large Straight 10.61 17.66 73.47
Yahtzee 2.30 10.48 95.40
Chance 23.33 3.16 0.00
Yahtzee–32
Game with Minimum Score of Optimal Strategy
Turn Third Roll Score in Category
1 1 4 4 5 5 1 Aces
2 1 2 3 5 5 2 Twos
3 1 1 2 2 6 0 Four of a Kind
4 1 2 2 4 6 0 Yahtzee
5 1 1 2 2 6 0 Threes
6 1 2 2 3 3 0 Fours
7 1 2 2 3 3 0 Fives
8 1 2 2 3 3 0 Full House
9 1 2 2 3 3 0 Sixes
10 1 1 2 3 3 0 Large Straight
11 1 1 2 2 3 9 Chance
12 4 5 5 6 6 0 Three of a Kind
13 5 6 6 6 6 0 Small Straight
12 GRAND TOTAL
Yahtzee–33
Game of Optimal Strategy against Demonic Dice
Turn Roll/Keep Score in Category
1 1 1 2 3 6
1 2 3 5 6
1 2 3 5 6 1 Aces
2 1 1 2 3 6
1 1 1 2 6
1 1 1 3 4 10 Three of a Kind
3 1 1 2 3 6
1 1 1 3 6
1 1 3 5 6 0 Four of a Kind
4 1 1 1 2 6
1 1 1 2 6
1 2 3 5 5 2 Twos
5 1 1 2 2 6
1 2 2 2 6
2 2 2 4 6 0 Yahtzee
6 1 2 2 2 2
1 2 2 2 2
1 2 2 2 6 0 Threes
Yahtzee–34
7 2 3 3 3 3
2 3 3 3 3
2 2 2 2 3 0 Fours
Game against Demonic Dice (cont’d)
Turn Roll/Keep Score in Category
8 1 2 2 2 2
2 3 3 3 3
2 2 2 2 3 0 Fives
9 1 2 2 2 2
1 2 2 2 2
2 2 2 3 4 0 Full House
10 2 2 5 5 5
2 3 3 3 3
2 2 2 2 3 0 Sixes
11 2 2 2 6 6
1 2 2 2 2
2 2 2 2 3 0 Large Straight
12 2 2 2 6 6
1 2 2 2 2
1 1 1 1 2 6 Chance
13 5 6 6 6 6
5 5 6 6 6
5 6 6 6 6 0 Small Straight
Yahtzee–35
19 GRAND TOTAL
Remaining Challenges
Approximation
Yahtzee–36
References