Each robot senses only the pheromone concentration directly around it — never a map, never another robot's position. Every step it deposits a small amount of digital pheromone at its own cell, then picks its next heading by weighing nearby pheromone strength against a mild pull toward its current target (nest or goal) plus random exploration noise.
score(dir) = α·pheromone(dir) + β·align(dir,target) + γ·continuity + noise
pheromone(cell) *= exp(−decayRate·dt) // evaporation, every frame
pheromone(cell) += deposit·dt // every robot that passes
- Decay rate — too fast and no trail survives long enough to reinforce, so the average path length never improves; too slow and an early, mediocre trail can outlast better alternatives, trapping the swarm on a worse route.
- Move obstacle — relocates the gap in the dividing wall mid-run; the old trail through the stale gap keeps decaying while explorers rediscover and reinforce the new one.
- Shorter viable routes get walked — and therefore marked — more often per unit time than longer ones, so their pheromone accumulates faster than it evaporates while long detours fade. No robot ever needs the whole map.