CPE/CSC 480-Fall 2010 Assignment 2: Wumpus World Agent
The goal for this task is to build an agent that can navigate the Wumpus World successfully: It should find a safe path to the gold (if there exists one). Use the characteristics for the Wumpus World as discussed in the class and described in the textbook.
You can make the following assumptions:
  • there is only one Wumpus in the world;
  • the world is a rectangular grid, and your agent knows this;
  • your agent does not know the dimensions and configuration of the environment;
  • a square may contain only one entity (e.g. pit, wumpus, gold).
An important aspect of this task is the representation of the knowledge the agent has (e.g. the state of the Wumpus World), and the reasoning the agent performs in order to decide about the safety or risk of squares. It is also advisable for your agent to indicate its internal world model to the user. This could be an additional display showing the agent's knowledge of the Wumpus World at a particular point, or a text-based printout of the current status.
There is a modified version of the BotEnvironment for the Wumpus World task; please check Blackboard for the latest version. Please note that this version provides an infinite supply of arrows to your agent, in contrast to the limit of one arrow in the original description.
This task is to be performed in two parts. In the first part, you determine the methods and techniques you use for the representation of knowledge about the Wumpus World and for reasoning, e.g. about the properties of the squares, or the location of the wumpus. The second part is the actual implementation.
Part 1: Knowledge Representation and Reasoning
Describe the knowledge representation and reasoning methods that you are planning to use for this assignment. Knowledge representation relates directly to the data structures you use. To determine a suitable set of data structures, you need to take into consideration the main entities, their properties, what the agent needs to know about them, and how the actions of the agents affect the environment. The reasoning mechanism is to some degree dependent on the data structures chosen for knowledge representation. Here you should consider the combination of existing knowledge into new knowledge (e.g. properties of locations that your agent can deduce from known properties of other locations), the progress of the agent towards a goal through sequences of actions, and the making of decisions on which action to choose.
Part 1 Grading
We will use the following grading guidelines for Part 1:
  • 5 points: Knowledge representation
  • 5 points: Reasoning abilities of the agent
Part 1 Submission
This assignment must be submitted electronically via a Web form.
Part 2: Going for the Gold
Based on your first part, the agent now has to find a path to the square with the gold, and pick up the gold. Your agent needs to determine the properties of a given square, based on the direct information received from the environment, and on previously gathered information. So for each of the adjacent squares of the current square the agent should determine the following conditions:
is safe (empty)
[E]
contains an obstacle (including walls)
[X]
may contain a pit (possibly with a risk factor)
[P? 0.9]
is known to contain a pit
[P!]
may contain the Wumpus (possibly with a risk factor)
[W? 0.9]
is known to contain the Wumpus
[W!]
contains the gold
[G]
Agent Performance
Note: Some specific aspects of the calculations in this section may have to be adapted to fit the WumpusEnvironment.
The performance of the agent is scored as follows:
P(A) = Life-Points - Search-Cost - Path-Cost + Gold-Value
The agent has 10,000 life points to start with. If the agent encounters a Wumpus minion, it loses 1,000 life points. Finding the gold adds 10,000 points to the agent's performance score. The overall score of the agent at the end of the game will be used to judge its performance.
The life span of an agent is affected by the following events:
  • If the agent's life goes down to zero, it dies.
  • If the agent falls into a pit, it dies.
  • If the agent enters a square occupied by the Wumpus, the agent dies.
  • If the agent dies or finds the gold, the game is over.
The search costs for the agent are similar to the ones for the previous assignment:
  • 1 for each interaction with the manager (e.g. for each query about a location, and for each update from the agent to the environment)
  • 5 for each hint from the manager
The path costs for the agent are:
  • 20 for a move from one location to the location in front of the agent
  • 10 for a turn action
