Standard balanced flocking behavior.
A simulation of flocking behavior based on Craig Reynolds' Boids (Bird-oid objects) algorithm from 1986.
Complex group behavior emerges from three simple rules applied to every dot:
None of the boids know where the group is going. They only look at their neighbors. Yet, they form liquid-like swarms, split around obstacles, and reform.
Click the buttons to tweak the weights of the rules: