🔍

Tower of Hanoi iconTower of Hanoi

A mobile-first Tower of Hanoi game with 120 progressive layouts, BFS optimal moves and hints, daily challenges, sound effects, and account-free sharing.

YouToStem · Algorithm Game

Tower of Hanoi

Move the tower while keeping smaller disks above larger ones. BFS verifies the true minimum and next optimal move for 120 progressive layouts.

Level 1 · 3 disks

0:00
Level optimum7
Best remaining7
Moves0

🎯 Goal: move the full tower to peg C

Tap a peg with a disk, then tap its destination. A larger disk may never sit on a smaller disk.

YouToStem · Strategy

📘 Tower of Hanoi Strategy Guide

1

Remember two rules

Move only one top disk at a time, and never place a larger disk on a smaller disk.

2

Identify the target peg

A green outline marks the goal. Progressive layouts may begin partly solved, so inspect every top disk first.

3

Think recursively

A full n-disk tower becomes: move n−1 disks, move the largest disk, then move n−1 again. The classic minimum is 2ⁿ−1.

4

Use the BFS hint

The hint searches the shortest path from the current state and reveals only the next move without moving a disk or adding a step.

❓ Tower of Hanoi FAQ

How do you play Tower of Hanoi?

Tap a peg to select its top disk, then tap another peg to move it. Move one disk at a time, never put a larger disk on a smaller one, and rebuild the tower on the green target peg.

What does BFS optimal mean?

Breadth-first search explores legal states layer by layer. Its first route to the goal is the true shortest path, used for both the level optimum and best remaining count.

Why do some levels start with split towers?

Changing only the disk count would create very few distinct puzzles. Progressive layouts keep the traditional rules while adding varied legal states and planning challenges.

How do the 120 levels become harder?

Starter levels use 3–4 disks, followed by 5, 6, and 7 disks, with progressively longer shortest paths to the goal.

How is the daily challenge generated?

The current date generates a fixed legal layout, giving everyone the same puzzle that day and a new one the next day.

Does challenge sharing require an account?

No. The URL encodes the layout seed, move count, and time so friends can play the exact same starting position.

Which skills does Tower of Hanoi train?

It develops recursive thinking, state planning, working memory, and shortest-path awareness, making it a classic introduction to divide-and-conquer algorithms.

🗓️ Updated 2026-09-04🐞 Feedback