In this task, the agent needs to perform its activities in an online mode: It can only detect the properties of a location once it is there. While it would be nice for the agent to explore the cave from the safety of its home base and then simply take the safe route to the gold (if there is one), it would diminish the purpose of the game.
The configuration for the Wumpus world with the location of the gold, pits, wumpus, and obstacles will be provided through the environment. Your agent is expected to work not only with sample environments, but with any environment that adheres to the Wumpus World specification as provided in the textbook and in the description of this assignment.

Part 2 Grading


We will use the following grading guidelines for Part 2:
  • 10 points: Successful completion of the task
  • 10 points: Performance of the agent
  • 3 points for the README file and documentation of the source code
Part 2 Submission
Part 2 of this assignment must be submitted electronically via the Blackboard assignment submission feature. You need to submit the following items:
  • a plain text file (not a MS Word document) named README.txt with your name, a brief explanation of your program, and instructions for running your program
  • the Java source code for your agents
  • the Java executable (class file) for your agents
  • screen shots for the "Challenge Map" and the "Wumpus Map"; the screen shots should show both the fairy and the agent view, and the final score; use names that indicate the respective map (e.g. fkurfess-Challenge-results.png
  • log files that capture the performance of your agent on the maps provided; please save them as plain text files, and use names that indicate the respective map (e.g. fkurfess-Challenge-results.txt)
  • optionally additional files that may be relevant for the grading (e.g. make files, or special environments you used)
Naming Conventions
Please use your Cal Poly login as the first part of your agent's name, and an indication of the agent type as the second. For example, my agent would be something like fkurfess-wumpus-hunter.
Practical Aspects and Questions about the Assignment
You can find information about the use of the WumpusEnvironment in the Wumpus World tutorial at http://www.csc.calpoly.edu/~fkurfess/Courses/480/F09/Assignments/Wumpus-World-Tutorial.html. This file also comes with the WumpusEnvironment distribution.
Since there still might be some adjustments to the
BotEnvironment, please check the Blackboard Discussion Forum for additional information.
If you have general questions or comments concerning the programming aspects of the homework, also post them on the Blackboard Discussion Forum for the assignment. The grader and I will check that forum on a regular basis, and try to answer your questions. We also welcome suggestions for improvements, although we can't promise that they will be put into place for this quarter.
Collaboration
This is a "pair" assignment, and you can either do it individually, or together with one other student. Each pair must figure out and formulate their own answers, and run their own experiments. It is fine with me to discuss general aspects of this lab with others (e.g. general aspects of the different search methods investigated ).
Questions about the Assignment
If you have questions or comments concerning the programming aspects of the lab, post them on the Blackboard Discussion Forum for the lab. The grader and I will check that forum on a regular basis, and try to answer your questions. I’m using a subscription to the forum, so I get an email whenever somebody creates a post.
Extra Credit Opportunities
Listed below are a few options for extra credit, up to a maximum of 40 points in total (instead of 33) for this assignment.
Early Submission
If you submit both parts of the assignment within the deadline for the first part, you can earn an extra credit of up to 5 points.
Suggestions for Improvements
Extra credit of up to five points will be given for significant suggestions to improve the overall usability of the BotEnvironment for the Wumpus World problem. Please identify concrete aspects for improvements; generic statements like "less buggy" or "better GUI" won't qualify.
Wumpus World Enhancements
The current Wumpus World environment has a number of limitations. If you're interested in making enhancements, contact me or the grader with your ideas. Some possibilities are better artwork, different topologies such as three-dimensional caves or a graph with varying numbers of adjacent rooms, a moving Wumpus, or additional types of obstacles and cave dwellers.
Wumpus World Team Option
If you want to tackle a more challenging problem, you can also team up with a class mate and implement a version with multiple agents and wumpuses, or where both the agent and the wumpus can move. In this case it is advisable to slightly modify the rules in order to increase the chances for the agent. For example, the smell of the wumpus could be perceivable from a larger distance, and stronger in the adjacent squares. You could also give the agent the capability to shoot more than one arrow, but with a significant cost for each shot.
Make sure to describe your modified rules and regulations for the Wumpus World in the README or a help file.