CS370 Program 1 (Due September 13, 2000)
In this assignment, you will design and implement a rule-based agent
for the vacuum-cleaner world. The full vacuum-cleaner world is
described in Chapter 2 problem 2.5. The world has already been
implemented in an extensive package of code described below. You will
need to become familiar with this code during the course as we
will use it and variants of it for subsequent assignments.
1. Assignment
The environment is implemented as an m by n rectangular room
where each square has a 20% chance of containing dirt. Each time an
instance of this environment is created, m and n are
chosen uniformly from the range 8 to 15 inclusive. This means that
the agent will not know the size of the room when it first starts up.
First, implement a purely reactive agent which makes its
decision based only upon the percepts it receives from the
environment. There are random and reactive vacuums in:
~echown/courses/370/java/
See if you can improve upon the average score these agents get.
Then implement an agent with a single internal state that sucks up all
of the dirt, returns to its home position, and shuts off. You will
need to decide what state information the agent needs to maintain.
You are only allowed to use a single int as storage in your
agent class.
There is a simulation control program in the file VacuumRun.java.
To run your own agents just change the agent used from its current
setting (Reactive or RandomAgent) to the name of your agent. You
can also change the world for debugging purposes.
The code is written to make debugging fairly painless. You can
directly manipulate the speed the program runs, pause it, turn
graphics on or off, turn debugging information on or off, etc.
Feel free to rewrite this code to suit your needs, but remember
I will run it on the original when it comes time to do grading.
When you are done make sure you place copies of your agents into
the directory where your completed assignments should reside.
When you have your agent debugged, you should compare its performance
to the reactive agent which is based upon code provided by Russell and
Norvig. Do at least 20 runs and provide the average results.
Please note that it is possible to create fixed environments. These
may be helpful for debugging purposes.
2. What to turn in
You should turn in your code, and a trace
of your agent running on a small (e.g., 4 by 4) environment. Your
code should clearly explain what it is doing. In particular, please
explain the meaning of each of possible values of your state variable.
You should try to get a good score on the performance criterion (which
gives 100 points for each dirt object you vacuum up, -1 point for each
action, and -1000 points if the agent is not in its home location when
it shuts off). Please turn in a hardcopy at the start of class. In
addition, provide a short discussion the generality of your solution
where you address the following questions: 1) What happens if the
vacuum starts in a random location? 2) What happens if we allow
furniture into the environment?
3. Agent Code for Russell and Norvig
One purpose of the assignement is for you to begin to familiarize
yourself with this code. The basic environment package included in
the code will be used in subsequent assignments. If you have any
questions about the code feel free to ask me about it.