Simple rules cause dumb agents to display a complex social behavior, organizing in "multi-cellular" structures capable of moving. The basic rules are:
- Every agent is attracted by agents with quite similar colours, but repelled by agents with different or very similar colours
- Agents tend to slowly absorb the average colour of their neightbours
- They move in an environment characterized by a small drag force and pressure due to the small space
Click to re-assign colours randomly.
Use keys to write text (only letters from A to Z and some punctuation are provided... too boring to implement all the ascii table :P ). Use UP key to slow down the animation and DOWN to speed up. There's a maximum length for the message (256 columns of dots).
My implementation of the famous Boids algorithm, plus a predator. Code isn't very clean and readable, 'cause I wrote it progressively while I was experimenting with Processing. It may be a bit slow in browser.