Speed:

Range of interaction:

Noise:

This is an implementation of the Vicsek model. Each boid has a position and a direction. At each time step, the directions are updated to the average of the directions of the other boids within range, up to some additive noise. Then they move in that direction at a fixed speed. If they hit the walls of the box, they bounce (pi gets added to their angle of motion). The model enjoys an interesting phase diagram that I have not yet explored.

Something I like is that you can see the central limit theorem: isolated birds fluctuate wildly, but the motion of boids in groups is smooth.

Something I don't understand yet: why do flocks sometimes have a short-ranged repulsion? This is an emergent phenomenon.

Here is a nice review on active matter. Craig Reynolds' original Boids.