BioInspiredRobotDesignAssignment4

From GICLWiki
(Difference between revisions)
Jump to: navigation, search
(GICL Bot: Updated link(s))
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Bio Robots (Fall 2007)]]
 +
 
=Overview=
 
=Overview=
The goal of this assignment is to get our iRobot Creates to use teamwork to find and bring food back to our home colonyIn this case, our robots will simulate ants in following a virtual pheromone trail set by ants that have already found foodThe food in this instance would be the IR beam emitted from a Roomba virtual wall and detected by the IR sensor on top of the iRobot Create.
+
Using only simple behaviors, we want to program our Creates to seek out and bring food back to a home baseAt the outset, your robot will begin its search for food by performing random movements and leaving a pheromone in each location visitedYour robot will be working alone and must perform 3 iterations of finding food then returning home.
 +
 
 +
[[Image:SystemArchitecture.png|robot find food... mmmm|center|500px]]
  
 
=Goal=
 
=Goal=
Using only the simple behaviors, drive, read pheromone, pick up food, leave pheromone, we want to find enough food to get us through the winter.
+
Program the Creates such that they can search and find virtual food using only simple behaviors such as:
 +
* local movements
 +
** limited memory (i.e. only know the current location and none of the previous locations).  The robot will not be allowed to perform path planning or use any memory other than the virtual environment map.
 +
** maintain current location in memory
 +
* try to avoid walls using the virtual map (otherwise the internal odometry could be thrown off).
 +
* read pheromone
 +
* pick up food
 +
* leave pheromone
  
 
=Details=
 
=Details=
Robots begin by executing a search for food. This is done by random movements until 1) food is found, or 2) a virtual pheromone is encountered. If food is found, return home while leaving a trail every 15cm. If a pheromone is found, then follow the pheromone trail until it can't find any more pheromones, or until it finds food.
+
The robot will begin by searching for food. This will be done via some sort of searching algorithm. As the robot moves, it will leave pheromones at each spot it has visited. To model decay, these pheromones keep track of the elapsed time since since you left the pheromone.  
  
 +
Once food is found, the robot will return to its original place (the colony) by following the pheromones that are the oldest (why is that?).
 +
 +
When the robot has navigated back to the colony, it must again follow a pheromone back to the food (can you figure out which ones?) and return back to the colony.
 +
 +
<!--The robot begin by executing a search for food.  This is done by random movements until 1) food is found, or 2) a virtual pheromone is encountered.  At each discrete location, the robot will leave a virtual pheromone in the virtual map.  If food is found, return home while leaving a trail every 15cm.  If a pheromone is found, then follow the pheromone trail until it can't find any more pheromones, or until it finds food.
 +
-->
 
==Food==
 
==Food==
 
Virtual walls are what our ants will use as food.  When our Create encounters a virtual wall, it will "pick up food", then return home by following it's original pheromone trail while leaving pheromones for the other robots to find.  They will be positioned from above with the IR beam pointing downward to simulate the effect of a food source.  There will be two virtual walls, symbolizing two food sources.
 
Virtual walls are what our ants will use as food.  When our Create encounters a virtual wall, it will "pick up food", then return home by following it's original pheromone trail while leaving pheromones for the other robots to find.  They will be positioned from above with the IR beam pointing downward to simulate the effect of a food source.  There will be two virtual walls, symbolizing two food sources.
  
==Virtual Pheromone (VirP)==
+
==Virtual Pheromone==
Once a robot encounters a virtual wall, it will begin its journey home leaving a virtual pheromone (VirP) trail in the virtual environment.  Leaving a virtual pheromone in the environment is accomplished by sending a location to a central server which will act as a virtual map.
+
Once a robot encounters a virtual wall, it will begin its journey home leaving a pheromone trail in the virtual environment.  Leaving a virtual pheromone in the environment is accomplished by sending a location to the Environment Java Class.
  
Other robots will determine if there is a pheromone trail by querying the virtual map for VirP strength > 1 in its current location.
+
Your robot will determine the pheromone trail by querying the map for cells in close proximity with its current location. The pheromones will return values based on the last time you have visited the current location. For example, a pheromone on space X will return 999 if you have left a pheromone there 10 minutes ago while a pheromone will return 10 if you had just recently visited that location.
  
Virtual Pheromones decay over time as well.  So when a food source runs out, the other robots will find another food source. 
+
==Map==
  
==Behaviors==
+
We will be providing you an '''<!--GICL Bot edit:-->[[CS485-Assignment4.zip Contents|Environment Java class]]''' that the robot will use to represent the hallway.  Do not edit this class.  Your robot may use the following methods from <code>Environment</code>:
The following behaviors are required:
+
* "Find Food" - implement a basic behavior to find food and update it's position on the virtual map, and maintain its position and/or the path it is taking in memory (so it can find its way home).
+
* "Return Home" - will set virtual "pheromones" on it's return to home base
+
* lay down virtual pheromone - this will send a message to the virtual map
+
* avoid obstacles
+
  
==Map==
+
* Return a Pheromone value at this cell location.
Since the Create is limited in its computing abilities, each robot will be controlled via a laptop computer communicating over Bluetooth. The laptops will then send their positional updates to a central "virtual" map on a central computer.  We will use this virtual map as our environment from which the robots will send/receive virtual pheromones.
+
:<code>long getPheromone(int x_, int y_)</code>
 +
