## CS 5541 Program 3 - Logic in the Wumpus World Due November 19, 200940 points

### Introduction

Various methods exist to infer in propositional logic. These can be used in a variety of ways. In this project we will be working with propositional logic in the Wumpus World. In code that can be found in wumpus-world.zip there is an implementation of the Wumpus World that allows a human user to play the game. In this project you should replace the code for the user to select an action by implementing the code for PL-WUMPUS-AGENT found on page 226 of the textbook. You may make use of the aima-java package that goes with the textbook (you can find a NetBeans version of the code here), which implements much of the propositional logic code discussed in the book.

Once you have the code from PL-WUMPUS-AGENT working implement a second version of the code as described in Exercise 7.15 on page 239.

### Some Implementation Details

The aima-java package contains routines for ask and tell as well as routines to calculate the result of entails. The main questions will be 1) representing the background knowledge of a wumpus world, 2) translating the percepts into further knowledge, 3) representing the fringe list of points, and 4) taking care of the path planning.

Take a look at the routine PLFCEntailsDemo to see an example of how to use the KnowledgeBase and rules in the aima-java code.

To do the path planning you can use a breadth-first rather than A* search. To create the graph simply create a graph consisting of all the visited points connected together logically (based on the actual adjacency). Then add the fringe point you are interested in planning for. The plan for moving to the point should start by figuring out which direction you will need to move, then based on the starting direction do the right sequence of left or right actions, then follow that with a forward action, and repeat until you reach the goal.

### Testing

Show the result of 5 games played with your two wumpus agents. Make sure the initial state is shown. For one game for each agent show the knowledge base at each step.

### What To Hand In

Turn in a commented copy of your code, a discussion of the heuristics you chose, a summary of the results you achieved playing the computer, a discussion of those results and a copy of the example runs of the game.