Watching hours of “sheepdog YouTube”—competitions where trained dogs shepherd a small number of unpredictable sheep—gave scientists a key insight into how to control chaotic swarms. The trick, they write in Science Advances, is to exploit the sheep’s indecisiveness.
Sheepdogs routinely steer and split groups of 50 or more sheep. But in the century-old tradition of sheepdog trials, dogs display their skills by controlling only four or five. Such a small flock is inherently “noisier”—less predictable—and harder to manage than a large herd. Without the safety of numbers, their individual personalities can drive them to frequently switch between “Flee the dog!” and “Keep calm and follow the others.” How do sheepdogs successfully steer small groups of erratic sheep?
By analyzing sheepdog trials on YouTube and talking to farmers in Georgia, the researchers discovered the dogs’ two-step strategy: (1) wait for all the sheep to face the right direction as they flip around at random; (2) immediately chase them.
On supporting science journalism
If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.
Once the aligned sheep start moving, they will randomly switch between “follow” and “flee” and quickly break their formation. At that point, the dog pauses and waits for them to orient again. It’s a slow, “delicate dance,” says study co-author Saad Bhamla, a biomolecular engineer at the Georgia Institute of Technology. But through patience and timing, the dog exploits the sheep’s own randomness to maneuver the flock. Bhamla likens it to sailing a ship on a windy day, raising sails only when the wind is heading your direction.
Inspired by the chaotic sheep, the researchers devised an “Indecisive Swarm Algorithm” for robots that keep switching who they follow (either the researchers’ controller or a neighboring bot). This tactic created easier-to-control robots than having the bots either follow only the controller or average the movement of all their neighbors to follow, which eventually dilutes the controller’s signal. In the future, the researchers say, this algorithm could help to organize other noisy collectives, such as a bunch of drones, self-driving cars or even AI agents working together, which could be programmed to swap between following other individuals’ leads and the overarching controller. “Indecisiveness prevents the group from binding up and makes it more pliable,” says Ted Pavlic, a computer scientist at Arizona State University, who was not involved in the study. Noisiness can help avoid deadlocks like those recently seen affecting groups of autonomous cars.
“We tend to think of noise as a problem that makes systems less predictable, less optimized,” says Raphaël Sarfati, a physicist at Goodfire AI, who was also not involved in the work. “[But] we see everywhere that noise, a little bit of noise at least, is really, really good for driving systems toward a better optimum.”

