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:

  1. You can tell the agent (probably using the assert predicate) where breezes have been detected.
  2. You can ask the agent whether a specific square is safe, doesn't contain a pit.
  3. You can ask the agent whether a specific square is unsafe, it may contain a pit.
  4. You can ask the agent whether a specific square is deadly, it definitely contains a pit.
  5. 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:
  1. A general description of how you program works including the following items:
    1. A description of how rooms are represented, e.g by integer pairs, lists with two elements, each room is uniquely named, etc.
    2. 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.
    3. 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?
  2. A results section. Including,
    1. 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.
    2. A discussion of how the program behaved. Did it have any strengths or weaknesses?
  3. A conclusion section.
  4. Your commented Prolog code.