
Tower of Hanoi
How to play
Gameplay
The Tower of Hanoi, the classic recursion problem. Three pegs hold a stack of discs in decreasing size, and the task is to move the whole stack to a different peg. Only one disc may move at a time and a larger disc may never rest on a smaller one. The minimum number of moves is two to the power of n minus one, so every extra disc doubles the difficulty.
Controls
Click a peg to lift its top disc, then click a destination peg to place it; illegal moves are refused with an explanation. The header shows your move count against the theoretical minimum, the disc count can be changed to alter the difficulty, and reset returns to the starting position.
FAQ
What is the fewest moves possible?
For n discs it is 2^n - 1. The header shows your move count against that theoretical minimum, so you always know how close you were to perfect.
What happens on an illegal move?
It is refused with an explanation - a larger disc may never rest on a smaller one.
Related articles
More games
If life could start over... (for fun only)
Classic minesweeper; left click to reveal, right click to flag
Aim and launch the ball to score points
Use arrow keys or WASD to eat and grow
Push all the boxes onto their target spots
A multi-mode arcade shooter — switch between space invaders, tanks, asteroids, centipede, bullet hell, and more from the in-page tab bar.