This project is time-consuming! Start NOW!
To complete the assignment, you should hand in:
To make it easier to collect and manipulate your data, you should write a function that runs you search algorithm and returns a list comprised of the three datum to be collected with each run. Of course, you might want to print out this information in a nice format with each run, too.
The source code for programs in the Russell/Norvig textbook is located in the directory /usr/tools/cse.pub/matt/AIMA-lisp-code/. You should feel free to browse through the source code there, taking what you need for theassignment.
Speaking of which, you should copy the file search-setup.lisp into your directory (just follow the link here and copy & paste). You should load this file whenever you first start lisp with the intention of doing this assignment! Also, examine the contents of that file for many helpful hints as to how to do your assignment.
Ths file search-setup.lisp (above) was modified on 10/29/96 to accomdate new system software. (Basically, a change in the subdirectory structure on the departmental machines.) Please get a new copy of it if your copy is out of date.
As you examine search-setup.lisp you should see how you can go about generating your 40 problem instances [look in puzzle8.lisp,too.] For determining the number of expansions the occur during a run, refer to the function (see above) PROBLEM-NUM-EXPANDED. As for solution path length, see NODE-G-COST, above. As for easily changing which heuristic function you use, see the argument list of the function 8-PUZZLE-PROBLEM in puzzle8.lisp.
Because most people's programs will run slowly on the departmental workstations, keep the difficult of the problems to be solved reasonable. You can do this by changing the "num-moves" argument to random-8-puzzle-state from 100 to 50, or even 40. The solution paths will be smaller, and the results not so interesting, but you should be able to get your 40 iterations done in a timely fashion. If you are working on a decently powerful machine at home, you can probably relax this restriction to get more interesting results.