Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Raid Army Ants Foraging Algorithm

The equations:
1

Breakdown of the Algorithm (in the simulations context)


A. Setup World
1. Setup nest location
2. Setup ant location
3. Setup food distribution
4. Create ants
B. Release the Ants
1. Release 10 ants/tick
2. Decide to move/stay
i. calculate (equation 1)
ii. set a random value in the range [0, 100)
iii. if (random value < ): decide to move
else repeat 2 on next tick (staying)
3. Decide to move left/right
i. use given equation to calculate pl and pr
ii. if ( > ) & (# of antsLeft < 20): move diagonally left,
elseif (# of antsRight < 20): move diagonally right
else repeat 2 + 3 on next tick (staying)
[this is actually a 2-bit problem having four conditions]
4. Lay pheromone (if moved)
i. if (pheromone < 1000): lay 1 unit
5. Search for food
i. if (food found): remove food + go back to nest, else:
ii. repeat 2 - 5
6. Go back
i. lay 10 pheromones per site (patch)
ii. reach nest
iii. set off again: repeat 1 6

The Simulation

Buttons:
1. setup: Sets up the world.
2. go: Runs the simulation.
3. go (forever): Runs the simulation in an infinite loop.
Sliders:
1. population/step: Controls the number of ants released from the nest at each time step
(tick).
2. maxPopulation: Controls the maximum number of ants that head out to forage.
3. foodPerSite: Controls the amount (unit) of food each site (patch) can hold.
4. foodProbability: Controls the amount of food that is randomly dispersed around the
world. It is the probability of a site (patch) to contain food. For example, a value of
0.50 means half of the sites in the given world will contain food.
5. nestX: The x coordinate of the ants nest.
6. nestY: The y coordinate of the ants nest.
7. : parameter n in equation 2. Default value is 2.
8. : parameter k in equation 2. Default value is 5.
9. pheroFromNest: Controls the amount of pheromone that an ant lays on every site it
visits after it heads out to forage for food.
10. pheroToNest: Controls the amount of pheromone that an ant lays on every site it
visits when it returns to its nest with food.
11. evaporationFactor: Controls the rate of pheromone evaporation at each time step. The
1
default factor is 1 at which the evaporation rate is (1 30) (Deneubourg et al.)
Plots:
The plots show the change in number of ants released (Time Evolution of Ants),
pheromone concentration in the world (pheromone concentration), total amount of food in the
world (Food Distribution) and amount of food collected by ants (Food Collected) with respect to
time.
Different scenarios with different simulation parameters:
1. Default parameters:
a. foodPerSite = 1, foodProbability = 0.5: The ants have an extreme bias to move
right while they forage for food. They only pick up food diagonally.
b. foodPerSite = 400, foodProbability = 0.01: They move pretty much the same way
but cover more sites.

Figure 1: Foraging behaviour with default parameters


The following simulations were run with foodPerSite = 1 and foodProbability = 0.5.
2. Gradual increase in Evaporation Factor (EF): As evaporation factor increases, the amount
of pheromone decreases. As shown in figure 2, at a certain point (EF = 50), higher
evaporation rate results in higher dispersion of the ants. This in turn increases the rate of
food intake by the ants. However, when the rate is too high, the ants seem to lose track of
food with time which starts resulting in less food being taken by them.

EF = 10

EF = 50 (early stage) EF = 50 (later)

EF = 100

EF = 350

Figure 2: Raid Army Ant foraging behaviour with varying evaporation rate
3. High k: The ants disperse more within very little time.
4. High n: Similar behaviour as high k

Limitations of the simulation:


1. Ants do not lay pheromone on the way back.
2. The ants have a bias to move right by default if they do not find any restriction.
3. The simulation does not show the ant traversing through the sites while returning to
their nest. Once they pick up food, they instantly return to their nest. This is obviously
impractical because teleportation has been achieved with quantum particle(s) only.
4. The ants turn white after the first time they gather food. However, they do not turn
back red after returning food to their nest.

You might also like