A fair random walk (a martingale) starts at start and is stopped the first time it hits the lower or upper boundary. The optional stopping theorem says the win probability is exactly start/upper (with lower = 0): no stopping rule can beat the fair game. Press Run trials to watch the empirical win rate converge to the theoretical value (red tick).