Skip to content
All library documents

Using Expected Value to Solve a Dice Reroll Strategy

Article Quant Q&A · Author: bob

Summary

The document presents a dice game in which a player can keep a score or pay a point to reroll any subset of three dice. Matching faces are flipped when scoring, and rerolls may continue indefinitely. The question is how to choose whether to stop and which dice to retain, given the penalty and the score distribution.

The answer recommends solving simpler versions first. With one die, compare the current face to the expected result of another roll after accounting for the penalty. It then examines two-die examples with small face sets, enumerating outcomes and showing when rerolling one die can improve expected score. This illustrates backward reasoning from manageable cases toward the full problem. The answer does not complete the three-dice optimization, derive a general recurrence, or provide an optimal policy; it ends by suggesting an alternative perspective based on the expected number of rolls to reach the maximum score. The examples therefore teach a method of attack rather than a finished solution.

Key ideas

  • A reroll decision should compare the current score with the expected value after the penalty.
  • Solving reduced versions of a game can expose patterns useful for the full problem.
  • When rerolling, the player can choose to retain some dice and reroll others.
  • Enumerating small outcome spaces helps identify whether a reroll improves expected score.
  • The response outlines an approach but does not solve the original three-dice optimization.

Tags

Full text
# Optimal Strategy in 3 Dice Game


# Optimal Strategy in 3 Dice Game












In a recent interview I received the following question (an optimisation/strategy game)...which left me a bit stumped. The rules of play, you start with 0 points, then:

- Roll three fair six-sided dice; Now you have the option:

- Stick, i.e. accept the values shown on your dice as the score for your turn. There is a caveat, if two or more dice show the same values, then all of them are flipped upside down - e.g. 1 becomes 6

OR

- reroll the dice. You may choose to hold any combination of the dice on the current value shown (so you can choose to keep 1 dice the same and then reroll the other two). Rerolling costs you 1 point – so during the game and perhaps even at the end your score may be negative.

You can roll an infinite number of times...

My thoughts:

- So clearly the best possible score is 18 and is achieved by rolling three 1s on the first roll

- The reroll penalty prevents rolling forever to get 18.

- If the value of the dice is greater than the expected value of rerolling them (accounting for the penalty), then you should stick...

I guess what I am asking is how do I work out the expected value of rerolling them (accounting for the penalty) and how does this fit into the optimal strategy...

Thanks for all help in advance.

========================================================================

.

## Answer by Attack68 (score 1)

https://quant.stackexchange.com/a/60769

I agree this is off topic so let me try to reign it in with general response.

A common solution to financial and probabilistic problems is to reduce them to explore more simpler cases, from which you may be able to deduct patterns.

- Consider only one die

If you only had one die the flipping is irrelevant. The solution is to keep your score provided it is greater than the expectation which is: (3.5 - rolls + 1). I.e. you roll a 4 on first roll: you keep it. You roll a 3 on second roll, you keep it.

- Consider two dice

Suppose now the dice only had two sides {1,2}. Then you have 4 possible outcomes:

- (1,1): score 4 - do not reroll.

- (1,2): score of 3 - do not reroll.

- (2,1): symmetric with above

- (2,2): score of 2. Optimal to reroll just 1 die: 50% score increases to 3, 50% score remains at 2.

The expectation of this game is

What if the the dice had sides {1,2,3}:

- (1,1): score of 6 - do not reroll.

- (1,2): score of 3 - reroll the 2: 33% score increase to 5, 33% reduce to 2, 33% stays at 3, i.e expectation gain of 0.333.

- (1,3): score of 4 - do not reroll.

- (2,1): symmetric with above.

- (2,2): score of 4 - do not reroll.

- (2,3): score of 5 - do not reroll.

- (3,1): symmetric with above.

- (3,2): symmetric with above.

- (3,3): score of 2 - reroll 1 die: 3% score increase to 5, 33% stays at 2, 33% increase to 3, i.e. expectation gain of 1.33

=============

Another way to approach your problem is to think from another perspective. Suppose your target was to achieve the maximum 18 points, how many rolls would this take on average?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.