tell me about the Knight's Tour
that is what I did every time I was bored when I was about 7
(for who don't know what this is check this)
I calculated how many patterns of this closed circuit could have (which I failed because I soon realised there are a LOT of patterns and brute force attack won't be really effective)
Upon further research, I found out:
There are actually over 26 trillion closed Knightâs Tours on the standard 8Ă8 board.
26,534,728,821,064 closed tours 13,267,364,410,532 unique ones (since each closed tour can be rotated or reflected)
The rule that is used to calculate this is Warnsdorff's rule.
Youâre on a square. The knight has a few options. Warnsdorff says "Look ahead. Count how many valid moves each option has. Pick the one with the least future freedom."
Why?
Because if you donât, youâll trap yourself later. Itâs basically the knight saying âLet me first visit the squares that are hardest to reach later.â
Does it always work?
Nope.
But on an 8Ă8 board, starting from most squares, Warnsdorffâs Rule tends to find a complete tour. With a good tie-breaker strategy, it works almost every time.
Why does it seem to work so well?
Because the knightâs mobility varies across the board:
Corners have only 2 possible moves
Edges have 3â4
Centre can have up to 8
Warnsdorffâs Rule pushes the knight away from the highly-connected centre and into the periphery early, clearing the hard-to-reach squares while itâs still possible to get out.
Is there a formal proof of its correctness? Nope.
Warnsdorff proposed the rule in 1823, but:
Thereâs no general proof that it always yields a knightâs tour
Itâs a heuristic, not a theorem
It just works a lot, not always
Mathematicians have studied why it often works, but theyâve also shown counterexamples where it fails. And I was able to find one too.
Letâs consider the 8Ă8 board, starting at sq(0, 0), the top-left corner.
If you apply Warnsdorffâs Rule naively with no tie-breaking, it fails. It gets stuck before completing the tour. The knight ends up in a dead-end after only 60-ish moves, unable to legally finish the tour.
Why does it fail? Because when multiple candidate squares have equal minimal onward moves, the rule just picks one arbitrarily.
If your tie-breaking is dumb (say, you always pick the first one in the list), you might:
Burn the escape routes early
Leave an isolated square thatâs now unreachable
So even though each step looks optimal locally, the knight unknowingly walks into a trap.
If this makes sense....?

















