CS340    Project 4 - Wumpus Agent Part I

 

For the first part of the wumpus project you will need to write the knowledge-base for your wumpus agent. The class DefaultWumpusLogic contains this knowledge-base. Create your own wumpus logic class with your own name. You will need to complete the makeKB() method which tells the knowledge-base the horn clauses that it will need to determine where the pits and wumpuses (wumpi ??) are located. I have provided a few helpful horn clauses already.

 

The neighbor($x1,$y1,$x2,$y2) predicate will be true if cell ($x1,$y1) is a neighbor of cell ($x2,$y2) in the grid. I also have written predicates "same", "otherneighbor", "allothersWfree" and "allothersPfree" and you can figure out yourself what these predicates do. The knowledge-base is also told the values of predicates "smell", "breeze", "nosmell", and "nobreeze" when percept information is added. For example, if the agent detects a smell at cell (1,4) then smell(1,4) will be added to the knowledge-base.

 

You will need to write the predicates wOK, w?, w!, pOK, p?, p!. For example, w!($x,$y) will be true iff the cell ($x,$y) definitely contains a wumpus. The predicate w?($x,$y) is true iff the cell ($x,$y) may possibly contain a wumpus. The predicate wOK($x,$y) is true iff the cell($x,$y) definitely does not contain a wumpus.

 

You can test out your knowledge-base by modifying the Logic Testing Agent to use your logic class in the AI program. Run the Logic Testing Agent to see what deductions it is making. Test it using the wumpus world from pp238-239 in the text (logictest.ww) and others of your devising.

 

When you are satisfied with your code, e-mail your source code file to me.