Leap

A history of the knight's tour

The knight's tour is about a thousand years old: the earliest written solutions date from the ninth century, and nobody has called the subject closed since.

Ninth century: the first written tours

The oldest known solutions were left by al-Adli ar-Rumi in Baghdad and, at about the same time, by Rudrata in Kashmir. Both worked on the 8×8 board, and both recorded finished tours rather than a method for finding them.

Rudrata did it in verse: his tour is a poem whose syllables are laid across the squares so that it reads both in lines and along the knight's path.

1759: Euler

Leonhard Euler took the problem up as mathematics rather than as a pastime, and it stopped being a chess curiosity after him. His approach — extending an unfinished tour into a complete one — is still taught.

Today the knight's tour is the textbook example of a Hamiltonian path in a graph whose vertices are squares and whose edges are legal jumps.

1823: Warnsdorff's rule

H. C. von Warnsdorff proposed a rule that sounds almost too simple: always move to the square from which the fewest moves will remain.

On ordinary boards it produces a complete tour almost always and almost instantly. Those are the numbers the game prints on the squares in Apprentice — not as a hint about where to go, but as a way to see the board the way a solver sees it.

1991: Schwenk's theorem

Allen Schwenk characterised exactly which m×n rectangular boards have a tour and which do not. It answers the question any implementation starts with: is there any point looking.

You can see it in the game twice over. The boards start at 6×6, because smaller ones either have no tour or are too small to be interesting. And on an odd board half the squares go dark before the first move — the colour count rules them out.

Knight's tour · Leap