Thursday, 20 October 2011

Smells Like Stigmergy

Taking a few cues from ant colonies, I've been playing with the construction of vector fields from agent based pheromone distribution. Instead of agents receiving distance based forces from neighbours directly, forces are derived from gradients in the pheromone field they leave behind. In other words, each agent 'sniffs' for a desired pheromone value within a scalar field and moves towards it. Because of the indirect nature of agent-to-agent interaction, simulating large populations becomes much less computationally expensive.

Below is an example of the interaction between two populations of 50,000 agents. One seeks out a target and contributes to the pheromone puddle (cyan) while the other gets in the way and tries to clean up the mess (magenta).





Platforms: Processing