When to stop doubling down? My question is similar to this one but very specificly different
When to stop in this coin toss game?
Imagine a game where you would start with $100.  Every time you can roll a die (d6), if it is 1-5 you double the winnings, but if it is a 6 you lose everything.
How would you calculate the ideal number of rolls to make?  Lets define ideal as "if preformed 1000 times, would have the highest average winning"
The question above is similar but the reward is linear.  With a linear reward it seems very clear, play until the winning odds become worse than the reward.  In this case though the reward always keeps up with the risk.  To me it seems like at any one moment the logical thing is to keep playing as the odds are in your favor.  It is obvious though that following that you are guaranteed a result of $0.

After first roll:
$P_1(\$200) = \frac{5}{6}$, $P_1(0) = \frac{1}{6}$. 
Expected value (average winning) $E_1[X] = P_1(\$200)\cdot 200 + P_1(0) \cdot 0 = \frac{5}{6}\cdot 200 = \frac{5}{3}\cdot 100$. 
After $2$ rolls:
$P_2(\$400) = \frac{5^2}{6^2}$, $P_2(0) = 1 - P_2(\$400) = \frac{6^2-5^2}{6^2}$.
$E_2[X] = P_2(\$400)\cdot 400 + P_2(0) \cdot 0 = \frac{5^2}{6^2}\cdot 400= \frac{5^2}{3^2}\cdot 100$. 
...
After $n$ rolls:
$P_n(\$100 \cdot 2^n) = \frac{5^n}{6^n}$, $P_n(0) = 1-\frac{5^n}{6^n} = \frac{6^n-5^n}{6^n}$.
$E_n[X] = P_n(\$100\cdot 2^n)\cdot 2^n \cdot 100 + P_n(0) \cdot 0 = \frac{5^n}{6^n}\cdot 2^n \cdot 100 = \frac{5^n}{3^n} \cdot 100$. 

Even if I see, that $E_n[X]$ increases with $n$, 
I'd stop on the last $n$,  when $P_n(\$100\cdot 2^n)>\frac{1}{2}$.
Because if $E_n(\$100\cdot 2^n)$ is very large, but probability to win is very small (when $n$ is large).
Let calculate it:
$P_1(\$200) = \frac{5}{6}>\frac{1}{2}$.
$P_2(\$400) = \frac{5^2}{6^2}=\frac{25}{36}>\frac{1}{2}$.
$P_3(\$800) = \frac{5^3}{6^3}=\frac{125}{216}>\frac{1}{2}$.
$P_3(\$1600) = \frac{5^4}{6^4}=\frac{625}{1296}<\frac{1}{2}$.
So, I'd stop on $3$rd step (if have fortune to get to $3$rd step) with $\$800$ or $0$.
Well, well, maybe on the $4$th step, because $P_4(\$3200) \lesssim \frac{1}{2}$.

But (!!!)
if you can repeat this game again, again (starting of $\$100$) $-$ then there are no doubts to play it endless!
