After playing a key role in the fight against Ebola, agent-based models are poised to help decision-makers tackle other disease outbreaks, economic turbulence, and more.

When news of West Africa’s Ebola outbreak first appeared in the spring of 2014, “the world wasn’t paying a lot of attention,” says Bryan Lewis. After all, previous flare-ups of the virus had burned out quickly, mainly because victims tend to die of fever, shock, and spontaneous bleeding before they can spread the virus very far.

In September 2014, researchers at Virginia Tech in Blacksburg built one of the first large-scale agent-based models of West Africa’s Ebola epidemic. As seen here in a close-up of Liberia’s capital city, Monrovia, the simulation modeled individual people, or “agents,” as they moved back and forth to school, workplaces, or markets and came into contact with other agents who were infected. Image courtesy of The Biocomplexity Institute of Virginia Tech (Blacksburg, VA).

Except this time was different. In the hardest hit nations of Guinea, Liberia, and Sierra Leone, the Ebola toll just kept climbing. By early summer, the region was seeing about 100 new cases every week, and alarm bells were going off in public health organizations around the world. So in July, Lewis wasn’t too surprised when the United States government’s Defense Threat Reduction Agency (DTRA) asked him to develop a model of how the outbreak might progress.

“I didn’t even hesitate,” says Lewis, a computational biologist at the Virginia Polytechnic Institute and State University (Virginia Tech) in Blacksburg. He and his Virginia Tech colleagues had spent a decade building sophisticated computer simulations of how people and pathogens behave during epidemics, but this was a rare chance to help save people in real time. “It fired up my public health juices,” he says.

It was the beginning of a 7-month sprint. Lewis and his colleagues found themselves working in tandem with modeling teams around the world (1), all feverishly racing to answer relief agencies’ questions fast enough to make a difference on the ground: How bad will it get? How many mobile hospitals should we send? And how do we field-test a vaccine?

The modelers used every tool at their disposal, including mathematical equations that provided the simplest possible model for the spread of infection, and more detailed network models that described how the complex web of human relationships would affect Ebola’s trajectory through the population. But for the toughest questions, researchers increasingly turned to cutting-edge “agent-based” models. These artificial societies contain thousands or even millions of subroutines, each representing individual people moving through virtual landscapes while behaving in more or less human ways. Modelers can simulate real-world geography and transportation networks; realistic populations that have the right distribution of ages, genders, and jobs; and details about who comes into contact with whom: “the entire social structure of households, hospitals, and workplaces,” says Ira Longini, a statistician and modeler at the University of Florida in Gainesville.

No model can tell what is going to happen to a specific person, any more than a weather forecast can predict exactly where lightning will strike. But agent-based models can predict the chances of stormy weather, so to speak, which is why decision-makers tackling the Ebola crisis embraced such models as never before, desperate to know whether one course of action would do more to temper the storm than another.

That trend seems set to continue. Some modelers are applying the lessons they learned from the Ebola crisis to newly emerging threats, such as the Zika virus; others are designing equally sophisticated artificial societies to help inform real-world decisions in economics, transportation, public health, urban planning, and more. Policymakers are increasingly using these models to try out policy options before making a commitment, says Nigel Gilbert, a sociologist at the University of Surrey, United Kingdom, and founding editor of the Journal of Artificial Societies and Social Simulation. And that presents a daunting challenge: “People are going to be relying on our models being right. That’s a big responsibility.”

