University of Washington, Bothell
CSS 482: Expert Systems
Winter 2009
Homeworks 6a & 6b: Intelligent Agents
Assigned: Thursday, November 18, 2010
Homework 6a Due: Sunday, November 28, 2010
Homework 6b Due: Friday, December 3, 2010

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 download the contents of this directory as jesswumpus.zip). See jesswumpus/report.doc and jesswumpus/README.txt for documentation. You can choose between running the client as a Jess program that uses Java to communicate with the server or as a Java program that uses an embedded Jess Rete engine to provide player logic.

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.clp 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. Look at the Jess-embedded/Player.java file. It provides a replacement for the wclient/Player.java file that uses a Rete object to generate moves.
  4. 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.
  5. Modify either JessClient.clp or Jess-embedded/Player.java (adding a .clp rule file with the latter), replacing the fixed strategy with a more intelligent strategy of your own devising.

Homework 6a

Your goal for homework 6a is to create a player that can navigate safely through the Wumpus World, explore it thoroughly, and exit. 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. 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 the Wumpus World with an arbitrary map and no Wumpus and can exit. Point breakdown:

50 points
Navigate safely, i.e., without dying in a pit.
30 points
Explores intelligently, 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.
20 points
Exits.

The competition is for extra credit. In this case, scoring will be based not on the “standard” point system, but rather the formula:

locationsexplored2
---movesmade----
(1)

Exiting the cave will be used as a tie-breaker. The top player will get 20 points, second place will get 10 points, and third place will get 5 points.

Homework 6b

For homework 6b, you are asked to extend your player’s logic to include avoiding the Wumpus, killing the Wumpus, and gathering gold. 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
Exits with gold..
30 points
Navigates safely, i.e., without dying in a pit or from a Wumpus.
30 points
Explores intelligently, 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.
10 point bonus
Kills the Wumpus.

The competition is for extra credit, with “standard” Wumpus World scoring. The top player will get 20 points, second place will get 10 points, and third place will get 5 points.