How can a group begin with agents pointing in many directions and develop a shared heading without a leader? Each agent in this small model moves at the same speed, looks at nearby headings, and turns partway toward their circular average. Random turns remain in the system.
Try it yourself in Flocking Local Rules: compare the same starting state and random turns at low and high alignment.
Predict
Before changing the alignment setting, predict what the order parameter will do. It is the length of the average heading vector: zero means the directions cancel, and one means all headings match. It measures directional order, not whether agents gather into a tight group.
Test one change
Use the same seeded starting positions and restart the same random-turn sequence for both settings. Compare alignment at 0 and 1 while keeping speed, neighborhood radius, noise amount, and elapsed steps fixed. The model has 64 point agents in a periodic square; each sees neighbors within 0.12 of the box width and moves 0.01 box widths per step. Compare the order parameter over the run rather than reading a single frame as a result. A fairer summary repeats the paired comparison across the model’s predeclared seeds and reports each value and its spread.
Each new heading is calculated from the unchanged previous state before any agent moves. Directions use a circular average: headings near 179° and −179° point almost the same way, even though their ordinary arithmetic average would point the opposite direction. The model averages unit-vector components so the result stays on the short angular route.
Connect the idea
Vicsek and colleagues studied constant-speed particles aligning with nearby directions while random perturbations continue. Reynolds’ earlier computer-graphics work showed how group motion can arise from local rules. This tool is a small teaching adaptation with an alignment-strength control; it does not reproduce either paper’s full model. Complexity Explorables’ “Horde of the Flies” is a related existing explorable, not the source of this tool’s interface or implementation.
What this model leaves out
There is no attraction, collision avoidance, body size, wall, obstacle, or leader. Agents can share a direction while spreading across the screen. The model therefore cannot tell us that alignment alone explains real bird flocks or other animal behavior. Randomness also remains: one seed is not representative. Treat the screen as a controlled model of directional order, not a prediction of a biological group.
Sources: Vicsek et al., “Novel Type of Phase Transition in a System of Self-Driven Particles”; Craig Reynolds, “Flocks, Herds, and Schools: A Distributed Behavioral Model”; Complexity Explorables, “Horde of the Flies”.
Sources & further reading
Make the next question an experiment.
Browse independent creators who make big ideas visible.
Find an explainer

