Spring2011RobotLabAssignment4

From GICLWiki
Revision as of 18:20, 11 May 2011 by Dsi23 (Talk | contribs)
Jump to: navigation, search


Contents

Assignment 4: "Predator vs. Prey"

In this assignment, you will program a multi-robot team of Predators to hunt and capture Prey. You have five Predators (red), who have limited camera sensors and the ability to communicate with each other. Their job is to capture four Prey (blue) after being randomly positioned in the world.

Capturing the Prey

It takes four Predators to capture one Prey. They must position themselves roughly to the North, South, East and West of the Prey. There is a built-in fudge factor for the boxing in of the Prey, so the Predators do not have to be exactly NSEW of the Prey.

Once the Predators have surrounded the Prey, it is considered captured, and it will disappear, and the camera sensors will no longer detect it. Each Predator will also receive a message that a Prey has been captured (with a location). After this message is received, the Predators should move on to find the next Prey.

Once all four Prey have been captured, the Predators should stop (or perform a celebratory dance).

Configuration

For this assignment, you will use AHOY, an event-based simulation environment designed to test networked multi-agent systems. Your implementation must be entirely in Python.

Setup

AHOY requires the standard Python libraries, and a *NIX environment (including Mac OS X), which you should already be using.

To begin, check out the 'robot_lab' branch from the AHOY SVN repositories:

 $ svn checkout http://ahoy.googlecode.com/svn/branches/robot_lab ~/robot_lab_A4

Set your $PYTHONPATH to include this new path:

 $ export PYTHONPATH=~/robot_lab_A4/src/

You must also set a port for AHOY to use for communication. Pick something unique: if you run your simulator on the same multicast network and using the same port as someone else, there will be collisions. Use your birthday, hometown zip code, ATM pin number, last four digits of your SSN, etc.

 $ export AHOY_PORT=12345

Executing the Simulation

NOTE: You'll probably want to execute each of the following as separate processes in separate terminal windows.

To start the simulator, enter the source directory:

 $ cd $PYTHONPATH/ahoy/

And start the simulator daemon (you can pass it any ID you want -- this is for distributed simulations and will not be used):

 $ python startupdaemon.py 0

To start the GUI, move out of the source directory:

 $ cd $PYTHONPATH/../../gui/

And start the GUI

 $ python gui.py

Finally, to start the simulation:

 $ cd $PYTHONPATH/ahoy
 $ python robotlab-a4.py

Implementation

Additional Requirements

  • You may not rely on anything particular to the provided map -- The Predators and the Prey will begin in different randomly selected locations every time the simulation is run
  • You cannot modify ANY code except in the Predator Agent Implementation (/svn/branches/robot_lab/src/ahoy/agents/predatorimpl.py)

If you are not sure about the above requirements, feel free to email the TA.

Extra Credit

All working implementations will be given five timed trials to capture all the Prey. The top 10 times will receive extra extra credit points as follows: 1st place, 10 points, 2nd place, 9 points, 3rd place, 8 points, etc. You do not need to complete anything extra to be eligible to receive extra credit. You should work to make your implementation as fast and efficient as possible.

Submission

  • Submit a tarball to the TA's: Dustin Ingram (dsi23@drexel.edu) & Aaron Rosenfeld (ar374@drexel.edu) containing:
    • Your modified Predator Agent Implementation (/svn/branches/robot_lab/src/ahoy/agents/predatorimpl.py) file
    • A README file briefly describing your work, method, and peculiarities of your program
    • Optional: Any videos or images of your implementation
  • If something does not work properly or is incomplete, you must say so in the README.

Grading

The assignment is worth 30 points. Grading will be as follows (based on an average of 3-5 trials):

  • 30 points : All of the Prey are captured within 5 minutes.
  • 20-29 points : Some of the Prey are captured within 5 minutes.
  • 10-19 points : None of the Prey are captured within 5 minutes, but the Predators come really, really close to capturing them.
  • 0-9 points : None of the Prey are captured within 5 minutes, and the Predators do not come close to capturing them.

The extra-credit is worth up to 10 extra points.

TOTAL: 30 + 10E.C.

Graphics

The Predators are red, the Prey are blue. Green dots signify that a Predator or Prey has been detected by a Predators camera sensor.

Initial config.png

Additional Resources

Although they are probably not necessary for this assignment, if you are interested in this problem, you may enjoy the following research papers:

Personal tools