Goal
Move all the disks from the left peg to the right peg.
Rules
- Only one disk may be moved at a time.
- A disk can only be placed on an empty peg or on top of a larger disk.
- You can never place a larger disk on top of a smaller one.
Controls
- Click / Tap a peg to pick up its top disk, then click another peg to drop it.
- Keyboard: Press 1, 2, or 3 to select source peg, then press again for destination.
- Undo to take back your last move. Reset to start over.
- Auto-Solve watches the computer solve it with the optimal recursive algorithm!
Tips
- The minimum number of moves for n disks is 2āæ ā 1. For 5 disks that's 31 moves.
- Try to match the optimal count for a Perfect Solution badge!
- The recursive strategy: to move n disks from A to C, first move nā1 disks from A to B, then move the largest disk from A to C, then move nā1 disks from B to C.