The dice game Yahtzee takes thirteen turns. Each turn involves rolling a set of five dice (with two possible rerolls, the player having the option to reroll only a subset of the dice), then marking one of thirteen boxes and scoring points according to whether the numbers on the dice meet the rules of the box. After each box is marked, the game is over.

The thirteen boxes and their rules are:

- ONES: score is the sum of those dice showing a one (could be zero.)
- TWOS: score is the sum of those dice showing a two (could be zero.)
- THREES: score is the sum of those dice showing a three (could be zero.)
- FOURS: score is the sum of those dice showing a four (could be zero.)
- FIVES: score is the sum of those dice showing a five (could be zero.)
- SIXES: score is the sum of those dice showing a six (could be zero.)
- THREE OF A KIND: if three of the dice show the same number, the score is the sum of
*all five*dice; otherwise, zero. - FOUR OF A KIND: if four of the dice show the same number, the score is the sum of
*all five*dice; otherwise, zero. - FULL HOUSE: if three of the dice show the same number as each other, and the other two show the same number as each other, score 25; otherwise, zero.
^{1} - SMALL STRAIGHT: if there are four dice which show (1 2 3 4), or (2 3 4 5), or (3 4 5 6), score 30; otherwise, zero. (There is no defined order for the rolled dice, so order is not important.)
- LARGE STRAIGHT: if the five dice show (1 2 3 4 5), or (2 3 4 5 6), score 40; otherwise, zero. (Order is not important.)
- CHANCE: score the total of the five dice (minimum possible score is 5.)
^{2} - YAHTZEE (FIVE OF A KIND:) if all five dice show the same number, score 50; otherwise, zero.

There are two bonuses possible:

- At the end of the game, if the point total for boxes 1-6 (ONES through SIXES) is at least 63, the player gets a bonus of 35. (63 corresponds to getting three ones + three twos + three threes + ... + three sixes, but there are other possibilities. I don't know where 35 came from.)
- At any time the player checks a box,
*if...*- the five dice all have the same number as each other
- AND the Yahtzee box is already checked
- AND this was not a result of "taking a zero in Yahtzee"

So a perfect Yahtzee game looks like this. *On the first turn...*

Roll | Box | Score |

(x x x x x) any Yahtzee | YAHTZEE | 50 |

Subtotal | 50 |

... then on the following turns, in no particular order (but see below:)

Roll | Box | Score |

(1 1 1 1 1) | ONES | 5 |

(2 2 2 2 2) | TWOS | 10 |

(3 3 3 3 3) | THREES | 15 |

(4 4 4 4 4) | FOURS | 20 |

(5 5 5 5 5) | FIVES | 25 |

(6 6 6 6 6) | SIXES | 30 |

(6 6 6 6 6) | THREE OF A KIND | 30 |

(6 6 6 6 6) | FOUR OF A KIND | 30 |

(x x x x x) any Yahtzee | FULL HOUSE | 0 or 25 (see below)^{1} |

(x x x x x) any Yahtzee | SMALL STRAIGHT | 0 (but see below) |

(x x x x x) any Yahtzee | LARGE STRAIGHT | 0 (but see below) |

(6 6 6 6 6) | CHANCE | 30 |

Subtotal | 195 or 220 |

Now we look at the bonuses and add it all up:

Category | Score |

Base score | 245 or 270 |

Bonus for scoring >= 63 in ONES through SIXES | 35 |

Bonus for scoring twelve additional YAHTZEEs after scoring 50 in YAHTZEE | 1200 |

Total | 1480 or 1505 |

So a perfect score in Yahtzee is 1480 or 1505.

Well...

... not quite. There's another rule about Yahtzees (the "Joker" rule) which I didn't tell you about yet, because it's kind of complicated. *If...*

- You roll a Yahtzee
- AND the YAHTZEE box is already checked (a zero score is OK; you don't get the 100 point bonus, but this rule still applies)
- ... then you MUST score this in the ONES-through-SIXES box for the number you rolled (say, 3)...
- ... UNLESS that box has
*also*already been checked (a zero score is OK), in which case...

... you can score this roll in *any unchecked box* and it *automatically meets the scoring criterion* (wow!) So you *would* get 30 points in SMALL STRAIGHT or 40 points in LARGE STRAIGHT. (Or 25 points in FULL HOUSE.)^{1}

This gives an additional 70 or 95 points, bring the total to **1575**. (It also creates additional order dependencies; the boxes for FULL HOUSE, SMALL STRAIGHT, and LARGE STRAIGHT must be checked after the ONES through SIXES box for the corresponding number is checked.)

^{1} Does five-of-a-kind count as a full house? I'm not sure. Mathematically it would make sense. It turns out not to matter for this calculation because of the Joker rule, but it may matter in an actual game. The official rules say "Score in this box only if the dice show three of one number and two of another", so I guess not, but I would be comfortable adopting a "house rule" which allowed a Yahtzee to count as a "native" full house. Normally a house rule should be agreed upon by all players before the start of the game, but I'm pretty sure it would be possible to convince the other players to let you score your (3 3 3 3 3) in FULL HOUSE while YAHTZEE was still open. ("You want to throw away 25 points? Really? Um, go right ahead...")

^{2} The *lowest* possible Yahtzee score is 5: get (1 1 1 1 1) and score it in Chance, then get zeros in all the other boxes.