- Education and Science
My Kingdom for a Horse
My kingdom for a horse
Seeking mental stimulation but bereft of a human opponent, I decided to challenge the computer to a game of chess and, in a fit of hubris, I set the difficulty level to 8 out of a maximum 10.
After a considerable number of definitive defeats, (oh hell, I now admit the computer figuratively pummelled me without shame!), I sheepishly rolled back the clock and started at level 1. But I am now proud to boast that my play status is a respectable level 5.
During these dalliances I reflected upon the manner in which the knight moves. This triggered my memory of the well known problem:
Can a knight visit every square on the chess board exactly once?
Of course, it has been shown that an (infinite?) number of solutions exist, one of these being the following, shown in the diagram, below left.
After reviewing the literature I was impressed by Warnsdorf’s algorithm. It directs that the knight’s next position is to a square from which the minimum possible number of moves can be made.
For instance, suppose the knight starts in the position shown in red in the first diagram below right.
There are three possible squares (labelled 3, 5 and 7) it can jump to as its second move. Which one should it be?
The square numbered 3 means from that position the knight can move to one of three available squares, A, B or C. From the square numbered 7, there are 7 possible locations the knight can move to, and so on.
The strategy is to choose the lowest value, since it represents the “harder to reach” square from all the available ones. In this example, it is easier for the night to reach the “7” square than to reach the “5” square or the “3” square.
I, just as many others have done before, successfully created computer code to solve the problem, incorporating Warnsdorf’s heuristic approach.
It has not made me a better chess player, but it has forged a stronger bond between me and the knight. In fact, it is so strong that I now refuse to sacrifice the piece during a game, even if by doing so will assure me victory!
Oh, well, c’est la guerre.