Spring2011RobotLabAssignment4

From GICLWiki
(Difference between revisions)
Jump to: navigation, search
(Setup)
Line 26: Line 26:
 
   $ export PYTHONPATH=~/robot_lab_A4/src/
 
   $ export PYTHONPATH=~/robot_lab_A4/src/
  
You must also set a multicast port for AHOY to use to communicate on. 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.
+
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
 
   $ export AHOY_PORT=12345

Revision as of 17:21, 11 May 2011


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

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

Modify data channel so that there are X seconds of message latency and Y% probability of a message being lost (ie: not delivered). As X and Y increase, do the predators need to adopt a different hunting strategy? Ensure that your new strategy works with X=5 and Y = 25.

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 40 points. Grading will be as follows (based on an average of 3-5 trials):

  • 40 points : All of the Prey are captured within 5 minutes.
  • 30-39 points : Some of the Prey are captured within 5 minutes.
  • 20-29 points : None 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-10 points : The Predators do not come close to capturing any Prey.

The extra-credit is worth up to 10 extra points, depending on how sophisticated the modified approach is.

TOTAL: 40 + 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