Implementation of knight’s tour problem using Warnsdorff's rule with JavaFX
Given an 8x8 board with the knight placed on one of the empty blocks of the board. Moving according to the rules of chess, the knight must visit each square exactly once.
The rule of Warnsdorff is a heuristic for finding a single knight's tour. The knight is always moved to the square from which the knight will have the fewest further moves. We don't count steps that return to a square that has previously been visited when calculating the number of onward moves for each candidate square. It is possible to have two or more choices for which the number of onward moves is equal.