Boids: How a 3-Rule Algorithm Creates Starling Murmurations on Your Desktop
How the Boids Murmuration wallpaper implements Craig Reynolds' 1986 flocking algorithm on the GPU — three simple rules that produce emergent flock behaviour.
In 1986, Craig Reynolds published a paper describing how to simulate the collective motion of flocks, herds, and schools. He called his simulated agents boids (a compressed New York pronunciation of birds), and the model had three rules. No choreography, no central controller, no bird telling any other bird what to do. The Boids Murmuration wallpaper implements this exact model on the desktop, running smoothly alongside other generative wallpapers. Three local rules, applied to each agent independently, and the flock shapes emerge on their own.
The paper is forty years old. The shapes it produces still look like nothing a programmer wrote.
The three rules
Every boid looks at the other boids within some radius around it and applies three steering forces:
Separation: if other boids are too close, steer away from them. This prevents the flock from collapsing into a single point. It's the same reason birds don't fly into each other — they avoid crowding before it becomes collision.
Alignment: steer toward the average heading of nearby boids. This is what gives the flock its coordinated quality — not because any leader is broadcasting a direction, but because every agent is continuously nudging itself toward what its neighbours are already doing.
Cohesion: steer toward the average position of nearby boids. This pulls stray agents back toward the group and keeps the flock from drifting apart into individuals.
That's the whole algorithm. Each boid applies all three forces every frame, the forces are weighted and summed, and the result is the new heading. The flock shape — the way it splits around obstacles, re-merges, pulses, turns — isn't programmed. It falls out of those three rules interacting.
The reason it looks like a starling murmuration is that starling murmurations probably work roughly the same way. Reynolds designed the rules by observing how real flocks behave; biologists have since found that the local-interaction model matches measured bird data well. The wallpaper and the actual birds are running similar software.
Parameters you can adjust:
- Flock Size — the number of agents. More birds makes the flock dense and the emergent shapes more dramatic; fewer lets you follow individuals.
- Separation Radius — how close two boids get before they start avoiding each other. Tight radius makes the flock denser and more turbulent; wide radius keeps birds spread out and the motion more diffuse.
- Speed — how fast agents move. Low speed and the flock almost hangs; high speed and it churns. The interesting behaviour tends to be in the middle.
The three Lorenz-style emergent shapes — the splitting, the spiralling, the sudden course reversals — only appear when the parameter values are in the right range. Outside that range, you get a blob (too much cohesion) or a dispersed gas (too much separation). The defaults are tuned to stay in the interesting zone.
Why this scales
Boids sounds computationally brutal: every agent checking every other agent every frame is O(n²). For a thousand boids that's a million comparisons per frame. On a CPU, that's a lot.
The GPU version sidesteps it with spatial partitioning — agents only query a local neighbourhood, not the whole flock, so the actual work per agent is bounded and manageable. The remaining per-agent calculation is exactly the kind of independent, parallel work a GPU handles without effort. The CPU barely participates.
Same baseline: 30 FPS default, pauses when hidden. The flow field post covers the general performance rationale if you want more detail on the GPU-first approach.
Have a look
The thing worth doing with Boids is watching it long enough to see a coordinated turn — the moment the whole flock pivots together from thousands of local decisions, with nobody in charge. It still surprises me every time.
Boids Murmuration

Autonomous flocking simulation implementing Craig Reynolds' Boids algorithm with O(1) spatial partitioning. Over three thousand individual agents calculate separation, alignment, and cohesion vectors every frame, creating fluid murmuration patterns against a procedural dusk gradient. Features depth-based atmospheric haze and dynamic velocity-matched wing kinematics. Tuned for near-zero idle resource utilization, the simulation caps GPU draw cycles and halts execution whenever work windows take focus or external power is disconnected.
Run this as a live wallpaper with Novaframe
Novaframe is the free desktop engine behind these wallpapers — real-time shaders rendered on your GPU, not video loops. Download it once, then apply anything from the catalogue in one click.
Frequently asked questions
Related articles
Voronoi Drift: How Computational Geometry Becomes a Living Wallpaper
A Voronoi diagram answers one question: which point are you closest to? Ask it a few thousand times per second with moving seeds and you get something that looks alive.
4 min readPhysarum Slime Mold: The Living Network Growing on Your Desktop
Slime mold is one of the most fascinating organisms alive. It has no brain, no neurons, no plan — and it still finds the shortest path. Here's how I put that on your desktop.
4 min readSilk Aurora: What It Takes to Make Light Feel Like Liquid on a Desktop
Silk Aurora's ribbons of teal and violet never tear, never z-fight, and never repeat. Here's how a single 2D fragment pass pulls that off.
4 min read