Keep the value of an 8-sided die roll, or gamble by taking a 12-sided die roll. What's the best strategy?

Solution 1:

If you are trying to maximise the expected score, then since the expected value of the 12-sided die is $6.5$, it makes sense to stop when the 8-sided die shows greater than $6.5$, i.e. when it shows $7$ or $8$, each with probability $\frac18$. So with probability $\frac34$ you throw the 12-sided die.

The expected score is then $$7 \times \frac18 + 8 \times \frac18 + 6.5 \times \frac34 = 6.75.$$

Solution 2:

There are 256 possible strategies. To know which one to choose we would need to know the criteria for deciding how good the result is.

On the assumption that the utility of the result is nondecreasing (either a 2 is just as good as a 1, or better, etc.) there are only eight sensible strategies: keep a 2 or higher but reroll 1s, keep a 3 or higher but reroll 1s and 2s, ..., keep 8 but reroll 1-7, or reroll always.

Of those strategies "keep 7 or higher, reroll 6 or lower" is the one which maximizes the average, as explained by Henry. But others could make sense. If you're playing a Russian Roulette variant where 1 means bullet and 2 or higher means blank, you want to reroll a 1 and keep everything else. If you win $\$n^2$ on a roll of $n$ (and are risk-neutral), you should keep 8 but reroll everything lower.

Solution 3:

This is easy enough to break down with game theory.

As the objective is to get the highest number, you only want to roll again when you're more likely to roll a number that's greater than your first score.

N | P(>)
=========
1 | 11/12
2 | 10/12
3 |  9/12
4 |  8/12
5 |  7/12
6 |  6/12
7 |  5/12
8 |  4/12

As you can see it's a linear regression toward 0. The important point is that when the first roll is 6 the odds are 50/50 that you'll improve your score.