* Leaves a pheromone value at this cell location.
 +
:<code>void leavePheromone(int x_, int y_);</code>
 +
* Returns whether the cell location has a colony in it
 +
: boolean isColony(int x_, int y_)
 +
* Returns whether the cell location is an obstacle (ie. a wall)
 +
: boolean isObstacle(int x_, int y_)
  
 +
The map is also able to print the current state of the world in an XPM format.  The pheromone trail is color coded where red spaces is where the robot has traveled most recently and blue is least recently.  The following method will allow you to draw the map:
 +
 +
* <code>void drawEnvironment(String outputFileName);</code>
 +
 +
<!--
 
[[image:Assignment4SystemArchitecture.png|center]]
 
[[image:Assignment4SystemArchitecture.png|center]]
 +
-->
 +
 +
=Notes=
 +
* You MUST use the pheromones to navigate your robot to the food source and back to the colony. Use of map probing or other god-like techniques will result in grade deduction. Remember, you are programming like you are the ant. Be like ant, my friend.
  
 
=Administrative=
 
=Administrative=
* Each student is responsible for developing the specific simple behaviors which (we hope) will produce the desired emergent behavior.
+
* You may use ''''<!--GICL Bot edit:-->[[CS485-Assignment4.zip Contents|this]]'''' as your environment.  Extract the zip and place the edu folder in your src tree.
* We will provide Java skeleton code as a framework for build the specific behaviors.
+
 
 +
The students are responsible for turning in:
 +
* A final environment map
 +
* Source code
 +
* A 2 page write up of the assignment
 +
** Approach and implementation
 +
** What worked/didn't work
 +
** Possible other approaches
 +
** References
 +
 
 +
=References=
 +
* Dorigo, M. and Caro, G.D. and Gambardella, L.M., Ant Algorithms for Discrete Optimization, Artificial Life, 1999 vol 5 no. 2, pp 137-172.

Latest revision as of 19:04, 17 March 2009


Contents

Overview

Using only simple behaviors, we want to program our Creates to seek out and bring food back to a home base. At the outset, your robot will begin its search for food by performing random movements and leaving a pheromone in each location visited. Your robot will be working alone and must perform 3 iterations of finding food then returning home.

robot find food... mmmm

Goal

Program the Creates such that they can search and find virtual food using only simple behaviors such as:

  • local movements
    • limited memory (i.e. only know the current location and none of the previous locations). The robot will not be allowed to perform path planning or use any memory other than the virtual environment map.
    • maintain current location in memory
  • try to avoid walls using the virtual map (otherwise the internal odometry could be thrown off).
  • read pheromone
  • pick up food
  • leave pheromone

Details

The robot will begin by searching for food. This will be done via some sort of searching algorithm. As the robot moves, it will leave pheromones at each spot it has visited. To model decay, these pheromones keep track of the elapsed time since since you left the pheromone.

Once food is found, the robot will return to its original place (the colony) by following the pheromones that are the oldest (why is that?).

When the robot has navigated back to the colony, it must again follow a pheromone back to the food (can you figure out which ones?) and return back to the colony.

Food

Virtual walls are what our ants will use as food. When our Create encounters a virtual wall, it will "pick up food", then return home by following it's original pheromone trail while leaving pheromones for the other robots to find. They will be positioned from above with the IR beam pointing downward to simulate the effect of a food source. There will be two virtual walls, symbolizing two food sources.

Virtual Pheromone

Once a robot encounters a virtual wall, it will begin its journey home leaving a pheromone trail in the virtual environment. Leaving a virtual pheromone in the environment is accomplished by sending a location to the Environment Java Class.

Your robot will determine the pheromone trail by querying the map for cells in close proximity with its current location. The pheromones will return values based on the last time you have visited the current location. For example, a pheromone on space X will return 999 if you have left a pheromone there 10 minutes ago while a pheromone will return 10 if you had just recently visited that location.

Map

We will be providing you an Environment Java class that the robot will use to represent the hallway. Do not edit this class. Your robot may use the following methods from Environment:

  • Return a Pheromone value at this cell location.
long getPheromone(int x_, int y_)
  • Leaves a pheromone value at this cell location.
void leavePheromone(int x_, int y_);
  • Returns whether the cell location has a colony in it
boolean isColony(int x_, int y_)
  • Returns whether the cell location is an obstacle (ie. a wall)
boolean isObstacle(int x_, int y_)

The map is also able to print the current state of the world in an XPM format. The pheromone trail is color coded where red spaces is where the robot has traveled most recently and blue is least recently. The following method will allow you to draw the map:

  • void drawEnvironment(String outputFileName);


Notes

  • You MUST use the pheromones to navigate your robot to the food source and back to the colony. Use of map probing or other god-like techniques will result in grade deduction. Remember, you are programming like you are the ant. Be like ant, my friend.

Administrative

  • You may use 'this' as your environment. Extract the zip and place the edu folder in your src tree.

The students are responsible for turning in:

  • A final environment map
  • Source code
  • A 2 page write up of the assignment
    • Approach and implementation
    • What worked/didn't work
    • Possible other approaches
    • References

References

  • Dorigo, M. and Caro, G.D. and Gambardella, L.M., Ant Algorithms for Discrete Optimization, Artificial Life, 1999 vol 5 no. 2, pp 137-172.
Personal tools