CS470/570
Artificial Intelligence
Spring 2009
Prolog Assignment
Due: Monday, April 6th
For this project you need to write a Prolog agent to assist
with finding pits and safe squares in the Wumpus World. Based on
information you supply the agent should be able to tell you which
squares definitely don't contain a pit, which squares definitely do
contain a pit, and which squares are indefinite. Note that the agent
does not have to pick your next move, it simply says how safe a move
is. Similarly, you do not have to write a program (Prolog or
otherwise) to play Hunt the Wumpus.
Requirements:
- You can tell the agent (probably using the assert predicate) where
breezes have been detected.
- You can ask the agent whether a specific square is safe,
doesn't contain a pit.
- You can ask the agent whether a specific square is
unsafe, it may contain a pit.
- You can ask the agent whether a specific square is
deadly, it definitely contains a pit.
- The Wumpus World is of indefinite size - you don't need to worry
about boundry conditions.
Hand-In:
You need to hand in a typed write-up containing the following:
- A general description of how you program works including the
following items:
- A description of how rooms are represented, e.g by integer pairs,
lists with two elements, each room is uniquely named, etc.
- A description of the major predicates, what they test, and how
they are used. E.g. explain how to use the program to ask if a room is
safe.
- An explanation of how information is added to the K.B. E.g. how do
you tell the program that a breeze has been detected?
- A results section. Including,
- Samples of the program's output. Show information being added to
the K.B. and queries being asked. You should illustrate the Wumpus
world 'board' that goes with the queries so the reader can easily see
that the program is reponding correctly.
- A discussion of how the program behaved. Did it have any
strengths or weaknesses?
- A conclusion section.
- Your commented Prolog code.