# Chutes and Ladders via Markov Chains

Click board to start simulation.

Moves: Win chance:

Chutes and Ladders is a popular children's board game, also known as Snakes and Ladders. It is not a game of skill, rather a player advances simply upon the outcome of the roll of a die or the flick of a spin wheel. This makes it particularly well suited to mathematical simulation. Here I've recreated the simulation of Chutes and Ladders via the Markov chain technique as described in a popular blog post by Nick Barry.

The Markov chain technique takes the probabilities of individual events and propagates all of the event probabilities simultaneously under the assumption that they are independent of one another. In the case of Chutes and Ladders, the individual event is moving from a given position on the board to any other position. The probabilities are propagated by use of a properly normalized transition matrix (see Nick Berry's post).

Here I have generated the probabilities for being on a given square after n moves. By clicking on the board to the left, you can see how the probabilities evolve as the number of moves increase. After around 12 moves, the chance of winning starts to be noticeable (you can actually win in as few as 7 moves!).

I wrote the Markov chain model in Python (here on github) and created the animated plot on the left in D3.js (here on github).

The above animation may not work correctly unless you are using a "modern" browser, such as Chrome, Firefox, Safari, or Opera.