Classic mathematical puzzle — move all disks to tower C!
The Tower of Hanoi is a classic mathematical puzzle invented by French mathematician Édouard Lucas in 1883. It consists of three rods and a number of disks of different sizes which can slide onto any rod.
Click a tower to select it (it highlights in blue). Then click the destination tower to move the top disk there. Click the same tower again to deselect.
It resets the puzzle and demonstrates the optimal recursive solution step by step, so you can watch and learn the algorithm.
The formula is 2n − 1. For 4 disks that's 2⁴ − 1 = 15 moves. Achieving the minimum earns a perfect-solution badge!
Yes — completely free, no download or login required. It runs entirely in your browser on any device.
This is a fun browser game that you can play for free. Enjoy this entertaining game with simple controls and engaging gameplay.
Our version is built from scratch in vanilla JavaScript, optimized for performance across all devices. The game runs entirely in your browser, with no downloads or installations required. All progress is saved locally in your browser's storage.
Like all games on Knexio, This Game is completely free to play. We support our games through non-intrusive advertisements that never interfere with the gameplay experience.