Creator: Per Nystedt
What is this? This is an interactive simulation where colored circles (agents) attract each other, form bonds on contact, and experience a horizontal displacement based on their numeric value. The simulation demonstrates how agents can sort themselves into patterns without global supervision or control; local interactions produce emergent sorting behaviour.
Attraction: General attractive force between every pair of agents — controls how strongly and quickly they move toward each other.
Bonding: Additional force that applies when two agents are in contact, causing them to tend to stay together.
Horizontal: When two agents are in contact, the one with the lower value is pushed left and the one with the higher value is pushed right by this strength — this creates the sorting motion.
Agents: Number of agents in the simulation. After changing this value press "Reset" to generate a new arrangement.
Click on the canvas to place black obstacles that agents will avoid. Open Settings to adjust sliders and press Reset to apply changes. You can also use the keyboard: press R to reset.
The simulation runs continuously — experiment with the parameters to observe different behaviours and emergent sorting patterns.