Dao Academy

Chaos and emergenceLesson 3 of 4

Crowds with no leader

Three rules make a flock, scent makes a shortest path, and a slime mold plans a rail network. Crowds can be wise or foolish, and the difference is not intelligence.

About 22 minutes, with 2 activities · 10 minutes of video

Watch this lesson

Three rules for a flock

In 1986 a computer-graphics researcher named Craig Reynolds, working at a company called Symbolics, wanted to animate a flock of birds without drawing every bird by hand. A flock is hard to animate because nobody directs it. So he asked a different question: what does each bird need to do, so that a flock happens? His answer, published in 1987 in the paper “Flocks, Herds, and Schools: A Distributed Behavioral Model,” was a program in which every simulated bird, which he called a boid, follows three rules, and sees only its neighbors.

  • Collision avoidance (often called separation): steer away from a flockmate that is too close.
  • Velocity matching (alignment): steer toward the average heading and speed of your neighbors.
  • Flock centering (cohesion): steer toward the average position of your neighbors.

That is the whole program. There is no leader, no plan, and no picture of the whole flock in any boid’s head. Yet the result looks alive. Scattered boids pull together, line up, and fly in a group; the group turns as one, splits to go around a column, and rejoins. Reynolds’s boids flew in his 1987 short film Stanley and Stella in: Breaking the Ice, and the same idea, modified, moved the bats and penguins of the 1992 film Batman Returns. (Some retellings date the model to 1983. The paper and Reynolds’s own account say 1986.)

Try it. The three sliders set how hard each rule pulls. Turn one down to zero and see which rule does what.

Seventy birds, three rules

Press Run. Every bird looks only at neighbors within a short distance. The number below measures how closely the headings agree: 1.00 is perfect agreement.

This toy follows Reynolds’s three rules in the simplest way. With cohesion at zero the group stops pulling together; with separation at zero the birds crowd; with alignment at zero there is no flock at all.

Three details of Reynolds’s paper are worth pointing out. First, the model is deterministic: its author writes that, apart from the randomly chosen starting positions, which he says are not even required, everything else “is completely deterministic and repeatable.” Nothing is left to chance, and still nobody, the programmer included, can say where the third bird from the left will be after a minute without running the program. That is the same lesson as Lesson 2: lawful does not mean forecastable. Second, flock splitting is not a special feature. Reynolds notes that models with a central force or a designated leader do not allow a flock to split, while his boids do, because each boid cares only about staying near its own neighbors. Third, the boids do have an explicit way of steering around obstacles; what nobody wrote down is the behavior of the flock as it divides and merges around them.

Real starlings

A model shows that some rules could make a flock. It does not show that birds use them. For that, someone has to measure real birds, and starlings are the best-studied. From the winter of 2005 to 2006, a team of Italian physicists (the STARFLAG project) photographed starlings gathering at dusk over the trees by Rome’s Termini station, using pairs of cameras on a terrace of the Palazzo Massimo, about thirty meters up. From the stereo photographs they reconstructed the position of every bird in flocks of up to 2,600, in three dimensions.

Their main finding, published in 2008, was a surprise. A bird does not respond to every bird within some fixed distance. It responds to about six or seven nearest neighbors, however near or far they are. This is a rule of count, not of distance, and it keeps the flock together even when it stretches thin or bunches up. Later work found that a change of direction travels through a flock as a wave, at 20 to 40 meters per second, faster than the birds fly (7 to 12 meters per second), so that a turn can sweep through hundreds of birds in under a second; and that the birds’ headings are correlated across the whole flock, over distances that grow with the flock’s size. The real rule is thus a variation on Reynolds’s, and the model gave physicists the right question.

The ants’ short cut

Ants find short paths between nest and food, though no ant knows the map. In a 1989 experiment, Simon Goss, Jean-Louis Deneubourg, and their colleagues in Brussels connected an Argentine ant nest to a food source by a bridge that split in two and rejoined, with one branch longer than the other. Argentine ants lay a scent trail of chemical marks, a pheromone, as they walk, and follow the stronger scent. When the long branch was twice as long, the ants ended up using the short one in all 14 trials, and in 11 of the 14 more than 80 percent of the traffic was on it. When the long branch was only 1.4 times longer, the ants chose the short one in 15 of 18 trials. When the two branches were equal, they chose one at random, and a different one in different trials.

The mechanism needs no ant that knows anything. At the start, ants take either branch about equally. But an ant on the short branch gets to the food and back sooner, so the short branch gets marked sooner and more often. A stronger scent attracts more ants, who add more scent: a loop of positive feedback turns a small head start into a decision. (The scent also fades, with a lifetime of the order of half an hour in this species, which works as a slow negative feedback that stops old marks from ruling forever.)

