โ† Back to Games

๐Ÿ—ผ Tower of Hanoi

Move the whole tower to the right-hand peg. One disc at a time, and never put a bigger disc on top of a smaller one. Sounds easy โ€” then you try it with six.

Tower of Hanoi puzzle

Moves0
Best possible7
Your bestโ€”
Time0:00

Move the whole tower to the right-hand peg.

How many discs?

How to Play

Moving a disc
Tap a peg to lift its top disc, then tap another peg to put it down. Tap the same peg again to change your mind. On a keyboard, 1 2 3 pick pegs and U undoes.
The one rule
A disc can only go on an empty peg, or on top of a bigger disc. Never on a smaller one.
Best possible
There's a shortest answer, and the game knows it: 2 ร— 2 ร— โ€ฆ โˆ’ 1. Three discs take 7 moves, four take 15, five take 31 โ€” each extra disc doubles the work and adds one. Eight discs need 255 moves!
Show Me
๐Ÿ‘€ Show Me plays the perfect solution so you can watch the pattern. Try it with three discs first โ€” the same shape repeats inside itself, which is the whole secret.
The trick
To move 4 discs you first move the top 3 out of the way, move the big one, then move those 3 back on top. To move 3 you do the same with 2. Every big problem is just a smaller one done twice.
The legend
A story says monks are moving 64 golden discs, and the world ends when they finish. At one move a second that would take about 585 billion years โ€” so there's no rush.