Calculation

Calculating the exact theoretical outcome of the Yahtzee game

I hope you managed to went through my short mathematical description. This is a prerequisite for understanding this section.

The outcome of Yahtzee can be calculated exactly. What needs to be calculated is:

  • What is the probabilistic value of a combination of unused boxes? Ex.
    • Ones& Twos,
    • Ones & Twos & Threes, etc.
    • ….
  • What is the best to save for the next roll in a turn. Ex:
    • 1,1,0,0,0
    • 1,0,0,0,1
    • 0,0,0,0,0

The first item refers to a combination of boxes and a status of the Yahtzee box, for ex.

    Ones & Twos & Y=0

    Ones & Twos & Y=Y

    Ones & Twos & Threes & Y=0

    Ones & Twos & Threes & Y=Y

    Ones & Twos & Yahtzee & Y=U

Each calculated item is a matrix with 64 values (one value for each remaining upper score to 63 points). See “Dealing with the extra Yahtzee bonus points” for an example.

The second item refers to a combination of:

  • A combination of dice (ex. 1,3,5,5,6).
  • Current combination of unused boxes (ex, Ones & Sixes & Chance).
  • Number of rolls left in the current turn (2 or 1).
  • Points/score already achieved in the Upper Section.
  • Current status of the Yahtzee box (U, Y, 0).

Each calculated item is an array with 64 values indicating what is the best to save from the current combination of dice for the next roll. See “Interesting example: what to save for the next roll?” for an example.

These data can be calculated gradually backwards from the end of the game as follows :

Single boxes

  • Let’s start with single boxes: Ones, Twos, …, Chance.

At this point we assume that only one box remained unused, so we are at the end of the game at the last turn.

Box = Ones

  • For one roll left:
  • For each state of the Yahtzee box (0, Y, U)
      • For each combination of dice (ex. c=1,1,2,3,5):
        • For each combination of the saved dice (ex. s=1,0,0,0,1):
          • For each possible dice combination after one roll DC (by saving s )
            • For each upper section score missing from the minimum 63 points (ex. misScore=2):
              • Calculate the value of the combination of dice (DC) for that box (Ones); attention to the extra Yahtzee bonus.
              • Add the value of the Upper Section bonus if the min 63 points have been reached.
        • Calculate the average values for each s.
      • Save the best average values and best s values for each upper section score missing from the minimum 63 points
  • After this calculation you will have a 64 element array for each:
  • combination of dice (ex. 1,3,5,5,6).
  • Single unused boxes (ex, Ones, Sixes, Chance).
  • Number of rolls =1.
  • Points/score already achieved in the Upper Section.
  • Current status of the Yahtzee box (U, Y, 0).

Now you have to calculate what happens if you have one box and two rolls:

 

Box = Ones

  • Two rolls left:
  • For each state of the Yahtzee box (0, Y, U)
      • For each combination of dice (ex. c=1,1,2,3,5):
        • For each combination of the saved dice (ex. s=1,0,0,0,1):
          • For each possible dice combination after one roll DC (by saving s )
            • For each upper section score missing from the minimum 63 points (ex. misScore=2):
            • Cumulate the value of dice (DC) for that box calculate with rolls left=1
        • Calculate the average values for each s.
      • Save the best average values and best s values for each upper section score missing from the minimum 63 points
      • Save the best combinations of what is best to save.
  • After this calculation you will have a 64 element array for each:
  • combination of dice (ex. 1,3,5,5,6).
  • Single unused boxes (ex, Ones, Sixes, Chance).
  • Number of rolls =2.
  • Points/score already achieved in the Upper Section.
  • Current status of the Yahtzee box (U, Y, 0).

 

The value of other boxes can be calculated after this calculation:

  • For each state of the Yahtzee box (0, Y, U)
    • For each box
      • For each combination of dice (ex. c=1,1,2,3,5):
        • For each upper section score missing from the minimum 63 points (ex. misScore=2):
        • Calculate the average of the values from the previous calculation with number of rolls =2.
  • After this calculation you will have a 64 element array for each:
  • Single unused boxes (ex, Ones, Sixes, Chance).
  • Points/score already achieved in the Upper Section.
  • Current status of the Yahtzee box (U, Y, 0).

containing the value of that box with 3 rolls left.

Combinations of boxes

 

The additional step which has to be taken into account here is the possibility to switch between targets after each roll. You start with the combinations of two unused boxes and end up with the only one combination of 13 unused boxes.

Boxes = Ones & Twos & …

  • For one roll left:
  • For each state of the Yahtzee box (0, Y, U)
      • For each combination of dice (ex. c=1,1,2,3,5):
        • For each combination of the saved dice (ex. s=1,0,0,0,1):
          • For each possible dice combination after one roll DC (by saving s )
            • For each individual box (ex. B=Ones)
              • For each upper section score missing from the minimum 63 points (ex. misScore=2):
                • Calculate the value of the combination of dice (DC) for that box (B); attention to the extra Yahtzee bonus.
                • Store the value to another misScore if this value decreases the min 63 points for the Upper Section Bonus
            • Calculate the average for each B. Choose the best B.
        • Calculate the average values for each s.
      • Save the best average values and best s values for each upper section score missing from the minimum 63 points
  • After this calculation you will have a 64 element array for each:
  • combination of dice (ex. 1,3,5,5,6).
  • Combination of unused boxes (ex, Ones & Sixes & Chance).
  • Number of rolls =1.
  • Points/score already achieved in the Upper Section.
  • Current status of the Yahtzee box (U, Y, 0).

In case of rolls left = 2 the calculation is similar to that described in the previous section.

After the last calculation you will end up with the value of the all unused boxes: Ones & Twos & … & Yahtzee & Chance. This value is 254.4067 and represents the theoretical outcome of the game, which cannot be outperformed on the long run.

 

[Home] [Introduction] [Outcome - 1] [Outcome - 2] [Outcome - 3] [All in all] [Calculation] [Game description] [Mathematics] [Download, links]