The first time you try a knight’s tour it usually goes like this. You roam happily around the middle of the board, and then at some point a few corner squares are left stranded on an island you can no longer reach. Undo does not help much: the fork that doomed you was twenty moves ago.
The fix was published in 1823. H. C. von Warnsdorff’s rule is a single sentence: among the squares you can reach, move to the one that will have the fewest onward moves once you get there.
Why it works
Every square has a number of doors. A square in the middle of the board can have up to eight ways in and out; a corner has two. A room with two doors is a room you enter through one and leave through the other. If something else already consumed one of those doors, the room becomes a place you can enter but never leave — and if squares remain unvisited when you get stuck there, the tour is over.
So deal with the narrow rooms first. Wide rooms will still be wide later; narrow ones only get narrower. The advice to visit corners and edges early is just the human-sized version of this rule.
What is remarkable is how well it does. It is one sort call, and most boards solve without a single backtrack. Two hundred years later nobody has found a better general heuristic for this problem.
But it is not a guarantee
Warnsdorff’s rule is a heuristic — a rule of thumb, not a theorem — and it does fail. Most of the failures start with ties.
If two reachable squares both have exactly three onward moves, the rule says nothing at all. Ties like that are common, and which one you take can decide everything twenty moves later. The rule itself offers no grounds for the choice.
That is why the solver on this site uses Warnsdorff as an ordering rather than an answer. It sorts candidates by ascending onward-move count and tries them in that order, but when a branch dies it backs out and takes the next one. When the heuristic is right there is almost no backtracking; when it is wrong, there is exactly as much as the board deserves. That count is what this site uses as the board’s difficulty.
Where the variants break it
Two of the game’s rule variants attack Warnsdorff intuition head-on.
In Wrapped World the left and right edges of the board are joined: step off the left and you appear on the right. Suddenly the squares along those edges have far more doors. Corners are no longer corners, and the premise behind "handle the corners first" is gone. Top and bottom are still walls, so only half the intuition collapses — and that asymmetry is exactly what makes the chapter hard.
In Fixed Endings you must finish on a flagged square. Warnsdorff knows nothing about this. As the board fills, the flagged square’s options shrink, so the rule actively encourages stepping on it early — precisely the one thing you must not do. Here you have to hold a square in reserve for the final move, and that is a kind of plan a greedy rule cannot express.
Using it by hand
Turn on Counts in Practice mode and every square shows how many onward moves it has left; Hint points at the smallest. Follow it for a few boards and the rule becomes instinct — and so does the sense of when it wobbles. You start noticing the positions where three squares tie, and the ones where the rule leads you straight into a wall.
Those positions are where the puzzle actually lives. If the rule did all the work, there would be no game.
Next: Change one rule — closed tours, fixed endings, wrapped boardsStages