Learn the knight's tour
Everything you need to go from "how does the horse move?" to "how many million tours are on an 8×8 board?". Read it once, then go and ride.
How the knight moves
The knight moves in an L: two squares in one direction, then one square at a right angle — or one square in one direction, then two at a right angle. It is the only standard piece that jumps, so nothing in its path can block it.
Because every move shifts it by an odd number of squares, a knight always lands on a different colour from the one it left. A route therefore zig-zags between light and dark all the way across the board.
From the centre a knight attacks 8 squares; from an edge, 4; from a corner, only 2. That single fact explains most of the strategy.
Try it yourself in the game — glowing squares show legal hops.
Eight legal jumps from the centre; fewer near the walls.
Warnsdorff's rule
Always move to the square with the fewest onward moves.
H. C. von Warnsdorff described this simple heuristic in 1823. Count how many unvisited squares each legal destination can reach on the next move, and pick the smallest. It finds a full tour astonishingly often, in what feels like linear time.
It is exactly what the Hint button uses. If a hint says there is no solution, you have painted yourself into a corner — undo a move or two.
Why it works
Corners and edges are the danger. A corner square has only two exits. If you leave a corner until late, both of its neighbours may already be visited and the corner becomes unreachable. Warnsdorff pushes you toward those constrained squares while they are still reachable — a greedy habit that turns out to be nearly perfect.
When does a tour exist?
Mathematicians have completely answered this for rectangular boards. A knight's tour is a special case of the Hamiltonian path problem in graph theory.
Loading the conditions…
How many tours exist?
Tours explode in number as the board grows. These are the exact counts of all directed tours (open and closed) on an n×n board — OEIS sequence A165134.
Record book
All about the knight
- Loading…
What the knight is called around the world
The knight's movement never changed after chaturanga — but its name did. Most languages simply call it the “horse”, a few call it the “jumper”, and Sicilian calls it a donkey.
Famous games worth knowing
Ready to ride?
Put it all into practice — start with a 5×5 board and work up to a full tour.
▶ Play Knight's Gauntlet