Full credit to Luca Ongaro for the coding.
This is just a tweak. I found that the potential for this code was really laid bare when i got agent counts up in the thousands. Kinda blew my mind really. I am looking into openCL and possibly being able to get the counts into the hundreds of thousands.
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
To tweak this sketch, first download it.
Make your updates, then upload your tweak!