Forty ants, two paths

The nest is on the left and the food on the right. Each ant chooses a path with a chance that grows with the scent already on it. Try making the paths equal, or turning evaporation up or down, and start a few new colonies each time.

The choice rule is the one Deneubourg proposed from the data (the chance of a branch grows with the square of 20 plus its scent). Later work found that single ants respond more nearly in proportion to scent than to its square, so the formula describes the colony better than any one ant.

This is not only a story about ants. Marco Dorigo and his colleagues at the Politecnico di Milano turned the idea into a family of computer methods called ant colony optimization, first described in the early 1990s and tested on the traveling-salesman problem, in which virtual ants lay virtual scent on the better routes. It has been used for scheduling and for routing messages through communication networks. Honesty requires a caveat: on the traveling-salesman problem itself, ant systems are not competitive with the best dedicated solvers, and the claim to a lasting place rests on some scheduling and routing problems, not on a general victory.

The same mechanism can also fail, and the failure is instructive. In the bridge experiment, when the short branch was added only after the colony had settled on the long one, only 2 of 18 colonies switched. Early marks had locked in the choice. And in 1921 the naturalist William Beebe, in British Guiana, came upon a column of army ants that had closed into a circle about 1,200 feet around, which took an ant about two and a half hours to walk. Ants following the scent of the ants in front had found themselves following their own tails; the “mill” turned from one afternoon into the next morning, until exhausted stragglers began to drop away. Positive feedback is powerful, not wise.

One more story about ants, popular in talks on this subject, deserves a correction. It says that fire ants, caught in a forest fire, roll themselves into a ball and roll through the flames. I could find no credible source. What is documented is remarkable enough: in floods, fire ants link their bodies into a floating raft. In the laboratory, rafts of a few hundred to a few thousand ants settle into a raft about two and a half ants thick within a couple of minutes, and the water-repellent mass of bodies and trapped air floats “for days,” according to the report in PNAS in 2011.

A slime mold plans a railway

The champion path-finder is smaller still, and it is not even an animal. Physarum polycephalum, a yellow slime mold, is a single huge cell with many nuclei, which spreads across a surface as a network of tubes. (It is sometimes described as a swarm of bacteria, or of amoebas that gather. It is neither. The slime mold whose separate cells gather when starved is a different species, Dictyostelium.) In 2000 a team in Japan showed that Physarum finds the shortest path through a maze between two food sources, by withdrawing from the dead ends.

In 2010 Atsushi Tero, Toshiyuki Nakagaki, and colleagues, working in Japan and the United Kingdom, put it to a harder test. They laid out 36 food sources on a dish in the positions of the cities of the Tokyo area, placed the slime mold at Tokyo, and shone light on parts of the dish to stand for mountains and water, which Physarum avoids. Over about 26 hours it grew a dense web of tubes, then strengthened the busiest and let the rest wither, until what remained looked much like the real rail network.

Bars comparing the Tokyo rail network with the slime mold's networks. Total length: rail 1.8, slime mold 1.75. Mean minimum distance: both 0.85. Faults that would cut the network in two: rail 4 percent, slime mold 14 to 20 percent. Total length1.8 vs 1.75 Mean distance0.85 vs 0.85 Faults that split it4% vs 14–20% Tokyo rail networkslime mold (average of 21 runs)
Slime mold against the Tokyo rail network, from Tero and colleagues (Science, 2010). Lengths and distances are relative to a reference network, so lower is better for the first two. The first two groups share one scale; the third group has its own scale.

Press release versions say the slime mold “beat” the engineers. The paper says something more modest and more useful. The slime mold’s networks matched the rail system’s total length and the average length of the shortest route between two stations (the second bar). They were less robust: a fault that cuts the network in two was a threat in 14 to 20 percent of cases for the slime mold and only 4 percent for the rail system, which has had a century of repairs and detours added. The authors also turned the slime mold’s rules into a mathematical model and used it as a recipe for designing networks. (Accounts sometimes place the work at the University of Tokyo in 2008. The authors were at Hokkaido University, the University of Oxford, and Hiroshima University, and the paper appeared in Science in January 2010.)

Wise crowds, foolish crowds

Do human crowds work like this? Sometimes. In 1907 the scientist Francis Galton went to a livestock fair in Plymouth, England, where visitors paid sixpence to guess the weight of an ox once it was butchered and dressed. He collected the 787 usable tickets. The middle guess was 1,207 pounds. The ox weighed 1,198. The crowd’s middle guess was off by less than one percent. Galton was struck enough to publish a note in Nature titled “Vox Populi,” and nearly a century later the journalist James Surowiecki popularized the idea in The Wisdom of Crowds. He gave four conditions: diversity of opinion, independence of each person’s judgment, decentralization, and a way of aggregating the answers.

