Member-only story
The Beauty of Markov Chains
Explained With a Game of Risk!
I find Markov chains fascinating, and the reason is a little embarrassing for a mathematical object: they have no memory. A Markov chain is a system that moves between states, and the probability of the next state depends only on the current one. Not on how you got there, not on how long you have been wandering, not on the hundred steps before. The present is a complete summary of the past. That single restriction sounds like a limitation, and it turns out to be a superpower, because it is exactly the property that makes a huge class of random processes solvable with linear algebra instead of simulation.
Risk!, the board game, is the most intuitive example I know. A battle in Risk! is a sequence of dice rolls, and the only thing that matters for the next roll is how many armies each side still has. Who rolled what three turns ago is irrelevant. That makes a battle a Markov chain, and once you see it that way, the question every player asks at the table, “if I attack with seven against five, how likely am I to win?”, stops being a matter of gut feeling and becomes a number you can compute exactly.
This post builds that calculator in Rust, uses it to explain what an absorbing Markov chain is and how to solve one, and then steps away from the board to look at where the same idea shows up in…






