University of Washington
Department of Computer Science and Engineering

CSE573–Artificial Intelligence I

Autumn 1997


Problem Set #0.

Assigned October 3, 1997

Not handed in.


Implementing the Vacuum Agent



In class we have studied a simple but standard simulated agent testbed architecture and an extremely simple agent situated in that environment.


The code we went over in class is located at


This assignment should get you comfortable setting up your Lisp environment, typing in some code that we developed in class, using the compiler and debugging facilities, and writing a little new code of your own. You should do the following:


  1. Transfer the code from the Web to a directory of your own.
  2. Complete the agent definition in vacuum-agent.lsp we covered in class.
  3. Write a function on top of the environment/agent layer that will test a particular agent: the function should be of the form
    (test-agent agent-spec &key num-trials)
    and should run the agent to completion in a randomly generated world for the specified number of trials, then report the minimum, maximum, and average score over all trials.
  4. Extend the vacuum agent in some way, depending on how into it you are. For example, make it move all the dirt over to the left wall. Or make it so the agent keeps track of every location it has been to, and thus knows whether it has picked up all the dirt or not. When, and only when it knows there is no more dirt, it shuts itself off. (The agent can—indeed must—know that its world is an 8x8 grid.)