← Back to ACO docs

teeline · algorithms/aco

Ant Colony Optimization

A colony of ants independently constructs tours, each next city chosen probabilistically by a pheromone trail (reinforced on short edges and decaying over time) weighted by heuristic desirability(1/distance). Watch the pheromone edges strengthen on good edges and fade on bad ones as epochs advance.

01234567891011
epoch
0
phase
🐜 ant 1/10
best cost
1394
pheromone
0–1 100%0–2 100%0–3 100%0–4 100%0–5 100%0–6 100%0–7 100%0–8 100%0–9 100%0–10 100%0–11 100%1–2 100%1–3 100%1–4 100%1–5 100%1–6 100%1–7 100%1–8 100%1–9 100%1–10 100%1–11 100%2–3 100%2–4 100%2–5 100%2–6 100%2–7 100%2–8 100%2–9 100%2–10 100%2–11 100%3–4 100%3–5 100%3–6 100%3–7 100%3–8 100%3–9 100%3–10 100%3–11 100%4–5 100%4–6 100%4–7 100%4–8 100%4–9 100%4–10 100%4–11 100%5–6 100%5–7 100%5–8 100%5–9 100%5–10 100%5–11 100%6–7 100%6–8 100%6–9 100%6–10 100%6–11 100%7–8 100%7–9 100%7–10 100%7–11 100%8–9 100%8–10 100%8–11 100%9–10 100%9–11 100%10–11 100%
best tour ant's last tour pheromone edge
Press Step or Run to watch the colony evolve
epoch
0
best cost
1394
ants / epoch
10
step
0
cities: 12α=1.0 β=2.0ρ=0.50ants: 10classic AS