Problem 3.3
Note: I reserve the right to make changes to the following,
particularly if I see a student solution I like better than one of my own (I'll
be sure to cite).
- Find a telephone number
- initial state: Telephone number unknown, name and city known
- goal test: city matches Alameda, name matches Mr. Jimwill Zollicoffer
(this implies a state description that includes slots for city, name, and
telephone number)
- operators: Two possible solutions: One is to forget that we know
things are alphabetic, and simply begin at the first directory and discard
directories until we find the appropriate city, then begin at the start of
the Alameda directory and work our way through to Zollicoffer. The
second is to take the alphabetical ordering as a heuristic and begin
at the start of the telephone directories (Alameda should be near the start)
and the end of the Alameda directory (Zollicoffer should be near the end)
- path cost: Number of non-Alameda directories we look at + number of names
we look at.
- Having forgotten Jimwill's last name
- initial state: same
- goal test: same
- operators: sequential search in the Alameda directory
- path cost: same
- Lost, looking for the ocean
- initial state: Lost, a stream is nearby.
- goal test: An ocean is nearby
- operators: Walk, following the stream (notice that this is a
heuristic search, and may not lead to a solution (it may lead to a lake
instead). Additional operators may include a river boat or a canoe.
- path cost: distance for walking. Distance plus the cost of
transportation for canoes and riverboats.
- Four-coloring
- initial state: An uncolored graph
- goal test: A correctly 4-colored graph
- operators: Find an uncolored vertex. For that vertex, find a
color (in the four we have chosen) not coloring an adjacent vertex. If
possible, color the vertex. If not possible, backtrack.
- path cost: Number of nodes visited (including re-visits).
- Monkey and banana: (an old OPS5 problem).
- initial state: As described
- goal test: has(monkey, bananas)
- operators: (1) move crate (2) monkey moves (a precondition to the
first operator will be that the monkey is at the crate, for example) (3)
monkey climbs (on crate), (4) monkey grabs
- path cost: Number of moves made
- Find a drug store
- initial state: at some place in town
- goal test: at drugstore
- operators: Walk. For uninformed search, walk streets in some
systematic way, changing path when you hit the end of town. A
heuristic search would use the fact that in most small towns the drug store
is either on main street, or within a block of main street.
- path cost: distance