Tower of HanoiFree, no sign-up
Move the discs one at a time until the whole tower is on the right peg. A bigger disc can never go on a smaller one.
🎉 Tower moved!
Random practice runs are not added to the leaderboard.
FAQ
What are the rules of the Tower of Hanoi?
There are 3 pegs and discs of different sizes. You can move only one disc at a time, and you can never put a bigger disc on top of a smaller one. Move every disc from the left peg to the right peg to win.
What's the fewest number of moves?
With n discs it's 2 to the power of n minus 1: 15 moves for 4 discs, 31 for 5, 63 for 6 and 127 for 7. Move the smallest disc in the order left → right → middle → left… for an odd number of discs, or left → middle → right → left… for an even number, and in between make the only other legal move. That gives the minimum.
How do I play?
Click (tap) the peg with the disc you want to move to pick it up, then click the peg where you want to put it. On a keyboard, keys 1, 2 and 3 are the left, middle and right pegs. Illegal moves aren't allowed.
How is the leaderboard ranked?
By time, fastest first; ties go to fewer moves. You only need a nickname, and you can submit up to 30 times a day per disc count. The server replays your moves to verify them.