Two players, M and N, play until one is ruined. M starts with $1, N starts with $2, so the total capital is $3.
Goal: Find P(M reaches $3 before $0)Let the state be M’s current amount of money. The absorbing states are: $0 (M is ruined) and $3 (M wins).
Let:
From $1, M either:
From $2, M either:
Click the button to simulate one random path of the game starting from M = $1.