8.4 KiB
Realism Improvements for Ant Simulation
Research notes on real ant biology that could improve the simulation. Based on current literature through early 2026.
Current simulation model
- 2 pheromone channels (toHome, toFood) with uniform deposition rate
- 3-way sampling (ahead/left/right) for trail following
- Random noise for exploration
- Binary carrying state (has food or doesn't)
- Uniform ant behavior (no individuality beyond ±20% scent storage)
- Exponential decay + blur for pheromone diffusion
High impact, probably feasible on GPU
1. Concentration-dependent pheromone deposition
Real ants deposit up to 22x more pheromone near the food source vs near the nest (Lasius niger study, Springer 2024). They also modulate based on food quality — Pharaoh's ants deposit significantly more trail pheromone for 1.0M sucrose vs 0.01M sucrose.
Currently scentPerMarker is constant (200). Making it decay with distance
traveled since pickup (or scale with a food quality value) would produce more
realistic trail dynamics. The concentration gradient effectively encodes
distance information for other ants.
Shader change: track steps-since-pickup in ant state, use it to scale deposition.
2. Negative/repellent pheromone ("no entry")
Pharaoh's ants deposit a repellent pheromone at trail junctions leading to unrewarding branches. Key details:
- Lasts ~2x longer than attractive pheromone (~78 min vs ~33 min half-life)
- Ants encountering it U-turn or exhibit zigzagging
- Deposited specifically at bifurcation points, not along entire failed paths
Source: Nature 438, 442 (2005)
This would prevent the colony from getting stuck on depleted food sources. The alpha channel in the world texture is available for a 3rd pheromone type.
Shader change: add repellent channel, deposit on failed searches or at depleted food, make ants U-turn on contact.
3. Individual response thresholds (ant "personality")
Real ants show consistent individual differences:
- Bolder/more exploratory individuals become scouts, discover new food
- Less exploratory individuals become recruits, exploit known trails
- Scouts show lower responsiveness to trail pheromone
- Recruits are highly attracted to trail pheromone and nestmates
- These differences affect learning strategies (personal vs social info)
Source: Frontiers in Ecology and Evolution (2021)
The dominant model for task allocation is the "response threshold model" — each ant has a threshold for each stimulus. When pheromone concentration exceeds the ant's threshold, it follows; below threshold, it explores. Thresholds are determined by genetics, age, body size, experience, and spatial location.
Shader change: pack a per-ant exploration/exploitation bias into the ant texture. Use it to modulate the balance between pheromone following and random walk.
4. Adaptive stochastic noise
In real colonies, noise prevents deadlocking onto suboptimal food sources. When a better source appears, noise is what allows some ants to discover it instead of all ants reinforcing the first trail found.
Source: arXiv 1508.06816
Could make noise level inversely proportional to pheromone strength — ants on weak trails explore more, ants on strong trails follow more tightly. This is a small change to the existing random walk logic.
Medium impact, moderate complexity
5. Food quality encoding
Real ants encode food quality in trail strength — the number of ants recruited scales directly with pheromone quantity released by returning foragers.
Adding multiple food sources with different quality values would let ants deposit proportionally more pheromone for better food. The colony would naturally converge on the best source first, then shift when it depletes.
Requires: food quality attribute per food cell, ants read it on pickup, store it, use it as a deposition multiplier.
6. Alarm pheromone
A separate fast-spreading, fast-decaying signal that causes nearby ants to either flee or swarm depending on context. Transgenic ant research mapped alarm pheromone processing to just 6 glomeruli — a sparse "panic button" with simple encoding.
Could interact with obstacle placement or painted "danger zones." Would need a 4th pheromone channel or multiplexing with existing channels.
Real compounds: formic acid + n-undecane in carpenter ants, pyrazines in Tetramorium. The blend ratio determines whether ants flee vs attack.
7. Substrate-dependent pheromone decay
Real pheromone half-life varies ~3x depending on surface type:
- ~9 min on plastic
- ~3 min on paper (Pharaoh's ant trail pheromone)
- Temperature also accelerates degradation
If the world had terrain types (encoded in unused bits of the world texture), pheromone could persist longer on some surfaces. This would create emergent preferred highway corridors on "good" terrain.
8. Multicomponent pheromone blends
Real pheromone signals are multicomponent blends, not single compounds. A single gland secretion can contain 32+ hydrocarbons, acids, aldehydes, etc. Different ratios trigger different responses — in Tetramorium, workers respond maximally to a specific 3:7 ratio of two pyrazine components.
Could model as ratio between two co-deposited channels rather than single-channel signals.
Lower priority but fascinating
9. Path integration
Desert ants (Cataglyphis) maintain a running home vector — a cumulative sum of direction + distance traveled. This gives them a "home vector" pointing back to the nest at all times, even without pheromone trails.
Key details:
- The integrator resets at known locations (nest entrance, landmarks)
- No cognitive map — it's a procedural "when you see this, go that way"
- Ants can store multiple reference vectors to different food sites
- Works even in featureless environments
Source: Springer, Journal of Comparative Physiology A (2024)
Shader change: accumulate displacement vector per ant, use it as fallback navigation when no pheromone detected.
10. Tandem running
One-to-one recruitment where a knowledgeable leader guides a naive follower:
- Follower maintains antennal contact with leader's legs/abdomen
- Leader only advances after being tapped (feedback loop)
- Leader moves slowly so follower can learn landmarks
- Follower can become leader after learning the route
Source: Journal of Experimental Biology 223(9), 2020
Hard to implement on GPU due to ant-ant interaction requirements, but would produce striking emergent behavior. Might need a CPU-side pass for pairing logic.
11. Caste role switching via neuropeptides
2025 Cell paper (Rockefeller): two neuropeptides — CCAP and NPA — control division of labor in leafcutter ants. Manipulating them turns defenders into nurses or gardeners into harvesters. Same molecular mechanism found in naked mole-rats (convergent evolution, 600M+ years).
Could model as a continuous "role" variable per ant that shifts based on colony-level signals (ratio of foragers to scouts, food availability, threat level).
12. Cuticular hydrocarbon (CHC) recognition
Ants recognize nestmates via complex blends of dozens of cuticular hydrocarbons. Non-nestmates are attacked. This is relevant if the simulation ever has multiple colonies competing for resources.
Ant brain / connectome status (for reference)
- No ant connectome exists yet
- Drosophila adult connectome completed Oct 2024: 139K neurons, 50M synapses, 8,400+ cell types (FlyWire Consortium, Nature)
- Clonal raider ant (Ooceraea biroi) reference brain published 2025 (Rockefeller). TEM imaging for full connectome is underway
- Ant antennal lobes have ~460 olfactory glomeruli vs ~50 in Drosophila, reflecting the centrality of chemical communication
- Alarm pheromone processing maps to just 6 glomeruli — validates using simple threshold rules in simulation
- 2025 PNAS paper describes ant colonies as "liquid brains" where heterogeneity in individual movement patterns (not uniformity) drives collective efficiency
Key sources
- Pharaoh's ant pheromone modulation: ScienceDirect S0003347207002278
- Spatial pheromone deposition in Lasius niger: Springer s00040-024-00995-y
- Negative pheromone: Nature 438, 442 (2005)
- Individual personality: Frontiers in Ecology and Evolution (2021)
- Stochastic noise in foraging: arXiv 1508.06816
- Drosophila connectome: Nature s41586-024-07968-y
- Ant reference brain: Current Biology S0960-9822(25)01520-9
- Neuropeptide caste control: Cell S0092867425005732
- Path integration: Springer s00359-024-01725-2
- Tandem running: JEB 223(9) jeb221408
- Liquid brains: PNAS 2506930122