A Boids-like animation

When writing my book Automating After Effects: Scripting Techniques for the Production Pipeline with JavaScript and Python, I was in need of an animation example that could be used to illustrate certain post-processing techniques. I wondered if I could create boids in After Effects using only code (and a few minimalistic comps to hold the art). I come close to accomplishing this using After Effects expressions. The key is: my expressions are autogenerated in a custom code generator built in JavaScript, where the output is an AE expression that is copied and pasted into the various comps as a position expression.

The code for this is on my book's GitHub repo along with an already built After Effects project file.