Contents |
Introduction
To clarify the use of the Jaak extension this page illustrates the classical ant colony simulation with a situated multiagent system.
The Ants demo provides a possible implementation of Boids.
The source code of this demo is embedded into a runnable jar that may downloaded at: Ants. Just use
java -jar <jarname>in your beloved console to run this demo. Extract this jar to see the associated java source code and use
mvn clean installto compile it (assuming the use of Maven).
Ant Colony Principle
A single ant has no global knowledge about the task it is performing. The ant's actions are based on local decisions and are usually unpredictable. The intelligent behavior naturally emerges as a consequence of the self-organization and indirect communication between the ants.
Definition of the Environment
In the Ant Colony example, the environment is based on the Jaak grid. Each cell of the grid could contain one of:
- a colony,
- a pheromone, or
- a food source.
In this example two types of pheromones are implemented:
- the 'food pheromone': which is indicating the direction of a food source; and
- the 'colony pheromone': which is indicating the direction of an ant colony.
Definition of the Ant Colony Organization
Ant Colony is an organization composed of two roles:
- patroller: a pratoller is randomly moving around the colony to put a colony pheromone. A pratoller returns to the colony when it estimates that the first dropped colony pheromone has decreased about half of its initial value.
- forager: a forager randomly searchs for food sources. During this searching phase, it drops colony pheromones. Aftger finding a food source, a forager tries to return to the colony by following the colony pheromones. During this returning phase, it drops food pheromones to retreive the food source later.
Ant Colony Applet
- Colony is at the center a white circle.
- Moving ant is a green point.
- Immobile ant is a yellow point.
- Food source is a red point.
- Colony pheromones are along a white curve.
- Food pheromones are along a pink curve.
Download
Binary and Sources
ants-1.0-20120518.220234-625-jar-with-dependencies.jar - 994 KB
Sources Only
ants-1.0-20120518.220234-625-sources.jar - 33 KB


