This document discusses the Knight's Tour problem in chess and two algorithms for solving it: a neural network approach and Warnsdorff's algorithm. It explains that the Knight's Tour problem involves finding a path for a knight to visit every square on a chessboard exactly once. It then summarizes that Warnsdorff's algorithm, which selects the next square with the fewest available future moves, is simpler and faster than the neural network approach and always produces a closed tour, making it a better solution to the Knight's Tour problem.
What is ‘Knight’sTour’?Chess problem involving a knightStart on a random squareVisit each square exactly ONCE according to rulesTour called closed, if ending square is same as the starting
5.
ConstraintsA closed knight’stour is always possible on an m x n chessboard, unless: m and n are both odd, but not 1 m is either 1, 2 or 4 m = 3, and n is either 4, 6 or 8
Knight moves eitherfrom black square to white, or vice versaIn closed tour knight visits even squaresIf m and n are odd i.e. 3x3, total squares are odd so tour doesn`t exist
for m =1 or 2, knight will not be able to reach every squarefor m = 4, the alternate pattern of white and black square is not followed so tour not closed
Neural Network SolutionsEverymove represented by neuronEach neuron initialized to be active or inactive ( 1 or 0 )Each neuron having state function initialized to 0
Series oftwo or more open toursWarnsdorff's AlgorithmHeuristic MethodEach move made to the square from which no. of subsequent moves is least
17.
Warnsdorff's Algorithm (contd.)SetP to be a random initial position on the boardMark the board at P with the move number "1" For each move number from 2 to the number of squares on the board:Let S be the set of positions accessible from the input position
18.
Set P tobe the position in S with minimum accessibility
19.
Mark the boardat P with the current move numberReturn the marked board – each square will be marked with the move number on which it is visited.
20.
ComparisonNeural networksWarnsdorff's AlgorithmComplex algorithm (a lot of variables to be monitored)Longer run-timeNOT always gives a complete tourSimple algorithmLinear run-timeAlways gives a CLOSED tour