The rules
- All the disks start on the left peg, largest at the bottom.
- Move them all to the right peg.
- Move one disk at a time, and only the top disk of a peg.
- Never put a disk on top of a smaller one.
How to play it here
Pick 3 to 7 disks (4 is a good start). Tap a peg to lift its top disk, then tap the peg where it should go. Tap the same peg again to put the disk back down. On a keyboard, 1, 2 and 3 tap the three pegs and Escape puts a lifted disk back. An illegal move doesn't count: the disk stays where it was and you see why.
How we calculate your result
The clock starts on your first move, not when you press Start, so you can look at the puzzle and plan first. It stops on the move that completes the stack. You see your time, your number of moves, and the fewest moves possible for that many disks. Matching the minimum means you found the perfect solution.
What does my rating mean?
The rating compares your moves with the fewest possible, so it needs no averages: exactly the fewest is Perfect, and the more moves you add, the lower the rating. The moves that earn each rating:
| Rating (moves) | 3 disks | 4 disks | 5 disks | 6 disks | 7 disks |
|---|---|---|---|---|---|
| Perfect | 7 | 15 | 31 | 63 | 127 |
| Excellent | 8 | 16–17 | 32–35 | 64–72 | 128–146 |
| Good | 9 | 18–20 | 36–41 | 73–85 | 147–171 |
| Fair | 10–12 | 21–27 | 42–55 | 86–113 | 172–228 |
| Keep trying | 13+ | 28+ | 56+ | 114+ | 229+ |
The fewest moves
The minimum for n disks is 2n − 1. The reason is neat: to move the bottom disk, every other disk must first be moved out of the way onto the middle peg, which is the same puzzle with one disk fewer. Then the bottom disk moves once, and the smaller stack moves again on top of it. So each extra disk doubles the work and adds one move.
| Disks | Fewest moves |
|---|---|
| 3 | 7 |
| 4 | 15 |
| 5 | 31 |
| 6 | 63 |
| 7 | 127 |
A strategy that always works
Move the smallest disk on every other move, always in the same direction around the pegs. With an odd number of disks it goes left peg, right peg, middle peg, left peg and so on. With an even number it goes left, middle, right. On the moves in between, make the only legal move that doesn't involve the smallest disk. Follow that and you solve it in the minimum number of moves.
The legend
The puzzle was invented by the French mathematician Édouard Lucas in 1883, and sold with a story about priests moving a tower of 64 golden disks, with the world ending when they finished. At one move per second, 264 − 1 moves would take about 585 billion years.
Want another puzzle that rewards planning ahead? Try the River Crossing Puzzle or Make 24.