Ant Colony Optimization
Simple ants, collective intelligence — pheromone trails solve TSP without any ant knowing the tour exists
The Simplest Explanation
Real ants find food with two tiny rules: deposit pheromone where you walk and prefer stronger trails. Shorter paths get round-tripped faster → more pheromone per minute → attract more ants → even more pheromone. The colony as a whole converges on the short route though no individual ant knows anything about it.
Ant Colony Optimization (Dorigo, 1992) ports this to graph problems like TSP.
Each ant builds a tour greedily-but-stochastically using pheromone τ (collective memory) × visibility η = 1/distance (greedy pull). Shorter tours deposit more pheromone; unused trails evaporate.
Emergence Context
ACO is a swarm intelligence method — complex collective behavior from simple local rules. Sibling phenomena: Conway's Game of Life (gliders from four trivial rules), flocks, termite mounds, brains. No central controller; the pattern emerges.
The ACO Algorithm for TSP
Place m ants on n cities at random. Each ant constructs a full tour in n steps. Ant k at city i picks next city j with probability:
- = pheromone on edge (i,j) — collective memory
- = visibility — greedy pull toward near cities
- α, β weight trail vs visibility
- "allowed" excludes already-visited cities (no premature cycles)
Greedy stochastic construction: prefers near AND well-traveled, but never deterministic.
Pheromone Update
After all m ants complete tours, in two steps:
Evaporation (trails fade):
Deposition (each ant k reinforces every edge of its own tour):
where = length of ant k's tour. Shorter tours deposit MORE per edge — reward inversely proportional to cost.
Why Shorter Paths Win
If an obstacle splits an ant column into a short and long detour, both sides get traffic initially. But ants on the short side complete round trips faster, depositing pheromone at a higher rate. Positive feedback amplifies the advantage until nearly all traffic takes the short path.
Properties
| Property | Value |
|---|---|
| Problem class | Any graph-search/optimization problem (TSP canonically) |
| Knowledge per agent | Local only — no ant sees the global tour |
| Key parameters | α (trail weight), β (visibility), ρ (evaporation), Q (deposit constant) |
| Failure mode | Premature convergence if ρ too low / exploration too weak |