Quote from MustPlayOptions:
I was using the definition of n as sjfan used it where n-heads and n-tails define the game.
I.e. when n=3 you need to get 3-heads before you get 3-tails so the maximum number of trials i is 5
So when n=4 you need to get 4-heads before you get 4-tails so the maximum number of trials would be 7.
My algorithm above works for n=1 to n=3 but breaks down when n=4. It works if you 3 straight heads or 3 striaght tails for the first few flips. The problem is if you end up using 2-heads and 1 tail in the first 3 flips.
If it' possible to get a general solution - you need something equivalent to looking at the initial few bets that will account for differing numbers of wins and losses based on a given bankroll. That's why I don't think it's possible.
This is tough. The higher the number of heads to win the game (N), the bigger the tree, and the more conditions there will be.