The conditions matter, because when they fail, a crowd can be worse than any member. A 2011 experiment by Jan Lorenz, Dirk Helbing, and colleagues at ETH Zurich asked 144 people to estimate facts, with some allowed to see others’ answers. Even mild social influence shrank the diversity of the answers and weakened the crowd’s advantage, without making the group’s error any smaller: people simply converged on one another, as in a market bubble or a rumor.

The darkest case is a crowd crush. On 12 January 2006, during the stoning ritual of the pilgrimage at Mecca, at least 346 people died on and around the Jamarat Bridge in Mina. Video of the event was studied afterward by Dirk Helbing and colleagues. They found that the crowd’s density locally exceeded ten people per square meter, and that the flow passed from smooth to stop-and-go to “crowd turbulence,” in which waves of pressure moved through the people. Panic, they concluded, was not the cause but a result: it comes after the pressure has become unbearable. (Stampedes are sometimes said to happen “every year” at Mecca. That is not so: the notable ones were in 1990, 1994, 1998, 2001, 2003, 2004, 2006, and 2015, with very different death tolls, and the toll of 2015 is still disputed.)

A milder case is a jam on the highway. It is sometimes said that a city’s traffic is bad because every driver is too clever, but I found no research that shows this. What experiments show is simpler. In 2008 a group of Japanese physicists, led by Yuki Sugiyama, put 22 cars on a circular track 230 meters around and asked the drivers to go at about 30 kilometers per hour. Within about three minutes a jam formed out of nothing, with no bottleneck and no accident, and it traveled backward around the ring at about 20 kilometers per hour, against the direction of the cars. Each driver was following a simple rule, and small slowdowns grew into stopped cars. A simple model from 1992 by Kai Nagel and Michael Schreckenberg, a row of cells with cars that accelerate, brake, and sometimes slow at random, gives the same phantom jams.

What makes a group smart

If group intelligence can be good or bad, can it be measured? In 2010 Anita Woolley, Christopher Chabris, Alex Pentland, and colleagues gave 699 people, in 192 groups of two to five, a battery of tasks, including brainstorming, visual puzzles, and a negotiation over limited resources. They found that how well a group did on one task predicted how well it did on others, as one would expect of a general “collective intelligence” factor. That factor was only weakly related to the intelligence of the average member or the smartest member. It was better predicted by three other things: how sensitive the members were to one another’s feelings (a correlation of about 0.26), how equally the members took turns in conversation (the more one voice dominated, the lower the score), and the proportion of women in the group (about 0.23), which seems to work largely through the first factor. The pattern fits a simple idea: groups do well when information flows freely among everyone, and badly when one or two people dominate.

Please note one correction. A popular retelling says that a group does best when 20 to 80 percent of its members are women. No such window appears in the paper; the finding is a general correlation. Please note a caution as well. Later studies are mixed. An online version of the study found the same general factor. A 2017 study with 312 people found that average individual intelligence explained most of the differences between groups and found no support for the turn-taking and women effects, and a 2021 analysis pooling 22 studies and about 5,300 people supported the existence of a collective-intelligence factor, with the share of women working through social perceptiveness. Treat the tentative picture as: groups differ in how well they work together, and the way they communicate probably matters, but the exact recipe is not settled.

Why did the ants in the double-bridge experiment end up on the short branch?

Closer to home

Chinese has two proverbs about groups, and they pull in opposite directions. 三个臭皮匠,赛过诸葛亮 (sān gè chòu píjiàng, sài guò Zhūgě Liàng) says that three humble cobblers can beat the brilliant strategist Zhuge Liang. 三个和尚没水喝 (sān gè héshang méi shuǐ hē) says that three monks have no water to drink: one monk carries water for himself, two share the carrying, and three each wait for someone else. Both are old. Hu Shi, writing in 1929, calls the first an old saying, and the second appears in a novel of the early nineteenth century. The research in this lesson suggests both are right, and tells us when: the cobblers win when their guesses are independent and heard, and the monks go thirsty when everyone is waiting on everyone else.

Americans know the same pair in a different dress: a crowd can produce a well-priced stock market and a bubble, “too many cooks” and a good town meeting. The question is never whether to trust a crowd, but what the crowd’s links look like.

Another view

