Reading: Chapter 8 from Russel and Norvig. For this chapter, you are only responsible for the concepts, not the technical content. Sections 8.3 and 8.5 are optional.
"Maintaining Knowledge about Temporal Intervals" by J.F. Allen.
Section 5 is optional, but why not at least read the first paragraph
since that section does something pretty clever? Also, Section 7 is
optional, but why not skim it; it can give you ideas for part III
below. There are a couple errors in the constraint propogation
algorithm in this paper. In, "If R(k,i) is a proper subset of N(k,i)
then add
See
http://www.columbia.edu/~cs4721/ for the transitivity
table in Java, or email Jeff for it in another programming language.
Your system should implement the following simple text-based I/O format:
"INTERVAL-VARIABLE (CONSTRAINTS) INTERVAL-VARIABLE". For
example, given "x (> m) y" and "y (>) z", one of
the things it will output is "x (>) z".
You can have a menu mode in which you keep
adding new constraints and can ask it to spill its
guts whenever it wants, and/or you can have
a command-line mode where it takes a set of
constraints as standard input and then dumps
the resulting network.
Actually, you can provide the 2D adjacency matrix or an adjacency list
as a more concise form of output.
You'll need at least the following data structures (or classes):
Select one of the following toy problems to represent
as temporal constraints, and use it to
test your system. You can make slight variations
to the one you choose, or expand it if you like.
Show your system working on the example, and
also provide the semantics between each inputted constraint,
and your semantic interpretation of the resulting inferences.
Actually, you may work together on
the construction of such example inputs,
and you may share them across the class.
Woody Allen stated the following observation
regarding humanity. "Why does man kill? He
kills for food. But not only food. Often, there
must be a beverage."
In total there are at least the following
foods to be eaten: apple, beverage, tuna, main
course, and dessert.
Take note, there are other intervals in this
problem other than the eating of each food item.
Assume there are, e.g., 3 planes and 5 cities. The system's
is to compute the iteneraries of the planes for a given day.
The input is the customer requests pertaining to that day.
Each customer request indicates where to and from,
and requests which part of the day: early, mid or late.
The customer understands that they may not get their
first choice on time of day.
Assume that the flight of one plane between two cities serves
exactly one customer request (i.e., you can't
fit more than one customer into the plane), or
assume the alternative possibility; make your
assumption explicit.
Your system needs to find a mapping of planes to
requests, and the day's itinerary of each plane.
Note that once you have mapped planes to requests,
this manifests as a series of temporal constraints, e.g.,
early-day flights must come before mid-day flights.
Hint: Have early-day, mid-day and late-day be temporal intervals.
Since your system does not deal with constraints
between interval durations,
some constraints that are not
handled by the temporal system must be checked
after the temporal system has done its thang.
For example, a plane can do
no more than 3 flights per one third of a day.
Also, at some airports, if you have more than one
plane on the ground at once, a new interval
must be asserted -- a time delay (equal to
one flight) for food and fuel service) for one of
the planes.
If the resulting temporal constraints after propogation
are not satisfactory, you system can iterate,
adding constraints (e.g., for a service delay), or
alleviating some constraints, e.g., some
customers won't get the time of day they want.
If a plane will deliver customers from
city A to B, and then C to D, and if B doesn't equal C,
then it must go from B to C in the middle -- add another
interval to the network.
Other constraints iteratively added to the temporal system
include the fact that no two flights can
take off simultaneously or land simultaneously
at the same airport. Let me know if you
think of a couple other such constraints.
Optional: Deal dynamically with unpredictable flite delays.
Note that you will need to generate output plans -- i.e.,
augment the basic reasoner so it can manifest a constraint
network into
a plausable sequence of events.
To decide if plan A subsumes plan B use backtracking search to see if
each actions in plan A can be mapped to a distinct action in plan B such
that every action in plan A subsumes the corresponding action in plan B,
and the temporal constraints between actions in plan A subsume the
corresponding constraints in plan A. Qualitative temporal constraint
subsumption follows from set containment, e.g., "before, during, or
after" subsumes "before or after".
Create a toy example of the magnitude of that from Part II above to
demonstrate this, e.g., cooking.
email: evs at cs dot columbia dot edu
Part I
Part I is TBA. It will have a little reading and a hand-written
question about basic ideas of planning.
Part II
Implement Allen's temporal contraint propogation algorithm.
You must work alone on part II. You are expected
to do this in one week.
Part III
This is the larger part of the homework. You can pair up and work
with a partner for this part. You are to build on top of your system
one of the following. Pick something that interests you. Keep
in mind that you can build further on what you do
here for the final project of the course. In terms
of magnitude, note that your grade for this assignment will
rely twice as much on Part III as on Part II, but
do not get too ambitious -- you should select a 2 week
project here that will not burn you out.
You must supply a 1-2 page writeup describing your project, the
choices you made, the rationale for these choices, and the results.
You also must supply a transcript of its operation. Put it in html
(and link to an applet demo?) if you'd like it to be part of the
growing archives of our course web page.