Weird Probability Question on a D20

Solution 1:

Your threshold for stopping should start quite high and decrease as you have fewer rolls remaining. Your sense of rerolling anything $10$ or below is correct if you only have one roll remaining. To see what you should do if you have two rolls remaining, you need the expected value of two rolls. You have $\frac 12$ chance of getting $11-20$ on the first roll, which you will keep, so your expected value is $\frac 12 \cdot 15.5 + \frac 12 \cdot 10.5=13$, so on the third to last roll you should only keep $14$ or above. Then you can figure the expected value of three rolls because you know the strategy. That tells you what to keep on the fourth to last roll and so on. You keep the third to last roll with probability $\frac 7{20}$ and it averages $17$ if you keep it, so the expected value of a three roll game is $\frac 7{20}\cdot 17+\frac {13}{20}\cdot 13=14.4$. Now you know that you should keep $15$ or above on the fourth to last roll and can compute the expected value.