I was at an interview workshop today and was posed this question:
I keep rolling a die, and my score is the sum of all my rolls. However, if I roll a value I had rolled before, I lose all. What is the optimal strategy?
My attempt is as follows. Suppose I roll $x_1$ on the first turn. On my next turn, my expected gain is
$$\frac{21-x_1}{6} - \frac{x_1}{6},$$
because I have a $1/6$ chance of rerolling and losing $x_1$, and the remainder of rolls sum up to $21-x_1$, each with probability $1/6$.
Now, suppose my second roll is $x_2$. On the third turn, my expected gain would be
$$\frac{21-x_1-x_2}{6}-\frac{x_1+x_2}{3}$$
for similar reasons, this time that there is a $2/6=1/3$ instead of $1/6$ chance.
My question is therefore this – given that my analysis was correct (which I am not sure about), how does this translate to a strategy? It is clear that I should roll a second time for any $x_1$, but what does this imply about future rolls? Given that $x_1+x_2=7$ results in an expected gain of exactly zero, should this call for an additional roll if I have hit a sum of $7$? I am also very confused on how to calculate the expected “short-term gain” as well, could someone discuss this? Thank you!