Tower of Hanoi Visualizer

A mathematical puzzle that demonstrates recursion and problem-solving strategies. Move all disks from the first rod to the last rod following the rules.

4
300 ms
Total Disks
4
Your Moves
0
Minimum Moves
15
Optimal Solution
15 moves

Current Status

Click and drag a disk to move it!

About the Tower of Hanoi

The Tower of Hanoi is a mathematical puzzle invented in 1883 by French mathematician Édouard Lucas. It demonstrates concepts of recursion and exponential growth.

Rules:

  • Only one disk can be moved at a time
  • Each move consists of taking the upper disk from one stack and placing it on top of another stack
  • No disk may be placed on top of a smaller disk

Minimum moves required: 2N - 1

How to play: Click and drag a disk to move it from one rod to another.

Move History

No moves yet. Start playing!