Knight Tour Problem

Homework 9

Write PROLOG code to solve the full 8 x 8 knights’ tour problem. Use the production system architecture proposed in this chapter and Chapter 6. Instead of square numbers of 1 to 64, use the pair of row and column numbers to indicate each square. Create the code so that you can get the program to solve a number of different tasks, such as getting from any one square to another.

a. Execute this code and draw a graph of the search space.

b. Alter the rule ordering to produce alternative solution paths. Reverse the order of the moves.

To run the code type

knight.

path