Under Pressure In a sense, agent-based modeling is almost as old as computing itself. The idea of locally interacting bits of software dates back at least to the 1940s, when mathematicians Stanislaw Ulam and John von Neumann started exploring how to simulate crystals and self-reproducing systems with “cellular automata”: chessboard-like grids in which each square, or cell, constantly updates itself based on what the neighboring cells are doing (2). Perhaps the first successful effort to do agent-based modeling of human societies was SOCSIM (Social Simulation), a program developed in the 1970s by the late English historian Peter Laslett and his coworkers (3). And a pioneering application of agent-based ideas to disease control was ONCHOSIM, a model devised in the late 1980s to help health officials in Africa control the parasitic worm responsible for onchocerciasis or river blindness (4). Still, agent-based modeling didn’t really start to take off until the mid-1990s, with the advent of increasingly powerful computers. One success from that era was Transims (ndssl.vbi.vt.edu/apps/transims/), which used agents that represented individual vehicles moving through a city-scale traffic simulation. Another was Sugarscape (5), in which agents’ quest for a resource (dubbed “sugar”) that was abundant in some places and scarce in others generated surprisingly complex group behaviors, including migration, combat, and neighborhood segregation. Agent-based models have blossomed since then, bolstered by “computers large enough to do a big-ass, giant model; the neuroscience to populate it with cognitively plausible agents; and the big-data sources to calibrate it with lots of real data,” says Joshua Epstein, an economist at the Johns Hopkins University in Baltimore and a codeveloper of Sugarscape. By 2014, the simulations had matured into systems that decision-makers could take seriously. “They’re the most flexible and detailed models out there,” says Longini, “which makes them by far the most effective in understanding and directing policy.” The downside is that these models need plenty of computational muscle. (Virginia Tech runs some of the biggest on supercomputers at places like the Lawrence Livermore National Laboratory in California.) They also depend on lots of data to calibrate the agents’ behavior, so that they match the way people respond to events in the real world. And it can take months—or even years—for researchers to build and fine-tune their models. Unfortunately, data and time were in extremely short supply in the case of the Ebola outbreak, a reality that pushed many of the modelers way out of their academic comfort zone. Response agencies needed answers in a week, if not days; and overwhelmed medical facilities in West Africa could only provide sketchy data about how many people were getting sick, and who recovered. “The situation was really very frightening,” says Richard Hatchett, former deputy director of Biomedical Advanced Research and Development Authority (BARDA), part of the US Department of Health and Human Services. “People were afraid of it spreading to a megalopolis like Lagos—maybe exploding across Africa,” he says. Or the world. Even before attempting an agent-based modeling approach, the modelers were forced to try a new way of working as they entered crisis mode: scrape together whatever data they could find, fill in the rest with educated guesses, give the agencies the best answers they could, and then do it all over again the next day. The Virginia Tech team initially assigned a high-school summer intern, Katie Dunphy, to get up early every morning, gather the latest numbers from the Facebook page of Sierra Leone’s public health ministry—the only place where the data were being reported at the time—and then pass the results to an undergraduate intern who plotted them in a geographical information system. After a few weeks, however, as the severity of the epidemic became apparent, these duties were taken over by a graduate student, Caitlin Rivers, who posted everything online for other researchers to access. That provided enough information to model the epidemic in classic mathematical fashion, using decades-old equations that projected future infection rates based on simple statistics: how many people are susceptible to Ebola right now, how many are already infected and contagious, and how many have survived and are immune. In August 2014, the most influential of these models predicted that if nothing more was done to stop the epidemic, Ebola cases in West Africa would explode from about 3,500 to somewhere between half a million and 1.4 million cases by January 2015. Many critics argued that this was much too pessimistic, but it helped spur US President Barack Obama to send United States military personnel to assist medical response teams in West Africa. “It really galvanized US officials to understand the urgency of moving with great haste to get this under control,” says Hatchett. The big question was: how? Although mathematical models capture some of the major features of epidemics’ rise and fall, they often only offer up limited labels (healthy or infected, for example) and assume that everyone is in contact with everyone else. Agent-based models can account for real-world factors, such as geography, transportation, family and social relationships, as well as other individual differences. Figure courtesy of ref. 11.

A “What if?” Tool The struggle to find an answer soon led the Ebola modelers into the second, much tougher phase of their work: planning interventions. “At that point the model becomes something more important than a forecasting tool,” says Alessandro Vespignani, who headed an extensive Ebola modeling effort at Northeastern University in Boston. “It becomes a ‘what if?’ tool.” The good news was that health workers in West Africa were finally beginning to provide more data about the outbreak, enabling modelers to tackle those questions with fully fledged agent-based models. The bad news was that the clock was as tyrannical as ever. On a Friday afternoon in early October 2014, for example, Pyrros Telionis, a Virginia Tech graduate student in computational biology, got a phone call from DTRA: could his models identify the best places to put mobile Ebola treatment units in southern Liberia by Monday morning, before the cargo planes took off? Telionis and fellow graduate student James Schlitt promptly scrapped their weekend plans and plunged in. They couldn’t just recommend putting the treatment units in the most heavily infected areas; they had to project where the epidemic would be when the treatment units actually reached their destinations, and then factor in the muddy or impassible roads that people would use to reach them. The two graduate students worked around the clock, piecing together algorithms and data from colleagues, using agent-based models, mathematical models, whatever worked. But they met their deadline. “DTRA would neither confirm nor deny that they had used our suggestions,” says Schlitt. “But the locations they used were very similar to what we gave them.” In the end, though, what really tamed the Ebola epidemic wasn’t just international aid—as essential as that was—but the changing behaviors of the people of West Africa themselves: behaviors that could, to some extent, be captured in agent-based models. One of the first signs of those changes had come in September 2014, when infection rates began to fall in Lofa County, Liberia. The region’s traditional burial practices—which included rituals such as caressing and washing the deceased—were virtually guaranteed to spread an Ebola infection. But after a local health official urged people to change those rituals, it slowed the transmission of the virus. At a BARDA meeting that month, Lewis used agent-based models to argue that if these behavioral changes were repeated across West Africa, the resulting decrease in new infections would be enough to stop Ebola in its tracks. The attendees were dubious that such a widespread culture change would ever take hold. However, it did. West Africans embraced sanitation, quarantine, and safe burial, and infection rates started to fall. By the time West Africa was finally declared Ebola-free in January 2016, the toll stood at roughly 28,000 cases, and 11,000 dead, a fraction of what had originally been feared.