# Strategy to maximize value from iterative dice rolls

This is based on a statistics question I had over on the rpg.stackexchange site and it was suggested that I bring it over here.

The premise is a game where you have 20 d6 dice. You roll each die sequentially and add the result to your score. Each time before rolling a new die you have the option to reset your score and re-roll all previously rolled dice along with the new die.

For example: You roll a 4 on your first die, then a 2 on your second die for a score of 6. You choose to re-roll on your third die, rolling 3d6 and getting 3. On your fourth die you again choose to re-roll (4d6) and this time you get 18. etc...

What strategy of re-rolling would result in the maximum score once you have rolled all 20 dice?

• Are you allowed as many re-rolls as you'd like? Commented Jan 29, 2021 at 3:32
• No, just one per step
– Odo
Commented Jan 29, 2021 at 3:33
• The general approach is to set a threshold for the minimum score that you will keep after each throw. After $19$ rolls you clearly reroll any time the total score is less than $19 \cdot \frac 72$, which gives an average total of $35$. Knowing that you can set the threshold for the $18$th roll. Adding the scores makes it much more complicated than just keeping one value. This question has a calculation when you keep the last draw. Commented Jan 29, 2021 at 4:26

Suppose you have rolled $$n$$ dice. If you choose to re-roll all of these, then your expected score for these dice is $$7n/2$$. So you should only choose to re-roll all the die if your total score after $$n$$ rolls is less than $$7n/2$$, else you'd have nothing to gain.
Now, finding the expected value of following this strategy is much more interesting. I haven't gone through the computations yet, but I can say for sure that it should be larger than the average score of $$70$$ that you'd expect with no re-rolling.