Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Classic maths puzzles

Play four famous puzzles with the maths inside: Tower of Hanoi, water jugs, river crossings and the knight's tour, with hints and best scores.

Moves 0

How to play

  1. Tower of Hanoi: move the whole stack to the right-hand peg, one disk at a time, never putting a bigger disk on a smaller one. Tap a peg to pick up its top disk, then tap where it goes. Show me finishes it from wherever you are, in the fewest moves.
  2. Water jugs: fill, empty and pour between jugs with no markings to measure an exact amount. Pouring stops when one jug is empty or the other is full.
  3. River crossing: tap who gets in the boat (up to two), then Cross. Keep everyone safe on both banks.
  4. Knight's tour: place the knight, then hop in L-shapes to visit every square exactly once. Squares you can reach are marked.

Keyboard and touch

1 2 3Tower of Hanoi: pick up from or put on a peg
Tab then EnterUse any button, peg, person or square
TapChoose a peg, a jug action, a passenger or a square

Tips

  • Hanoi: the smallest disk moves every other turn, always in the same direction round the pegs. With an even number of disks it goes left to right first.
  • Water jugs: you can measure any multiple of the greatest common divisor of the jug sizes, up to the bigger jug. 3 and 5 can make every whole number; 4 and 6 only even ones.
  • River crossing: the trick is taking something back across.
  • Knight's tour: always jump to the square with the fewest onward moves (Warnsdorff's rule, 1823). It almost never gets stuck on an 8 × 8 board.
  • A 5 × 5 tour must start on a square the same colour as the corners.

About these puzzles

The Tower of Hanoi was published by Édouard Lucas in 1883. Moving n disks takes 2ⁿ − 1 moves at least, and the solver here works from any position you leave it in: it moves the largest out-of-place disk by first clearing everything above it. The water jugs and river crossings are solved by breadth-first search, which tries every position one step away, then two, and so on, so the first solution it finds uses the fewest steps. That is how the game knows your best possible score and gives hints.

The wolf, goat and cabbage puzzle goes back to Alcuin of York (about 800 AD). The campers-and-bears puzzle uses the classic rule from the "missionaries and cannibals" problem, which needs 11 crossings. Knight's tours were studied by Euler; the hint uses Warnsdorff's rule, with ties broken by looking one move further ahead.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product