Knight's Tour puzzle

Can you jump a single knight to every square on the board, landing on each one exactly once? Pick a square to start and find out.

How to play

Tap any square to place your knight. The purple dots show every square it can jump to from there. Tap one to jump, and the square you leave keeps its move number. You can't land on a square twice, so the puzzle is to plan a route through all of them. If you get stuck, undo a few moves or ask for a hint.

New to it? Start on the 5×5 or 6×6 board. They are small enough to solve in a few minutes and teach you the same tricks you need for the full 8×8 tour.

The trick that solves it: Warnsdorff's rule

In 1823 the German mathematician H. C. von Warnsdorff found a simple rule of thumb: always jump to the square that has the fewest onward jumps left. Corners and edges are hard to reach, so this rule visits them early instead of leaving them stranded. Our hint button uses Warnsdorff's rule and checks ahead so it never sends you into a dead end.

A puzzle older than modern chess

The knight's tour is one of the oldest puzzles in mathematics. Tours on a chessboard appear in Indian poetry from the 9th century, where the knight's path was used to arrange the syllables of a verse. Arab chess writers studied it too. In 1759 the great mathematician Leonhard Euler wrote a whole paper about it, and today it is a classic example in computer science of searching with backtracking.

If your last square is one knight jump away from your first, the tour is called closed, because the knight could jump back to the start and go around again. There are more than 13 trillion different closed tours on a normal 8×8 board. On a 5×5 board a closed tour is impossible: with 25 squares, the knight always ends on the same color it started on, so it can never be one jump from home.

Why it's good for your chess

Knights are the trickiest piece to visualize because they jump instead of slide. Solving tours trains you to see knight routes instantly: which squares a knight can reach in one, two or three moves, and why a knight on the rim is dim.