A plume of radioactive fallout (yellow) stretches east across Washington, D.C., a few hours after a nuclear bomb goes off near the White House in this snapshot of an agent-based model. Bar heights show the number of people at a location, while color indicates their health. Red represents sickness or death.
The roots of agent-based modeling go back at least to the 1940s, when computer pioneers such as Alan Turing experimented with locally interacting bits of software to model complex behavior in physics and biology. But the current wave of development didn't get underway until the mid-1990s.
One early success was Sugarscape, developed by economists Robert Axtell of George Mason University in Fairfax, Virginia, and Joshua Epstein of New York University (NYU) in New York City. Because their goal was to simulate social phenomena on ordinary desktop computers, they pared agent-based modeling down to its essence: a set of simple agents that moved around a grid in search of "sugar"—a foodlike resource that was abundant in some places and scarce in others. Though simple, the model gave rise to surprisingly complex group behaviors such as migration, combat, and neighborhood segregation.
Another milestone of the 1990s was the Transportation Analysis and Simulation System (Transims), an agent-based traffic model developed by Barrett and others at the Los Alamos National Laboratory in New Mexico. Unlike traditional traffic models, which used equations to describe moving vehicles en masse as a kind of fluid, Transims modeled each vehicle and driver as an agent moving through a city's road network. The simulation included a realistic mix of cars, trucks, and buses, driven by people with a realistic mix of ages, abilities, and destinations. When applied to the road networks in actual cities, Transims did better than traditional models at predicting traffic jams and local pollution levels—one reason why Transims-inspired agent-based models are now a standard tool in transportation planning.
A similar shift was playing out for epidemiologists. For much of the past century, they have evaluated disease outbreaks with a comparatively simple set of equations that divide people into a few categories—such as susceptible, contagious, and immune—and that assume perfect mixing, meaning that everybody in the affected region is in contact with everyone else. Those equation-based models were run first on paper and then on computers, and they are still used widely. But epidemiologists are increasingly turning to agent-based models to include factors that the equations ignore, such as geography, transportation networks, family structure, and behavior change—all of which can strongly affect how disease spreads. During the 2014 Ebola outbreak in West Africa, for example, the Virginia Tech group used an agent-based model to help the U.S. military identify sites for field hospitals. Planners needed to know where the highest infection rates would be when the mobile units finally arrived, how far and how fast patients could travel over the region's notoriously bad roads, and a host of other issues not captured in the equations of traditional models.
In another example, Epstein's laboratory at NYU is working with the city's public health department to model potential outbreaks of Zika, a mosquito-borne virus that can lead to catastrophic birth defects. The group has devised a model that includes agents representing all 8.5 million New Yorkers, plus a smaller set of agents representing the entire population of individual mosquitoes, as estimated from traps. The model also incorporates data on how people typically move between home, work, school, and shopping; on sexual behavior (Zika can be spread through unprotected sex); and on factors that affect mosquito populations, such as seasonal temperature swings, rainfall, and breeding sites such as caches of old tires. The result is a model that not only predicts how bad such an outbreak could get—something epidemiologists could determine from equations—but also suggests where the worst hot spots might be.
In economics, agent-based models can be a powerful tool for understanding global poverty, says Stéphane Hallegatte, an economist at the World Bank in Washington, D.C. If all you look at are standard metrics such as gross domestic product (GDP) and total income, he says, then in most countries you're seeing only rich people: The poor have so little money that they barely register.
To do better, Hallegatte and his colleagues are looking at individual families. His team built a model with agents representing 1.4 million households around the globe—roughly 10,000 per country—and looked at how climate change and disasters might affect health, food security, and labor productivity. The model estimates how storms or drought might affect farmers' crop yields and market prices, or how an earthquake might cripple factory workers' incomes by destroying their cars, the roads, or even the factories.
The model suggests something obvious: Poor people are considerably more vulnerable to disaster and climate change than rich people. But Hallegatte's team saw a remarkable amount of variation. If the poor people in a particular country are mostly farmers, for example, they might actually benefit from climate change when global food prices rise. But if the country's poor people are mostly packed into cities, that price rise could hurt badly.
That kind of granularity has made it easier for the World Bank to tailor its recommendations to each country's needs, Hallegatte says—and much easier to explain the model's results in human terms rather than economic jargon. "Instead of telling a country that climate change will decrease their GDP by X%," he says, "you can say that 10 million people will fall into poverty. That's a number that's much easier to understand."
Given how much is at stake in those simulations, Barrett says, users always want to know why they should trust the results. How can they be sure that the model's output has anything to do with the real world—especially in cases such as nuclear disasters, which have no empirical data to go on?
Barrett says that question has several answers. First, users shouldn't expect the models to make specific predictions about, say, a stock market crash next Tuesday. Instead, most modelers accommodate the inevitable uncertainties by averaging over many runs of each scenario and displaying a likely range of outcomes, much like landfall forecasts for hurricanes. That still allows planners to use the model as a test bed to game out the consequences of taking action A, B, or C.