Improve
Tower of Hanoi Strategies
One idea solves every size of this puzzle. Here is how to see it, apply it, and stop losing moves to the same four mistakes.
On this page
The Basic Strategy
Beginners try to plan the whole game. That does not scale — a 15-disk game is 32,767 moves. Skilled players instead ask one question and repeat it:
To move a stack of n disks to the goal, first move the top n − 1 out of the way.
The largest disk cannot move until every smaller disk is off it and out of its destination. So the real work is always shifting the stack above it — and that smaller stack obeys exactly the same rule. Solve the subproblem and the big disk moves once, never again.
Step-by-Step Strategy
To move a stack of n disks from a source to a target:
- Identify the spare tower — the one that is neither your source nor your target.
- Move the top n − 1 disks from the source to the spare, using the target as working space.
- Move the single largest disk from the source to the target. This is one move, and you never touch that disk again.
- Move the n − 1 stack from the spare onto the target, using the source as working space — nothing left on it is smaller than the disks you are moving.
Steps 2 and 4 are the same problem, one disk smaller. Keep unfolding and you eventually reach a single disk, which is just one move. That is the whole method.
Solving Small Towers
Three disks — seven moves
Move the small disk to the goal, the middle disk to the spare, the small disk on top of it. The largest disk is now free: move it to the goal. Then bring the two-disk stack across the same way you built it. Every move is on the three-disk solution page.
Four disks — fifteen moves
Same shape, one level up. Build a three-disk stack on the spare tower (seven moves), move the largest disk to the goal (one move), rebuild the three-disk stack on top of it (seven moves). 7 + 1 + 7 = 15. The four-disk solution plays it through.
Once you can see a four-disk game as "a three-disk game, a single move, another three-disk game", the puzzle stops growing in difficulty. It only grows in length. The solutions for every size up to ten disks all have that shape.
Solving Larger Towers
For six disks and up, tracking the recursion in your head gets tiring. Use the parity shortcut instead — it tells you the correct move without any planning.
The odd/even rule
Repeat two steps until the stack is on the goal tower:
- On odd-numbered moves (1, 3, 5, …), move the smallest disk one tower along its circuit.
- Odd number of disks: A → C → B → A.
- Even number of disks: A → B → C → A.
- On even-numbered moves, make the only legal move that does not touch the smallest disk. There is always exactly one.
No planning, and nothing to remember beyond whether this move is odd or even — and it produces the optimal solution for any number of disks.
If you would rather see it than track it, the board's Hint shows the next optimal move from wherever you currently are, and Auto Solve plays the rest out at the speed set under the board.
Minimum Moves
A perfect game of n disks is 2ⁿ − 1 moves. The formula falls straight out of the method: solving n disks costs two n − 1 solutions plus one move for the largest disk.
That doubling is why the legend about 64 golden disks is safe. At one move per second, a 64-disk game would take roughly 585 billion years.
Common Mistakes
- Undoing your last move. Moving a disk back where it came from wastes two moves and returns you to the same position. If you are about to reverse yourself, the previous move was the mistake.
- Moving the smallest disk twice in a row. In an optimal game the smallest disk moves on alternate moves — never twice consecutively. If you catch yourself doing it, you have lost the thread.
- Ignoring the spare tower. Players fixate on the goal and try to move everything there directly. The middle tower is where most of the work happens.
- Aiming the big disk at the wrong tower. Before clearing a stack, decide where the disk underneath needs to end up. Clearing to the wrong tower means clearing it again.
Use the timeline to find the mistake. Scrub back through a finished game and watch the line under your stats: the first move where "On the optimal path" changes to a count of moves off optimal is the one to study.
Try It Yourself
Set the board to five disks and try to finish in 31 moves. When that feels routine, move to six and aim for 63.
Not sure of the rules yet? Start with how to play Tower of Hanoi.