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/ai2cpp/code/vacuum/players/
See if you can improve upon the average score these agents get. Then implement an agent with 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 can define your agent by specializing the existing general player class.
The file
~echown/ai2cpp/code/vacuum/README
contains extensive information on how to compile and run the agent simulation. Please note that it is possible to have more than one "unit" of dirt within a cell. Hence, after doing a "suck" action, there may still be dirt in the cell.
While debugging your agent, I suggest that you constrain the world to be fairly small (e.g., 4 by 4). It may also be useful to create small test worlds during debugging. The README file describes how to do this and there is an example in:
~echown/ai2cpp/code/vacuum/testworld
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.
agent-trials
run. Your code should clearly explain what
it is doing. In particular, please explain the meaning of each of
your state variables. 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 email your
solution to me (echown@bowdoin.edu) and also 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?
~echown/ai2cpp/code/vacuum/lib
is the directory
for a package of C++ routines written by Larry Holder of the
University of Texas at Arlington. 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.Last updated Mon Sep 7 21:20:38 1998 echown