- Moves
- 0
- Minimum
- 7
- Time
- 0:00
Tower of Hanoi
Play the Tower of Hanoi online, then let the solver finish any position you get stuck in.
The rules
- Move the whole tower from peg 1 to the last peg (peg 3, or peg 4 if you choose four pegs).
- Move one disk at a time, and only the top disk of a peg.
- Never put a disk on top of a smaller one.
With n disks the fewest possible moves is 2n − 1: 7 for three disks, 1,023 for ten. The board shows that number as the minimum, and tells you how many moves are left from wherever you are.
Learn more
- The solver: finish any position with the shortest solution.
- How to solve it: a rule you can follow without thinking.
- The formula: why the minimum is 2n − 1.
- Four pegs: Reve’s puzzle, with far fewer moves.
- For teachers: embed the board in a course page or slides.