CS378: Autonomous Multiagent Systems -- Spring 2005: Programming Assignment 1
Implement your own fire brigades
Take a look at the developer manual. The code document (jdk generated one), is at yabai homepage.
The task is to make the firebrigades to go to the closest building on fire and extinguish it.
For that, you are only allowed to use move(MotionlessObject).
Copy the sample agents to your home directory
% cd /projects/cs378.pstone/rescue-0_45/program
% cp yabapi ~ -R
The code of sample fire brigade agent is available at : ~/yabapi/sample/src/sample/FireBrigadeAgent.java.
Try to understand the flow of algorithm. Delete the line "move(ENTRANCE_PRP.collect(fires)",
implement an algorithm to find the closest on-fire building and move to it.
For moving to an on-fire building, use command "move(building_object)".
For accessing the position of the agent, use self().x() and self().y(). For other objects (like buildings),
the x() and y() methods still exists.
If you have any question regarding how to navigate through a collection, send me an email right away.
Notice that in the sample code, the agents goes to entrances of the buildings, but in your code
the agent should go to the building itself.
To compile your agent, run "make" on the sample directory.
Start the server:
% cd /projects/cs378.pstone/rescue-0_45-unix/boot
% ./game.sh Kobe yourName
Check if no viewer is visible, run the viewer manualy:
To execute your agents, after starting the server with "all.sh":
% cd ~/yabapi
Turn in the logfile
look for the logfile with your name in it, and using turnin program, turn it in.