Provided below are some details about the algorithms used in these models, beginning with the basic version and subsequent additions.
Setup ants: Divides world into three regions and distributes ants of three kinds randomly with equal density in each of the three regions. For the purposes of this model, ants doing different tasks do so in three distinct spatial regions. In real colonies, there may be some spatial overlap of ants doing different tasks.
Go: Ants move randomly within their regions; ants keep track of encounters with other ants (two ants on the same patch of space constitutes one encounter for both ants); if an ant has 15 encounters within 150 moves it jumps to a random location in one of the other two regions with a probability that reflects the relative size of those regions (foragers have a 50/50 chance of going to the midden work/patrolling area; midden workers have a 75/25 chance of going to the foraging/patrolling area; patrollers have a 75/25 chance of going to the foraging/midden work area).
Remove foragers (midden workers, patrollers) and PercentForagers(Workers, Patrollers)ToRemove: Removes a variable percentage of ants randomly chosen from those in the corresponding task area.
Add(Remove) hydrocarbons: Allows user to add artificial "hydrocarbons" in each task area. Each click adds three hydrocarbons to random locations in the corresponding task area. Hydrocarbons occupy fixed patches and are themselves not altered when ants occupy the same patch. An ant treats an encounter with a hydrocarbon the same as an encounter with other ants. Here the "hydrocarbons" are the same in all three regions. In real colonies the hydrocarbons are modified by the different tasks that ants engage in and so are somewhat distinct for ants engaged in different tasks.
Foragers(Middenworkers, Patrollers)EncounterThreshold: Determines the number of encounters within 150 moves that causes an ant to switch tasks.
Time to reach 50/25/25: Measures the time from starting a simulation to the time the percentage of foragers is about 50%. Note that the reported time may in some cases be earlier than that at which the percentages become stable.
Go-grow: In addition to running the commands for each ant to move randomly, track encounters and moves, 20 ants are added in random locations across all three task areas. Additions occur every x iterations, as determined by the BirthCycle slider. At birth, ants are given random ages and die when they reach the age determined by the Lifespan slider.
Add foragers: Adds an additional 50% of the total number of ants present into the foraging area. A timer is also started which reports when the percentage of ants foraging reaches 50% of the total population. When foragers are added, growth (birth, death, and aging of ants) is suspended.
Continue growth: Restores growth process (birth, death, aging).
Average ant birthdate: Displays average of all ants birthdates at the given time.
Page 7 within 150 moves die. Foragers meeting intruders become "alert" for a fixed amount of time (controlled by the ColonyAntAlertness slider), during which encounters are not tracked. Foragers not alert meeting alert foragers reset their record of encounters to zero (but do themselves not become alert). As a result of both alert foragers and others having encountered alert foragers, the number leaving the regions is reduced in the presence of intruders and so the overall distribution of ants deviates momentarily from its stable configuration.
Add intruders: Adds 50% of total population of ants at the time as additional black ants in the foraging area. These intruders move randomly within the foraging area only. Intruders having x encounters (as determined by the IntruderPersistence slider)