Overview Design and implement a program that controls a rat in a
maze. The rat you control will be interacting with a rational reconstruction of the
historic (and first!) multi-player first-person shooter game. You
can find external information on MazeWar via the link here and more specific information
about the local implementation here.
NOTE: make sure your code will compile and run on my system. If
you have any doubts, check with me in advance.
Similar to your first assignment where you implemented a
stimulus-response agent in the MÆDEN world, you will write a
controller for an rat in a maze. However, in the MazeWar
environment, there are multiple agents (some controlled by AI and some
by human players), and the world changes asynchronously. That is,
your agents do not have unlimited time to think about what to do
next. Fortunately (or unfortunately), you are not required to use
an S-R architecture for this controller. You may use any of the
techniques we have covered in class; if you want to use yet another
technique we have not discussed, talk it over with me in office hours.
connection to the MazeWar game, your agent will receive the global maze
information and the controlled rat's specific information. Then
your program will take over and send movement commands and receive
sensory information. A complete game-server communication
protocol will be provided on 11/16. You may assume that you will
be given the complete maze specification (number of rows and columns
and effectively a two-dimensional array of chars where '1' signifies a
wall and '0' an open cell). You will also be given your rat's row
and column location and a heading (one of the four points of the
When another rat is visible in the hall into which your rat is facing,
you will receive that information. When your rat is tagged, you
will be notified and relocated to another place in the maze (of which
you will be informed). Rats will be identifiable by name and by
Again, your agent will receive a message from the environment whenever
another rat is visible in the maze based on your rat's current
heading. However, just to make things interesting, from time to
time the autonomously controlled rats from CS116 will receive smell
information about the human-controlled rats. This smell
information will be quite specific, giving your rat exact relative
location information (row and column deltas) to each of the
human-controlled rats. But of course, you should not design your
agent to rely on this information. This information may come in
gusts, intermittently, constantly, or not at all. And smell will
not provide any information about other AI rats.
Effector Commands. Your
rat can move about in the maze and tag other rats using the following
'w': move forward one space
's': move back one space
' ' (space): shoot
Note, when you fire a projectile to tag another rat, your projectile
travels down the corridor over time, approximately one cell per 100
milliseconds. Also, rats may only fire one projectile per second.
You should include some display capability of your rat's situation in
the maze; at a minimum, I will expect a curses-based overhead
representation depicting your rat's location and orientation.
However, since displays are not the point of the exercise, I will
provide Java code that displays a first-person perspective view of the
maze and an overhead view. Other rats are visible in the
perspective view but only your rat is visible in the overhead
view. (You are not required to use this code nor to use Java, but
you are welcome to take advantage of this so that you can focus on the
AI part of the project.)
In a similar vein, I will provide Java code that interacts with the
game server. This code will not be available until 11/16.
Again, you do not need to use this code or the Java language. You
can receive and send all your information over sockets using your
favorite language according to the protocol that will be fixed on 11/16.
The goals of this assignment are:
wrap up the semester with a fun game project
experience the challenge of designing an AI in an
build a controller for an agent in a multi-agent
have fun and and try to beat the CS030 players.
Submission and grading
Submit your completed search agents to Eureka in the usual way (zip or
tar file). Include a readme file that explains how to start your
rat controller, etc. I will grade this
project based on (a) code completeness and correctness, (b) coding
style including documentation,
(c) classification accuracy.