Tower of Hanoi
Tap a peg to pick up its top disk, then tap another peg to drop it. A bigger disk can never sit on a smaller one.
How do you solve the Tower of Hanoi?
The fewest moves is 2βΏ β 1, where n is the number of disks: 7 moves for 3 disks, 15 for 4, 31 for 5. The trick: to move a stack, first move everything above the bottom disk to the spare peg, move the bottom disk across, then move the rest on top of it.
How we calculate this
The game checks each move so a bigger disk never lands on a smaller one. You win when all disks are on the right-hand peg. Your best move count for each number of disks is saved on this device.
Questions moms ask
Is there a pattern for the smallest disk?
Yes. In a perfect game, the smallest disk moves every other turn, always in the same direction around the pegs.
What does it teach?
Planning ahead and breaking a big problem into smaller ones. It is a classic in math and computer classes.
Is it free?
Yes. No ads, no account and no download.
Is my score saved?
Your best score is saved on this device only.
Related tools
This tool gives an estimate, not medical advice. Every pregnancy and every baby is different. If you're worried about anything, talk to your doctor or midwife.