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.

  1. 1Disc 1 to peg 2
  2. 2Disc 2 to peg 3
  3. 3Disc 1 to peg 3
  4. 4Disc 3 to peg 2
  5. 5Disc 1 to peg 1
  6. 6Disc 2 to peg 2
  7. 7Disc 1 to peg 2
  8. 8Disc 4 to peg 3
  9. 9Disc 1 to peg 3
  10. 10Disc 2 to peg 1
  11. 11Disc 1 to peg 1
  12. 12Disc 3 to peg 3
  13. 13Disc 1 to peg 2
  14. 14Disc 2 to peg 3
  15. 15Disc 1 to peg 3

Move 8 is disc 4's only move.

Play the tower

The fewest moves

DiscsFewest moves
37
415
531
663
7127
8255

2 to the power of the discs, minus 1.

The plan, in three steps

For 4 discs:

  1. Move the three smaller discs to peg 2 (7 moves).
  2. Move disc 4 to peg 3 (1 move).
  3. 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.

Start
After move 7
After move 8
After move 15

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