Tower of Hanoi is out! The classic brain puzzle with 3 to 8 disks
Tower of Hanoi, the classic puzzle where you move a whole tower without ever putting a bigger disk on a smaller one, is here. It comes with 3–8 disks, unlimited undo, 3-star ratings and an auto-solve demo.
Three pegs and a set of disks in different sizes. All you have to do is move the whole tower, stacked from largest to smallest on the left peg, over to the right peg. But you can only move one disk at a time, and a bigger disk can never go on top of a smaller one.
The Tower of Hanoi was introduced in 1883 by French mathematician Édouard Lucas. It became famous with a legend about temple monks moving 64 golden disks, and when they finish, the world will end. Luckily, HanulOn's Tower of Hanoi starts with just 3 disks, so you can put your worries about the world aside.
What kind of game is it?
There are three pegs. Peg 1 is the start and peg 3 is the goal. Move every disk from the start peg to the goal peg and you win. The disks are numbered by size, so you can tell at a glance which one is bigger.
There are only two rules.
- You can only move one disk at a time, from the top of a peg.
- You can't put a bigger disk on a smaller one. Try it and the disk will wobble to let you know.
Features
- Choose the number of disks: Pick anywhere from 3 to 8. You start with 4.
- Minimum moves shown: The minimum number of moves needed for N disks (2^N−1) is shown on screen. That's 15 moves for 4 disks and 255 for 8.
- Moves and time: Your move count and time are tracked from your first move.
- Unlimited undo: Made a mistake? Take back one move at a time as many times as you like. Undo all the way back to the start and the timer resets to 0 too.
- Star ratings: Solve it in the minimum moves for 3 stars, within 1.5 times the minimum for 2 stars, and anything more for 1 star.
- Best this session: Remembers your fewest moves for each disk count (with faster time breaking ties).
- Auto-solve demo: Only available before your first move. It shows each step of the minimum-move solution, and if you press "Stop Solving" midway, you can take over from right there. Games that use auto-solve aren't recorded.
How to play
- Click/tap a peg with disks to pick up the top disk, then click/tap the peg you want to move it to.
- You can also grab a disk and drag it to the peg you want.
- Keyboard: Use the 1·2·3 keys to choose a peg, and ← → to move between pegs.
- Undo: Press U or Z, or the Undo button.
- Put down the disk you're holding (cancel): Esc. Tapping the same peg again works too.
- Changing the number of disks or pressing "Restart" starts a new game.
Tips
- The smallest disk is the key. In a minimum-move solution, the smallest disk moves every other turn, always cycling in the same direction.
- With an odd number of disks, start by moving the smallest disk to the goal peg (3); with an even number, move it to the middle peg (2).
- On turns when you're not moving the smallest disk, there's only one legal move. Don't overthink it, just make that move.
- Big picture, moving an N-disk tower means "move the top N−1 disks out of the way to the middle, move the largest disk to the goal peg, then move the N−1 disks back on top of it." Keep this flow in mind and you won't get lost.
- Watch the auto-solve demo first to see how it works, then restart and go for 3 stars.
Who it's for
- Anyone who loves math puzzles about finding patterns
- Anyone who wants to practice step-by-step thinking with their kids
- Anyone who wants to try a perfect 255-move solve with 8 disks
Playable on both PC and mobile. How many disks can you move today?