🐜 Ant Colony Pathfinding: Pheromone Trail Decay (2D)
Top-down ant colony lab: adjustable colony size, evaporation rate, deposit strength and trail-follow bias, with a live pheromone heatmap and a delivery/route-length readout.
This 2D companion strips the ant colony's pheromone-trail algorithm down to a plain top-down canvas so the mechanics of stigmergy read clearly: each ant walks from nest to food (or back), depositing pheromone on the path it came from and, once outside a short capture radius of its target, choosing its next heading by sampling the strongest nearby trail with a tunable follow-bias against random exploration. Trails evaporate every frame at an adjustable rate, so a slow or roundabout route fades before it can compete with a shorter one — the same trail-decay dynamic that lets Ant Colony Optimization converge on near-shortest paths without any ant ever seeing the whole map. Move the nest or food mid-run to watch the colony abandon its old trail and lay a fresh one.
2D top-down ant colony lab: adjustable colony size, evaporation rate, deposit strength and trail-follow bias, with a live pheromone heatmap and a delivery/route-length readout.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install