CS440: Assignment #6
Assigned Oct. 3rd
Due 12:30, Oct. 17th
A* Search---Programming Assignment
Complete the following tasks. Use the code in ~cs440/96/hw6-start.lisp as a starting place.
- Implement A* search for searching trees. Do not use Russell's code.
- Add a counter that counts the number of nodes expanded and prints this
number when the search concludes.
- Use your A* code to solve the two-jugs problem discussed in class.
- Solve the jugs problem these four ways by specifying h and
g:
- uniform-cost search
- limited depth-first search (can do this by setting cost very high once
it hits the limit)
- A* using h1, a heurisitic function given in class
- A* using h2, a second heuristic function given in class
- Write a lisp function that returns the effective branching factor, given
the number of nodes expanded and the depth of the goal (number of states in
the solution path).
- Calculate the effective branching factor for the jugs problem solved
using the four ways listed above.
- Write the code needed by your A* code to solve the maze problem discussed
in class, using the given start and goal states and the placement of walls.
- Write a function as described in class to display the maze and the
solution path.
- Using the results of the previous two items, find the shortest path and
display it.
- Now do this again, but find the solution path with the fewest number of
direction changes, by changing the action cost function.
Please turn in printouts of your lisp code and examples of your code running
correctly. Also, type or write neatly an explanation of your lisp code. You
must write at least one sentence for each lisp function you write and more
than one sentence for long functions that cannot be cleary explained in one
sentence. Please put your name and student number at the top of the first page
and staple multiple pages together.
Also, e-mail to me a single file that contains everything
needed to complete the items requested above. Be sure to include calls to
your functions for solving the problems. I will run these myself to check that
they actually run. Be sure you check your file first before you e-mail it to
me.