From GICL Wiki
Revision as of 19:39, 12 November 2007 by Pwt23 (Talk | contribs)

Jump to: navigation, search



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


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


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.


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.

Other robots will determine if there is a pheromone trail by querying the map 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.


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);

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);


  • 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


  • 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.