CS 3361: Introduction to Artificial Intelligence
Winter 1998

Georgia Institute of Technology
College of Computing

Assignment 3: Multi-Strategy Route Planning

Due by Thursday, February 19, 1998 at 3pm.

Due by Tuesday, February 24, 1998 at 3pm.

The purpose of this assignment is to introduce more aspects of the case-based reasoning paradigm. So far, you have dealt with three aspects:

  1. Storage
  2. Retrieval
  3. Adaptation

This assignment shall introduce additional concepts in CBR:

  1. Strategy selection
  2. Repair
  3. Utility

These ideas are present in most CBR systems in some form.

Your task will be to extend the program from assignment 2 to include these new concepts. The finished program ought to be able to do:

Retrieval
Match the new path request with the existing cases in memory, and pick the best one(s), based on the quality of match and the case's utility.
Strategy selection
Decide on a method for constructing the path from the source to the destination. For this program you will either choose to adapt (one of) the retrieved case(s) or do search.
Adaptation
Adapt the selected case to take you from the source to the destination.
Evaluate and repair
Modify the constructed path (if necessary) to improve the quality of the solution.
Store
Store the current path as a case in case memory, and update the utility of the case in memory.

Overall Task

You should write one high level function called ms-go-from-to. (ms stands for multi-strategy.) This function will take three arguments - a start intersection, a goal intersection and a keyword argument. The keyword argument takes one of the following values:

:learn
The program stores new cases into memory, and updates utility scores when needed.
:test
The program does not learn any new cases, or update any of the utility scores.

The structure of cases must also be modified. They now must have at least three parts:

An index
The (start-intersection goal-intersection) pair that is used for retrieving a case.
The path
The path for getting from the start intersection to the goal intersection.
The utility
A numerical value that indicates the usefulness of the case. It shall summarize how useful the case has been in going from the start to the goal in the past.

A Word about Utility

Utility, as presented in this assignment, is intended to be a measure of the usefulness of a case, a case being a particular route. We would like it to capture some intuition of how useful a street is in getting from one point on the map to another. The motivation behind including a utility value for the cases is to capture the situation where a person picks his or her favorite street or path as a means for exploring some new area. Imagine you have just moved to a new neighborhood. Initially, you know nothing about navigating its streets. You start building a case memory of places you have been to, and over time develop a preference for some street or route in the neighborhood. You tend to use this path as a reference for navigating through still unknown parts of the neighborhood. In time, your case memory becomes rich enough that the usefulness of this path dwindles. Can a simple utility score attached to the cases in memory capture this complex phenomenon?

The utility scores would find use in picking the best case in the retrieval process. Maintaining utility can be as complex as you choose to make it. The following is a simple example, the minimum we would expect in the program you write. When a new case is constructed, assign it a utility of 1. Each time the case is used, it's utility must be updated based on how well it performed. If a path could be constructed that did not involve very much adaptation and/or repair, increase the utility by, say, 10%. If on the other hand the case went through extensive repair, decrease the utility of the case by, say, 10%.

Another reason utility scores (or some other type of measure) is often attached to cases because of the so-called utility problem in case-based reasoning. The case base grows to the point where searching through and selecting a good case becomes extremely inefficient and tedious. This might occur in this path planning program as well. Consider the situation where you have travelled to almost every intersection on the map from 10th and Atlantic. Then, given a goal intersection starting from 10th and Atlantic, searching for the right case might take time comparable to doing a BFS. It is an empirical question whether the utility scores as used in this assignment can help with such a situation.

Retrieval

The task of retrieval is to locate the most appropriate case in memory. In the last program, the retrieval process involved picking the best case given some start intersection and some goal intersection. In addition, you will now have to consider how you ought to use the utility score in conjunction with the match quality to pick the best case to adapt. The task of the sub-modules thus becomes:

Retriever
The retriever will take a memory probe. A memory probe is simply the information needed to retrieve a case. For our purposes:
memory-probe = an initial-state/goal-state pair
The retriever must search through the memory and apply the matcher to see if that probe matches the indexes. It should collect all of these matches and send them to the selector.
Selector
The selector will then pick one of those retrieved cases and return it. It should take into account both the quality of the match and the utility of the retrieved case while choosing the best. There are a number of ways in which the overall quality might be determined. A simple strategy might be to first select the cases that match most closely with the probe, and then select the case with the highest utility among them.
Matcher
The matcher must determine if a probe matches an index. The matcher should be able to find not only exact matches, but also partial matches. Examples:
Matching initial states:
((street1 street2) (street3 street4)) almost matches
((street1 street2) (street3 street6))
Matching goal states:
((street1 street2) (street3 street4)) almost matches
((street5 street6) (street3 street4))
Matching partial intersections:
((street1 street2) (street3 street4)) almost matches
((street1 street3) (street3 street6))
For this case there are a number of possibilities. You may want to require that 2 out of 4 streets match.

