Swarms of things

Some of the recent drawing agent work I’ve seen has inspired me to revisit one of my first loves, multi-agent systems. I have a good bit of existing code for multi-agent systems already so the first thing I’ve done is put together the core pieces I need to get some classic flocking going. If you are not already familiar with him, Craig Rynolds is the great grandaddy of flocking behavior with his classic ‘boid’ rules. These deal with three core behaviors: Cohesion, Separation and Alignment. Cohesion is the tendency for each agent to try and move towards nearby groups of agents. Separation is the tendency for agents to move away from agents they are too close to. Alignment is the tendency for agents to travel in the same direction as other nearby agents. You may notice that these three behaviors don’t exactly overlap, in fact they almost seem to work against each other. The result is that the ultimate behavior of the agent is a negotiation between each of the core behaviors. So given a few simple behavioral rules, one can see some very complex group behaviors emerge.

I spent some time balancing the behaviors to get the results I wanted and generated a video. I then uploaded the video to vimeo and it looked terrible. I asked for help making it look better but was told that “given the nature of the video, vimeo’s transcoders would not be able to transcode it properly”. This is very frustrating. Once again I found myself searching for a better way to share videos. Ultimately I had to abandon the video sharing sites and host the video myself and play it with VideoJS. This means a little more work for me, but the results are much better. Now if I can just figure out how to make it stop autoplaying. As far as the video itself, there’s nothing really groundbreaking here. Just some basic flocking and random colors. This will be the foundation for some new experiments.