Towers of Hanoi

Moves / Minimum0 / 31
Excess moves0
Elapsed00:00.0
Moves / second0.00
Potential score0
Best score (discs)—
Press ← / → and Enter, or 1 / 2 / 3, to begin.
Auto solve

Automatic solver

The solver will complete the puzzle in the fewest possible additional moves from its current position, finishing on either outer pin. An assisted game cannot earn a high score.

During solving, Page Up increases speed and Page Down decreases it. Each move has two visible phases: focus and lift, then focus and drop. The selected moves/second applies to complete moves. Speed is remembered between visits.

Automatic solve complete

Assisted results are not entered into either leaderboard.

Colour schemes

Changes are a preview only. Save applies the selected scheme and stores it for future visits; Cancel discards all edits.

Input Settings

Enable the ways you want to control the discs. These preferences are saved in this browser.

Import high scores

Merge retains existing records and adds distinct imported records. Replace discards existing records and uses only the imported file. Cancel leaves all scores unchanged.

Instructions

Move the complete stack from the middle pin to either outer pin. Only one disc may move at a time, and a larger disc cannot rest on a smaller disc.

Keyboard: ← / → cycles the selected pin (wrapping at the edges); Enter lifts or drops the top disc. Keys 1, 2 and 3 lift or drop directly on those pins. Both methods can be mixed. Escape cancels a lifted disc.

Mouse or touch: Click a pin to lift a disc, then click another pin to drop it. Alternatively drag the top disc to another pin. Right-click cancels a lifted disc. Returning to the source pin does not count as a move.

The Solve button finds the shortest completion from any legal position; Page Up / Page Down adjust automatic solve speed. Assisted games cannot earn high scores. Scoring strongly rewards higher disc counts, faster solutions and fewer extra moves. Your settings and leaderboards are saved in this browser.

High scores

Disc leaderboard

Global leaderboard

Top 10 entries per board. Scores are stored locally in this browser.

Victory!

Your score qualifies for a leaderboard. Enter your name: