YF Practical - Snakes and Ladders by Reinforcement Learning

( You need to enable Java to see this applet. )

The board to the right shows the snakes and ladders game.

  • Click Play to have the computer roll a series of dice until it gets a reward (gets to 100)
  • Click Learn to have the computer use TD learning to learn something about the game purely from being told its new location each time and when it has won. Remember, it knows nothing of the rules or that it has to get to square 100.
  • Click Play again to see how things have improved
  • Repeat until you are bored
  • Click Learn Faster to give the computer a better shot at learning the game
  • Use Reset to start over
The computer learns the value of each possible dice roll at each square of the game. They are shown as slices of colour on each square, with 1 at the bottom and 6 at the top. Dark blue means high value, light blue means low value.

Ladders are shown as green lines, snakes as red lines. The yellow trail shows the path the computer chose to take when it last played.

  • Why are some of the squares white?
  • Why does the trail never land on a snake or ladder, but move from some square prior to them, straight to their other end?
Finally, place your own snakes and ladders by dragging and dropping with the mouse. Click on the square to start at and drag to the square to end on. To remove a snake or ladder, click on its head (where the circle is).