Home/Tile puzzles/Tower of Hanoi
Tile puzzles · movement logic

Tower of Hanoi Puzzles

Move the whole tower from the start peg to the goal peg — one disc per turn, and a bigger disc never sits on a smaller one. The optimal solution doubles with every disc: seven moves at three discs, two hundred fifty-five at eight. Sixty towers, every one solvable, every optimal move explained.

Also known as the Tower of Brahma and the Lucas tower.

60named towers
6tower sizes
255moves at 8 discs
∞generated puzzles

One Disc Per Turn, Never Bigger On Smaller

The Tower of Hanoi is movement logic in its purest form. Three pegs, a stack of discs of distinct sizes, and two rules: one disc moves per turn, and a disc may only land on an empty peg or a bigger disc. The goal is the full tower rebuilt on the goal peg. There is no hidden information and no luck — the minimum move count is a mathematical fact.

How To Solve The Tower Of Hanoi

  1. Think in towers, not discs. To move a tower of five, you must first move the tower of four aside.
  2. Move the N−1 tower to the spare peg. The spare peg is the one that is neither the source nor the goal.
  3. Move the biggest disc home. Nothing blocks it any more.
  4. Move the N−1 tower onto it. The same problem, one disc smaller.
  5. Follow the smallest disc. It moves every second turn, circling the pegs in one direction — the metronome of the whole solution.

The move count is a theorem. A tower of N needs 2^N − 1 moves: to move N discs you move the N−1 tower twice with one move between, so T(N) = 2·T(N−1) + 1. The board counts your moves against that par after every turn.

The Six Tower Sizes

Optimal move counts double with every disc.
DiscsOptimal movesWhat it trains
37The recursive idea, in under a minute
415Planning one round ahead
531Holding the alternation without counting
663Discipline over sixty-three moves
7127Sustained attention
8255The full climb — pure execution

The Legend Of The End Of The World

The puzzle was published by the mathematician Édouard Lucas in 1883, alongside a story of a temple where priests move a sixty-four-disc tower, and the world ends when they finish. The arithmetic explains the drama: sixty-four discs need 2^64 − 1 moves — about five hundred eighty billion years at one move per second. The eight-disc tower here is the same legend at a scale that fits in a coffee break.

Tower of Hanoi Puzzles: Frequently Asked Questions

What are the rules of the Tower of Hanoi?

Move the whole tower from the start peg to the goal peg. One move takes the top disc of one peg and drops it on another peg. A bigger disc may never rest on a smaller one, and only one disc moves per turn.

What is the minimum number of moves in Tower of Hanoi?

For a tower of N discs the optimal solution takes exactly 2^N − 1 moves: 7 moves for 3 discs, 15 for 4, 31 for 5, and 255 for the 8-disc tower.

What is the best strategy for Tower of Hanoi?

Think in towers: move the N−1 tower to the spare peg, move disc N to the goal, then move the N−1 tower onto it. The smallest disc moves every second turn, circling the pegs in the same direction.

Is there always a solution to Tower of Hanoi?

Yes. Every board here starts from a full tower on the source peg, and the recursive strategy solves any start-to-goal tower. The hint always knows the next optimal move.

How many puzzles are there?

There is no fixed number. Each tower is rebuilt from the short seed in the page address, so the supply is effectively unlimited. Copying the tower link saves that exact tower permanently.

Can I practise one pattern at a time?

Yes. Pick any pattern from the catalogue above and the board switches to that disc count and peg pair only, with its own address you can bookmark or hand out.

Is Tower of Hanoi good for children?

Yes. The three-disc tower solves in seven moves and teaches the whole recursive idea. It suits ages six and up, and the disc count rises only when the child is ready.

Why does the move count double with every disc?

To move N discs you move the N−1 tower twice with the key move between: T(N) = 2·T(N−1) + 1. That recurrence grows as 2^N − 1.