Challenge at a Glance
- Focus
- Logic & Executive Planning
- Best For
- Computer science students, engineers, mathematicians, and puzzle enthusiasts
- Privacy
- 100% in your browser: scores are never uploaded
- Duration
- 1–10 Minutes
- Cost
- Free Forever
- Verified
- November 2026
Task Objective & Session Structure
Move the full stack of disks from the first peg to the third peg, one disk at a time, never placing a larger disk on a smaller one, in as few moves as possible.
Untimed puzzle with a move counter, an undo button and an efficiency result
How to Play (Step-by-Step)
Choose the number of disks
Select 3, 4 or 5 disks. Each button shows the minimum number of moves for that size.
Select a source peg
Click the peg whose top disk you want to move.
Select a destination peg
Click the peg where you want to place it. Illegal moves are blocked and a message explains why.
Move the stack to the third peg
Keep going until all disks are on the third peg. Use Undo to take back a move. The game then shows your moves, the minimum and your efficiency.
Supported Input Controls
| In-Game Action | Input Method / Shortcut |
|---|---|
| Select / Move Disk | Click on a peg to select or drop top disk |
| Undo Move | Click "Undo" button to reverse last move |
Trial Mechanics & Lifecycle
Disk Selection
Scoring ImpactYou click a peg to pick up its top disk.
Nothing is counted until the disk is placed.
Disk Placement
Scoring ImpactYou click a destination peg. If that peg is empty or its top disk is larger, the move succeeds. Otherwise the game blocks the move and shows an illegal move message.
A legal move adds 1 to the move counter. Blocked moves are not counted.
Undo
Scoring ImpactThe Undo button takes back your most recent move.
Undoing reduces the move counter.
Victory Check
Scoring ImpactWhen all disks are stacked on the third peg, the game shows the number of moves, the theoretical minimum (2^n − 1) and your efficiency.
Efficiency = minimum moves ÷ your moves × 100, rounded.
Scoring & Benchmark Tiers
Efficiency = (minimum moves ÷ moves you used) × 100, rounded, where the minimum is 2^n − 1 for n disks. 100% means you solved it in the fewest possible moves.
There are no penalties. Illegal moves are blocked and are not counted, and you can undo moves freely.
100% efficiency
You used the minimum number of moves.
80% – 99% efficiency
A few extra moves, recovered quickly.
Under 80% efficiency
Trial and error with some back-and-forth moves.
Cognitive Faculties Exercised
Scientific Background & Paradigm
Invented in 1883 by French mathematician Édouard Lucas, Tower of Hanoi is a staple textbook example of recursion in computer science, used to teach mathematical induction and call stacks.
Gameplay Strategy & High-Score Tips
Know the pattern for the smallest disk
With an odd number of disks, start by moving the smallest disk to the third peg. With an even number, start by moving it to the middle peg.
Alternate moves
Move the smallest disk, then make the only other legal move, and repeat. Do not move the smallest disk twice in a row.
Think in sub-goals
To move a stack of n disks, move the top n − 1 to the spare peg, move the largest disk, then move the n − 1 disks on top of it.
Use Undo to explore
If you lose track, undo a few moves rather than starting over.
Non-Clinical Educational Disclaimer
- This game models the standard 3-peg Tower of Hanoi. Variations with 4 or more pegs, which have different minimum moves, are not included.
- The game offers 3, 4 and 5 disks only.
- Designed for recreation and learning; it is not a clinical test.