Strategy Selection

The planner currently goes through a relatively trivial process while deciding which strategy to use. In this assignment, you will decide on some criteria that will determine the strategy to use. You have two strategies available - search and case-based reasoning. The choice of which strategy to use ought to depend on the quality of the case retrieved. The selection of strategy itself ought to be encoded as a set of rules. The format of the rules would depend on the manner in which you choose to combine the result of the matcher with the case's utility. Some sample rules are given below, based on the combination technique introduced while discussing the selector in the retrieval module.

Adaptation

Adaptation in this assignment is identical to that in assignment 2. To reiterate, once you have retrieved and selected a case, the next step is to adapt that case to fit your current problem. The adaptation module should take the retrieved case and adapt it to solve the problem. In this assignment:

Assuming that the retrieval module has found a case that gives a partial solution to the problem, the adaptation module must complete the solution for the problem. Note that a part of a problem can itself be looked upon as an independent problem.

Evaluation and Repair

You will have noticed that the cases built using the case-based strategy can be far from optimal. The task of detecting errors in the solution constructed is called evaluation, while repair is the process of correcting those errors. These tasks are sometimes independent, but in this problem you will find that the two are closely associated. Hence they have been included under a single module.

Evaluation consists of eliminating unnecessary steps in the solution produced. (This is also probably the best place to evaluate the performance of the case in the quality of the path it produced.) There are two types of optimization opportunities that must be tested:

  1. Check for cycles in the solution produced.
  2. Check for near cycles in the solution produced, where a near cycle is two intersections that appear on the same street, and the path does not follow the street. Below is an example.

Near cycle example

Repair consists of eliminating the cycles and near cycles.

Storage

Storage must add the new path to the case-base, just as in the previous assignments. The minimal structure of a case has been described earlier.

Choosing Experiments

This assignment requires significant changes to the existing program. Each of these changes can be done in a number of different ways. We also end up with a correspondingly large number of design decisions to make, each of which can be turned into an experiment. It is extremely easy to get overwhelmed by the number of choices available. Therefore, it will be necessary for you to select a small set of choices to concentrate your efforts on.

In other words, select a single topic as your focus. An example might be the task of efficiently managing the cases in case memory. (This is only an example. The assignment does not have that many choices to be made about the manner in which storage works.) Your experiments would then all be focused on design choices that effect storage. This will help you think about one aspect of this problem, and learn more about it.

Hints and Suggestions

There is a significant new constraint imposed on the representation used. Pay careful attention to it. There is also a significant amount of programming to do in this assignment. First complete the minimal requirements of the program, then begin experimenting.

What to Turn In

Stage 1: Run the following tests on your program:

  1. Your documented source code, without modifications for running experiments.
  2. Seed the case-memory with the following cases, using ms-go-from-to in learn mode:
    1. ((10th atlantic) (north-avenue techwood))
    2. ((10th atlantic) (10th fowler-1))
    3. ((5th Plum) (north-avenue cherry))
    4. ((Ferst-1 State) (north-avenue tech-parkway))
    5. ((north-avenue williams) (10th curran))
    6. ((10th fowler-1) (ferst-3 cherry))
    7. ((8th-2 atlantic) (3rd cherry))
    8. ((3rd brittany) (4th brittany))
    9. ((10th hemphill) (6th-1 curran))
  3. Next run your program with the following inputs in test mode, and turn in the results of the searches:
    1. ((10th atlantic) (north-avenue williams))
    2. ((10th atlantic) (5th techwood))
    3. ((5th Fowler-1) (north-avenue cherry))
    4. ((Ferst-1 State) (4th Atlantic))
    5. ((5th Techwood) (north-avenue tech-parkway))
    6. ((6th-1 McMillan) (8th-1 Hemphill))
    7. ((8th-2 atlantic) (ferst-3 cherry))
    8. ((3rd brittany) (4th fowler-2))
    9. ((10th mcmillan) (6th-1 ferst-2))
  4. Turn in a print out of the case memory as it stands at the end of the tests.
  5. Discuss what impact the new additions - strategy selection, evaluation and repair, and utility - have on the quality of solutions generated and the time taken.

Stage 2: Select some aspect of the program to study, and design experiments that study the effects of various tradeoffs in the design on that aspect. Emphasize the aspect you have chosen in your writeup! Talk about why the aspect you have chosen is significant to the program, and discuss how the experiments relate to that aspect.


Todd Griffith (griffith@cc.gatech.edu)