To get started, you should look at the file "log", which shows two runs. One is a run on the problem in the file "testProb.pl" and the other is a run on all the problems in "ten.pl". At the top of the log file is the banner printed out by my version of SWI-Prolog. The lines beginning with "?-" show my input. My first input is "[load].", which causes all of the program files to be loaded. My next input is "runAllProblems(testProb, _).", which runs iterative deepening search for the eight-puzzle problem whose initial state is in the file "testProb.pl". runAllProblems prints out: 1. The initial state, which has the format where the last digit is the contents of the last location in the puzzle, and the first digit is either the contents of the first or the second location depending on whether there are nine or eight digits in the state respectively (leading zeroes are not printed so if the blank is in the first location, the state will print out as 8 digits. 2. After the state is printed out, the number of nodes generated and expanded for the next to last level are printed out. These are the numbers that are important for us. 3. After that is a note of the last level being explored (where the optimal solution is) and the number of nodes generated and expanded on that level, which only counts nodes up to the point of discovering the first optimal solution path. 4. Then a summary of the number of problems solved, the total number of nodes generated over all the problems, and the average number of nodes generated per problem. Items 1 -3 are printed out for each problem, and item 4 is only printed out at the end. To change the search to go from having no duplicate state checking at all, to checking for state loops, you will need to add code to idsearch to detect and deal with state loops on the path.