Tower of Hanoi
Move the entire stack of disks to another peg. Larger disks cannot go on smaller ones. 3-6 disk levels. Classic recursion puzzle.
How to Play Tower of Hanoi
Click a peg to select the top disk. It will lift up.
Click another peg to place the disk. Larger disks cannot go on smaller ones.
Move all disks from the left peg to the right peg.
Choose 3-6 disks. Try to solve in the minimum number of moves!
Tips to Improve Your Score
- For even disks: first move to middle peg. For odd: first move to right peg
- The recursive pattern: move the stack, move the big one, move the stack back
- Never place a larger disk on a smaller one
- Start with 3 disks to learn the pattern, then increase difficulty
Frequently Asked Questions
What are the rules of Tower of Hanoi?
Move all disks from the left peg to the right peg. You can only move one disk at a time. A larger disk cannot be placed on top of a smaller disk. Click a peg to pick up the top disk, then click another peg to place it.
What's the minimum number of moves?
The minimum moves required is 2^n - 1, where n is the number of disks. For 3 disks: 7 moves. 4 disks: 15 moves. 5 disks: 31 moves. 6 disks: 63 moves.
What's the best strategy?
For an even number of disks, make the first move to the middle peg. For odd, move to the right peg. The recursive pattern: move n-1 disks to the auxiliary peg, move the largest disk, then move n-1 disks to the target.
About the Tower of Hanoi
The Tower of Hanoi is one of our most popular brain training exercises. Designed to test and improve your cognitive abilities, this game provides instant feedback on your performance.
Regular practice with this type of cognitive exercise can help improve your mental processing speed, accuracy, and overall brain health. We recommend practicing for 10-15 minutes daily for the best results.
Your scores are saved locally on your device, allowing you to track your progress over time. Challenge yourself to beat your personal best with each attempt!