Tower of Hanoi solution, move by move
Every move for 4 discs, the fewest moves for 3 to 8, and the plan behind them.
Move the tower from peg 1 to peg 3, one disc at a time, never a bigger disc on a smaller one. The rules and controls
All 15 moves for 4 discs
Each note is one move: the top line is disc 1, the bottom line disc 4.
- 1Disc 1 to peg 2
- 2Disc 2 to peg 3
- 3Disc 1 to peg 3
- 4Disc 3 to peg 2
- 5Disc 1 to peg 1
- 6Disc 2 to peg 2
- 7Disc 1 to peg 2
- 8Disc 4 to peg 3
- 9Disc 1 to peg 3
- 10Disc 2 to peg 1
- 11Disc 1 to peg 1
- 12Disc 3 to peg 3
- 13Disc 1 to peg 2
- 14Disc 2 to peg 3
- 15Disc 1 to peg 3
Move 8 is disc 4's only move.
Play the towerThe fewest moves
| Discs | Fewest moves |
|---|---|
| 3 | 7 |
| 4 | 15 |
| 5 | 31 |
| 6 | 63 |
| 7 | 127 |
| 8 | 255 |
2 to the power of the discs, minus 1.
The plan, in three steps
For 4 discs:
- Move the three smaller discs to peg 2 (7 moves).
- Move disc 4 to peg 3 (1 move).
- Move the three smaller discs onto it (7 moves).
Steps 1 and 3 are the same puzzle with one disc fewer, solved the same way. That is why each disc doubles the moves and adds one.
Before move 8, the owl says:
Disc 4 is free to go to peg 3. Then the three smaller discs on peg 2 follow it.
Disc 1's rhythm
On a shortest solve, disc 1 makes every odd move: 1, 3, 5 and so on.
Disc 1 moves every other turn, always the same way round: peg 1, 2, 3, 1. With 4, 6 or 8 discs.
Disc 1 moves every other turn, always the same way round: peg 1, 3, 2, 1. With 3, 5 or 7 discs.
On each even move there is exactly one legal move that leaves disc 1 where it is. Make it.
Play the tower