Program 3: Search Methods

Test Data

Due Date

This assignment is due at the beginning of the lecture on Friday, November 12th.

Partners

You may work with (at most) one other person on this assignment. If you work with a partner, submit one solution with both of your names on it.

General Requirements

The implementation must be in Common Lisp and/or CLOS.

Driving in New Zealand

In this assignment, the goal is to find driving routes between pairs of New Zealand cities. Each city is given in terms of X and Y coordinates. We are also given information describing which cities have roads between them. The original data set comes to us compliments of Professor Ken Hawick of Massey University in New Zealand.

Remember the functions from the text:

Data Files

Part I

Implement each of the search algorithms below. Use the A* framework so that each search has the same architecture.

Use the Euclidean distance for h(n). Use the Euclidean distance for the roads traversed for g(n).

Part II

Repeat the searches in Part I. This time, use the Euclidean distance multiplied by the average toll rate for h(n) and use the Euclidean distance multiplied by the actual toll rate for g(n).

Hints

Required Function

Write a function that has the template (test-all city-1 city-2) The function should conduct eight searches: the four searches described in Part I and the four searches described in part II.

Required Output

For each algorithm, print the following in a readable format:

What to Submit

  1. A printout of the source code that you produce.
  2. A printout of your program running on the data file for these city pairs:
  3. An e-mail of your solution to John at paxton@cs.montana.edu on or before Friday, November 12th at noon.

Grading

Valid XHTML 1.0!