Each example here deserves a second look, and some of them are weaker than the headlines. Boids show that three local rules can produce flocking; they do not show that birds follow those rules, and the real starlings’ rule (a count of neighbors, not a distance) is different from Reynolds’s. The ant equations fit the colony better than the ant. Ant colony optimization is useful for some problems, not a general solution. The slime mold matched a rail network’s cost, not its resilience. A group intelligence factor has been replicated in some studies and not in others, and its link to the share of women is the least settled part. Finally, a crowd’s “wisdom” in Galton’s ox is one lucky, well-designed case: when people can copy each other, the effect shrinks. Complexity science is best at showing how things can happen. Showing how they do happen in a given real system takes the slower work of measurement.

What to keep

  • A few local rules, each part seeing only its neighbors, can produce a flock, a trail, or a network. The boids model has no leader, no plan, and no randomness after the start, and still nobody can predict its next move without running it.
  • Positive feedback amplifies a small head start into a decision; fading (evaporation) forgets old choices. Too little forgetting locks in mistakes, and an ant mill is the extreme case.
  • The same ingredients make crowds that are wise (independent, diverse, decentralized) and crowds that are foolish (copying, crushing, phantom jams). The difference is the pattern of links, not the intelligence of the members.
  • Many popular claims here are stronger than the evidence: the slime mold matched, not beat, a rail network; there is no 20-to-80-percent rule for women in groups; and no research shows that traffic jams come from clever drivers.

Think it over

Your notes are saved in this browser.

Sources and further reading

  • Craig W. Reynolds, “Flocks, herds, and schools: a distributed behavioral model,” Computer Graphics 21 (4), 1987, 25–34 (SIGGRAPH ’87).
  • Michele Ballerini and colleagues, “Interaction ruling animal collective behavior depends on topological rather than metric distance: evidence from a field study,” PNAS 105 (2008), 1232–1237; Andrea Cavagna and colleagues, “Scale-free correlations in starling flocks,” PNAS 107 (2010), 11865–11870; Alessandro Attanasi and colleagues, “Information transfer and behavioural inertia in starling flocks,” Nature Physics 10 (2014), 691–696.
  • Simon Goss, Serge Aron, Jean-Louis Deneubourg, and Jacques Pasteels, “Self-organized shortcuts in the Argentine ant,” Naturwissenschaften 76 (1989), 579–581; Jean-Louis Deneubourg and colleagues, “The self-organizing exploratory pattern of the Argentine ant,” Journal of Insect Behavior 3 (1990), 159–168; Andrea Perna and colleagues, “Individual rules for trail pattern formation in Argentine ants,” PLoS Computational Biology 8 (2012), e1002592.
  • Marco Dorigo, Vittorio Maniezzo, and Alberto Colorni, “Ant system: optimization by a colony of cooperating agents,” IEEE Transactions on Systems, Man, and Cybernetics B 26 (1996), 29–41; Marco Dorigo and Thomas Stützle, Ant Colony Optimization, MIT Press, 2004.
  • Nathan Mlot, Craig Tovey, and David Hu, “Fire ants self-assemble into waterproof rafts to survive floods,” PNAS 108 (2011), 7669–7673; William Beebe, Edge of the Jungle, 1921.
  • Toshiyuki Nakagaki, Hiroyasu Yamada, and Ágota Tóth, “Maze-solving by an amoeboid organism,” Nature 407 (2000), 470; Atsushi Tero and colleagues, “Rules for biologically inspired adaptive network design,” Science 327 (2010), 439–442.
  • Francis Galton, “Vox populi,” Nature 75 (1907), 450–451; James Surowiecki, The Wisdom of Crowds, Doubleday, 2004; Jan Lorenz, Heiko Rauhut, Frank Schweitzer, and Dirk Helbing, “How social influence can undermine the wisdom of crowd effect,” PNAS 108 (2011), 9020–9025.
  • Dirk Helbing, Anders Johansson, and Habib Al-Abideen, “Dynamics of crowd disasters: an empirical study,” Physical Review E 75 (2007), 046109; Yuki Sugiyama and colleagues, “Traffic jams without bottlenecks,” New Journal of Physics 10 (2008), 033001; Kai Nagel and Michael Schreckenberg, “A cellular automaton model for freeway traffic,” Journal de Physique I 2 (1992), 2221–2229.
  • Anita Woolley, Christopher Chabris, Alex Pentland, Nada Hashmi, and Thomas Malone, “Evidence for a collective intelligence factor in the performance of human groups,” Science 330 (2010), 686–688; Timothy Bates and Shivani Gupta, “Smart groups of smart people: evidence for IQ as the origin of collective intelligence in the performance of human groups,” Intelligence 60 (2017), 46–56; Christoph Riedl and colleagues, “Quantifying collective intelligence in human groups,” PNAS 118 (2021), e2005737118.