CSci 431

Exercise set #4

Due:  Wednesday,Nov. 10


Please work problem 4.10 on page 135  of the textbook.  Please call your program astar.cl and place it in your handins folder.  Your program should include the basic A* search for the 9's puzzle using the two heuristic functions described in the text together with h(node) = 0 (uniform search).  In the comments at the top of your program, please list, for each heuristic function (including h = 0), the length of the final solution and the number of states visited (you can do this by adding the number of nodes on the *open* and *closed* lists).

Please test your programs with the following array

4 1 3
B 2 5
7 8 6

With the goal state as below: (5 moves, I think)

1 2 3
4 5 6
7 8 B


Any questions? Please ask!