100-sided dice roll problem When should I stop rolling if it costs $1 for each roll and I earn only the value of the final roll shown on a 100-sided dice roll? My intent is to maximise profit and I have unlimited rolls

Let $t \in [0,99]$ be our rejection threshold value. In other words, if the value we rolled is $> t$, then we stop.
Then $p = 1 - \frac{t}{100}$ is the probability that we stop. This then means that on average it will take us $\frac{1}{p}$ rolls to finish. Note that when we stop, we received a value uniformly distributed over $[t+1,100]$, which is on average $\frac{t+1+100}{2}$. Thus, our expected profit is
$$
\frac{t+1+100}{2} - \frac{1}{p} = \frac{101 + t}{2} - \frac{100}{100 -t}
$$
Iterating over the values of $t$ gives us the maximum expected value at $t=86$ of $86.3571429 (which is consistent with Lynn's simulation which resulted in the same rule of >= 87).
Ths analysis below is wrong, since the expected payout is incorrect. See my new answer for a fully probabilistic treatment
Now then let's consider the case where the player has access to a supplementary source of randomness in order to make decisions.
Now we define $t = i + r$ where $i$ is a whole number $r \in [0,1)$ is the remainder. And establish the following rule for the roll value $v$:

*

*When $v \leq i$, continue

*When $v > i + 1$, stop

*When $v = i + 1$, stop with probability $1-r$
Then the probability of stopping is $p = 1 - \frac{i+1}{100} + \frac{1-r}{100} = 1 - \frac{t}{100}$. Given that we have stopped, the expected payout is the same as before. So the expression for the expected profit remains the same. Only now we can optimize over non-integer $t$. Solving this gives $t= 100 - 10\sqrt 2 \approx 85.858$ resulting in a profit of $\frac{201}{2} - 10\sqrt 2 \approx 86.358$
