🗼 Tower of Hanoi
Move a stack of discs to another peg, one disc at a time, never placing a bigger disc on a smaller one.
How to play
Tap a peg to pick up its top disc, then tap another peg to drop it. You can only move one disc at a time, and a disc can never sit on a smaller one. The fewest possible moves is shown – can you match it?
⌨️ Keyboard: press 1, 2 or 3 to pick up from a peg, then the peg to drop on.
What it teaches
This puzzle from 1883 is a famous example of recursion: to move 4 discs you first move 3, and so on. The fewest moves for n discs is 2ⁿ − 1, linking it to number patterns and to algorithms in Digital Technologies.
Levels: 3 discs (Best: 7 moves) · 4 discs (Best: 15 moves) · 5 discs (Best: 31 moves)
Free to play, with no sign-up and no ads beside the game. Best scores are saved only in this browser. All artwork and sounds are made in code by makekite.