A coin is tossed repeatedly at a fixed cost per toss. The payoff is the length of the terminal run of heads, less the cost of tossing. Properties of the dynamic programming solution are derived; the exact optimal policy and value of the game are obtained when the game has an infinite horizon, and the rate at which this solution is approached by the sequence of truncated strategies is analyzed numerically.
"How to Win a War if You Must: Optimal Stopping Based on Success Runs." Ann. Math. Statist. 43 (6) 1884 - 1893, December, 1972. https://doi.org/10.1214/aoms/1177690859