University of Washington, Bothell
CSS 482: Expert Systems
Winter 2009
Expert System 4: Agents and Jess
Assigned: Monday, March 2, 2009
Due: Wednesday, March 11, 2009

For this homework, you will be creating a JESS intelligent agent: an expert on making decisions to accomplish some specific task. In this case, the task is to navigate through the Wumpus World, picking up gold, avoiding dangers, and (possibly) shooting the Wumpus. As described in class, the Wumpus World is a 2D rectangular grid of locations, with each location possibly containing a pit, a Wumpus, gold, or a wall. Entering a location with a pit or Wumpus results in instant death. The goal of the game is to have your agent enter the Wumpus World, grab some gold, and get out. Here is an simple example of a Wumpus World configuration:

PIC

The overall system that you will be programming for is a client/server application that implements a multiplayer Wumpus World game. You will write your JESS program so that it uses provided classes to establish a network connection to the server and communicate with the server. The code you need (and all of documentation that is available) is in the ../jesswumpus directory (you can also access the contents of this directory as ../jesswumpus.zip). See ../jesswumpus/report.doc and ../jesswumpus/src/README.txt for documentation and ../jesswumpus/src for the source code (especially ../jesswumpus/src/JessClient.jess for the JESS-specific boilerplate code). You can run the server on the same machine as the client; the client ?*hostname* global controls the machine to connect to.

From a practical point of view, you will need to do the following:

  1. Look at the wclient.GameClient and wclient.Player classes. These classes form the basis of a standalone Java client that executes a fixed sequence of moves.
  2. Look at the JessClient.jess file. It was written to mirror the Java code, creating a GUI using the wclient.* frame classes, creating a communication link with the Communicator class, and using a shadow fact to mirror the PerceptKeeperBean class to transfer information through the communication link. It then implements the same fixed sequence of moves as the Java player.
  3. Verify that you can run the server and run the Java client and that the client connects to the server and everything works right when you click “start” on the server GUI.
  4. Repeat the above with JessClient.jess.
  5. Modify JessClient.jess, replacing the fixed strategy with a more intelligent strategy of your own devising. You might want to start with a player that only reacts to local information and focus on reasoning about nearby locations to determine which are safe. Then you might extend that with exploration capabilities, etc. Finally, you might implement a goal-directed strategy like the one described in class for the standalone JESS Wumpus game.

Be ready for a multiplayer tournament in class! We will find out who has the best player. Remember, your player needs to accomplish its goals efficiently and exit the caves to win.

Coding Standards

Your code should be easy to read and understand. Use consistent indentation. Each file should start with a comment that includes the file name, your name, the date and a summary of the file purpose/contents. Each deftemplate, defrule, etc. should have a useful comment string and comments indicating what each slot means. The gist of your written documentation should be included in comments in your file(s).

Grading Scheme

There are a total of 100 points available in this assignment. You can get full credit if your player has the ability to wander around a Wumpus World with an arbitrary map and a fixed (i.e., not moving) Wumpus and can exit with at least some gold. Point breakdown:

10 points
Picks up gold.
30 points
Exit cave.
30 points
Can navigate safely, i.e., without dying from a pit or Wumpus.
30 points
Can navigate a cave without any hazards, i.e., doesn’t use a fixed sequence of moves and doesn’t fall into a trivial loop of activity, but rather systematically explores much of a cave.

The competition is for extra credit. Specifically, the top player will get 25 points, second place will get 15 points, and third place will get 10 points.