Artificial intelligent assistant

Dice game modelling: Lose everything on "3", double everything on "1" or "6" I was recently playing a quite easy dice game: You trow a fair dice: if you get a "3" the next player continues, if you get something else it is up to you to continue. If you continue and you throw a "1" or a "6" you get twice the result from the first trow. If you get a "3" you lose everything and the game continues (you always can double your result with a "1" or "6" and lose everything with a "3"). I was wondering if you could tell, at what point it is better to quit than to continue (I'm pretty sure you can, but I don't know how). Any thoughts are welcome.

This could be solved using the Bellman's equation if you cast this as an infinite horizon dynamic programming problem.

The value function $F(x)$ when your current earnings are $x$ will be of the form: $$\begin{align} F(x)&=\max\left\\{x,\frac{3}{6}x+\frac{2}{6}2x+\frac{1}{6}0\right\\}\\\ F(x)&=\max\left\\{x,\frac{x}{2}+\frac{2x}{3}\right\\} \end{align} $$

Since you are always better off in an expected sense, (i.e. since $\frac{x}{2}+\frac{2x}{3}>x\ \forall x$, it is never optimal to stop playing. In other words, the loss of the money occurs with a probability 1/6, which is never high enough to forbid one from playing.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 6eef51edb804ed7ed9a3bb7343f8b0a4