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.”
It’s Time to Stand Up for Science
If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.
I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.
If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.
In return, you get essential news, captivating podcasts, brilliant infographics, can’t-miss newsletters, must-watch videos, challenging games, and the science world’s best writing and reporting. You can even gift someone a subscription.
There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.


