What is Agent-Based Modeling?
Agent-based modeling is a method of using computer simulations to examine how the choices and behaviors of many individual “agents” (like people, animals, particles, or even galaxies) can add up to create larger patterns and outcomes. Each agent follows their own simple rules, but together they can produce surprising and complex results, helping us understand how systems like societies, markets, or ecosystems behave.
The Basic Idea
Imagine a small town that has been struck by a contagious disease. Each person in the town could be healthy, sick, or recovered, and their state changes depending on who they come into contact with. If a healthy person spends time near someone who is sick, they might catch the illness. After a period of being sick, people recover and no longer spread the disease. As individuals go about their daily business, moving through shops, schools, and public spaces, the disease spreads or dies out depending on these everyday interactions.
This kind of situation—where the outcome for the whole community depends on the simple, local decisions of many individuals—is exactly the sort of system that agent-based modeling is designed to explore. Instead of treating the town as a single unit, agent-based models consider each person (or agent) separately, giving them their own rules and behaviors. When all these agents interact, larger patterns begin to emerge, like waves of infection or the eventual decline of the outbreak.
Agent-based modeling (ABM) focuses on understanding complex systems by simulating individual agents and their interactions within an environment.1 This approach helps researchers make sense of these bottom-up processes, where no single individual is directing the system, but collective patterns still arise. By recreating scenarios like a town facing an epidemic, it allows researchers to test “what if” questions—like what would happen if people social distance, or if a vaccine is introduced—and see how those choices ripple outward to shape the bigger picture.
ABM is a type of microscale model, a computer simulation that looks closely at the small details of a system. It’s the opposite of macroscale models, which simplify things by grouping people or actions into larger categories. When exploring a problem, researchers can combine microscale and macroscale approaches to see both the fine-grained interactions that drive change and the bigger patterns that emerge at the system level.
The application of ABM goes far beyond public health and epidemics. In fact, agents can be pretty much whatever you want them to be, such as ants in a colony, consumers in an economy, particles in a gas, or even galaxies in the universe. Wherever there’s a large and complex system to understand, ABM can be applied. This approach has been utilized across various fields: in economics to explore how small investor choices can ripple through markets, in urban planning to understand how traffic jams form even without accidents, in sociology to analyze how misinformation spreads through social networks, and in geography to see how communities recover - or struggle to recover - after natural disasters.
“All models are wrong, but some are useful.”
— George E. P. Box, British statistician2
Key Terms
Microscale Model: A model that focuses on the fine details of a system by simulating the behavior of its smallest parts, such as individual people, households, animals, or particles. Each unit is treated separately, often with its own rules, characteristics, and decision-making processes. By modeling these small-scale interactions, microscale models can reveal how local behaviors build up into larger outcomes.
Macroscale Model: A model that looks at systems as a whole, grouping individual behaviors into broad categories to capture overall trends. Instead of focusing on each agent, it uses averages, equations, or aggregated data to show how the system behaves in general. This approach is simpler and often easier to compute, but it may overlook the diversity and complexity of individual behaviors.
Emergence: The process by which complex patterns, structures, or behaviors arise from the simple actions of many individual parts. Each agent in the system may be following only basic rules, but together they produce outcomes that are often surprising or unpredictable.
Large Language Models (LLMs): A type of artificial intelligence trained on vast amounts of text data. They use patterns in this data to predict words, generate text, and respond to prompts in ways that sound human-like.
Generative Agents: Computer agents designed to act in lifelike ways, often powered by large language models. Unlike simple agents that follow fixed rules, generative agents can plan, remember past experiences, and respond flexibly to their environment. In simulations, they can behave much like humans—chatting, forming relationships, or organizing events—making them useful for studying social dynamics in more realistic ways.
Overfitting: A process that occurs when a model is designed to fit past data so closely that it ends up capturing not just meaningful patterns but also random noise or coincidences. While this makes the model look accurate on old data, it reduces its ability to predict new situations. In other words, an overfitted model knows the training data “too well” and struggles when faced with anything different.
History
Agent-based modeling can be traced back to the 1930s, when Italian physicist Enrico Fermi was tackling the problem of how neutrons (the tiny particles found in the nucleus of an atom) move through matter.3 Each neutron’s path was uncertain—it might collide, scatter, or pass straight through—making it almost impossible to calculate the overall behavior of millions of them at once. Instead of trying to solve the whole system directly, Fermi treated each neutron individually, like an agent. Using a hand-cranked mechanical adding machine and random numbers to represent probabilities, he simulated their individual journeys step by step. Repeating this for many “virtual” neutrons gave him a remarkably accurate picture of how they behaved in reality, much to the surprise of his colleagues at the time.4
These early techniques became vital for research into nuclear power and weapons. Crucially, Fermi’s approach coincided with the arrival of the first electronic computers, which made it possible to run far more complex simulations. By the early 1940s, during World War II, these ideas were taken up at Los Alamos National Laboratory in the United States, where scientists, such as Stanisław Ulam, John von Neumann, and Nicholas Metropolis, were working on the Manhattan Project, the secret program to develop nuclear weapons.
As they developed Fermi’s new approach, they gave it a new name that reflected its reliance on chance: the Monte Carlo method. The story goes that the name was inspired by Ulam’s uncle, who liked to borrow money for trips to the Monte Carlo casino in Monaco. In 1949, Ulam and Metropolis published a landmark paper, The Monte Carlo Method, which laid out the many ways random numbers could be used to tackle difficult problems.5 One of those problems was designing nuclear reactors and predicting how chain reactions would unfold inside atomic bombs.
Not all of the Monte Carlo methods set out in their paper are agent-based models. However, they all share the idea of using computer-generated randomness to find solutions. Since then, the Monte Carlo technique has been applied in a wide variety of fields, including solving complex equations with many variables, managing risk and disasters, and guiding financial investments. In keeping with their namesake, the Monte Carlo methods have also been applied to various forms of gambling, especially for studying sports betting results and the role of chance in casino games.6
American economist Thomas Schelling was the next to make a significant breakthrough in the development of ABM with his segregation model.7 Schelling wanted to understand how agents’ preferences about where they lived affected large-scale population patterns. He used a very simple setup, with agents representing households on a checkerboard-like grid. Each household had a mild preference—for example, wanting at least a certain percentage of their neighbors to be of the same group. Importantly, Schelling showed that even when individuals had only slight preferences for similarity, neighborhoods quickly became segregated. The model also demonstrated a core principle of ABM called emergence: when simple parts, following simple rules, come together to create complex patterns or behaviors that weren’t planned or obvious from the start.
However, it wasn’t until the 1990s that ABM became a widespread approach, due largely to the fact that it requires computation-intensive procedures. During this decade, several ABMs were created across different fields, such as Joshua Epstein and Robert Axtell’s “Sugarscape,” which was developed to simulate the role of social phenomena such as seasonal migrations, pollution, and sexual reproduction.8 By the early 2000s, ABM had entered the world of human cognition, such as in the work of Rosaria Conte and Cristiano Castelfranchi.9 ABM was used to simulate phenomena like learning, decision-making, and the spread of beliefs or cultural norms, showing how simple cognitive rules at the individual level could scale up into complex social patterns such as cooperation, trust, or polarization.
Today, agent-based modeling is no longer limited to simple rule-following agents. Advances in artificial intelligence, particularly the rise of large language models (LLMs), are transforming what agents can look like.10 Instead of coding agents with just a handful of fixed behaviors, researchers are now experimenting with giving them the ability to reason, converse, and adapt using LLMs as their “brains.” For example, experiments at Stanford and elsewhere have developed “generative agents”—LLM-driven characters living in a virtual town—who plan their days, chat with neighbors, and collectively organize events.10 In effect, these agents don’t just follow pre-programmed rules or explicit instructions, but generate behaviors in the moment, creating much more lifelike simulations.
As agent-based modeling continues to evolve, powered by advances in computing and artificial intelligence, its future applications promise to stretch far beyond physics and economics, offering new ways to understand everything from social behavior and public health to climate resilience and artificial societies.
People
Enrico Fermi
An Italian-born physicist, Fermi was one of the most celebrated experimental and theoretical scientists of the 20th century. He won the 1938 Nobel Prize in Physics for his work on nuclear reactions and later emigrated to the U.S., where he became a central figure in the Manhattan Project. Known as the “architect of the nuclear age,” he also pioneered early uses of simulation, treating particles like “agents” long before agent-based modeling had a name.
Stanisław Ulam
Ulam escaped war-torn Europe to work at Los Alamos, New Mexico, on the Manhattan Project. He is credited with co-inventing the Monte Carlo method, inspired partly by his musings on solitaire card games during illness. Ulam made contributions across fields from set theory to nuclear physics, and his playful, creative thinking shaped many of the mathematical tools we still use today.
John von Neumann
A Hungarian-American mathematician and polymath, von Neumann contributed to nearly every field of modern science, from quantum mechanics and game theory to computer science and economics. At Los Alamos, he worked on nuclear weapons and computing, and his ideas helped form the basis of modern digital computers.
Nicholas Metropolis
Born in Chicago to Greek immigrant parents, Metropolis became a physicist and computer scientist at Los Alamos. He co-authored the landmark 1949 paper on the Monte Carlo method with Ulam, formalizing one of the most influential techniques in simulation. Metropolis was also deeply involved in building some of the earliest digital computers, linking advances in hardware with the rise of computational modeling.
Thomas Schelling
An American economist and Nobel laureate, Schelling made a groundbreaking contribution to agent-based modeling with his 1971 “segregation model.” Using simple checkerboard simulations, he showed how even mild individual preferences could lead to strongly segregated neighborhoods. Beyond modeling, Schelling was a key figure in Cold War strategy, influencing nuclear deterrence policy and the study of conflict and cooperation.
behavior change 101
Start your behavior change journey at the right place
Impacts
Agent-based modeling is not only a method for exploring how systems work, but also a tool with wide-reaching practical impacts. By showing how individual actions scale up into collective outcomes, ABM helps us understand complex problems, test interventions that would be impossible in real life, and explore scenarios across domains, from public health to conflict.
Emergent behavior
One of the most important contributions of ABM is that it allows us to see and understand emergence, or emergent behavior—the way countless individual actions combine to create large-scale patterns. What makes this so powerful is that the agents themselves follow only simple rules, yet when they interact repeatedly, outcomes appear that no single agent could have produced alone. This is important for understanding events that are unique or unprecedented, such as the COVID-19 pandemic.14
This principle can be applied across a wide range of areas. In transport systems, for example, models have shown how traffic jams can form even when there are no accidents or obstacles on the road, simply from the knock-on effects of individual drivers slowing down or changing lanes. In economics, agent-based approaches help explain how people’s expectations and decisions—such as confidence in markets or beliefs about inflation—aggregate into trends that shape entire economies. This is closely related to Adam Smith’s famous metaphor of the “invisible hand”: the idea that the self-interested actions of individuals can combine into wider social or economic outcomes.
What ABM offers is the chance to make this invisible hand visible. Instead of assuming in advance that many individuals together will produce a particular result, ABM allows us to watch those results emerge directly from the bottom up.
Ethical experimentation
Imagine that you wanted to understand how different evaluation strategies play out in an emergency. Or how quickly a mutant strain of a highly contagious virus could spread between countries. It would be highly unethical and impossible to conduct experiments with real people to find out the answers. ABM allows researchers to explore these scary, hypothetical, and large-scale scenarios in a safe, virtual laboratory. The results that they generate can be used by policy makers, strategists, and decision makers to design better systems and anticipate the possible consequences.
For instance, in their simulation of earthquake evacuations at Harbin subway stations in China, engineer Ying-xin Chen modelled different types of evacuees, such as leaders, ordinary passengers, and panicked individuals.15 The outcomes of the simulations showed how having guiding agents (leaders) significantly improved evacuation efficiency and reduced delay times.
Exploring possibilities
One of the great strengths of ABM is its ability to explore an enormous range of possibilities quickly and efficiently. Instead of trying to solve equations that describe an entire system all at once, ABM allows us to assign simple, probabilistic rules to each individual agent and then let the system play out. This bottom-up approach not only makes it easier to capture complexity, but also provides insights into outcomes that might be missed by more traditional, top-down methods.
In studies of conflict, for example, traditional models have often relied on rigid equations that track the changing size of armies as a whole. Agent-based approaches, on the other hand, represent each combatant, unit, or group as an agent, allowing for much greater heterogeneity. In these simulations, researchers and strategists can test how small changes ripple through a battlefield: What happens if one side has superior technology but lower morale, or if units adopt more adaptive tactics? ABM has the capacity to explore how these small differences in strategy, training, morale, or equipment have a big impact on the outcome of conflict.13
Controversies
Agent-based modeling has grown in popularity as a powerful way to simulate complex systems, but it is far from universally accepted. Critics raise a number of concerns, ranging from how models handle policy changes to their tendency toward over-customization, and even whether they can ever truly capture the complexity of human behavior.
Too bespoke
The greatest strength of ABM is also perhaps its greatest weakness. With so many choices in how to design agents, set rules, and define environments, most models end up being bespoke—custom-built to answer a single question.3 And while this can lead to detailed results that are very useful for understanding that particular phenomenon, these insights and the model aren’t transferable to other problems. For example, a model designed to explore how bonds are traded won’t tell us much about the housing market, even though both involve finance. Each new question often requires building a new model from scratch or heavily adapting an old one.
Unlike some other modeling approaches that rely on broad equations to cover whole sectors of the economy or society, like the SIR (Susceptible–Infected–Recovered) framework in epidemiology, ABM trades that generality for flexibility and realism. The challenge for researchers is finding the right balance: making models detailed enough to be realistic, but not so narrow that they only apply to one very specific scenario.
Human behavior
Agent-based modeling has long been criticized for oversimplifying human behavior. Critics argue that they represent individuals as simple rule-followers who are always looking to optimize their decisions.17 Yet in reality, not all humans follow simple rules; their behaviors are complex, and bounded rationality tells us that we don’t always go for the optimal decision due to cognitive limitations. In other words, some argue that these models fail to capture the complexity of human decision-making, along with the learning, emotions, social norms, and cognitive biases that shape it.
Another related critique is that ABMs often rely on many assumptions about how agents behave, which makes them hard to test against real-world evidence.18 Scholars stress that for ABMs to really help us understand the systems they simulate, they need to be carefully validated.19 Yet there are no standard ways of calibrating them with data, raising concerns about how reliable or reproducible their results are. Because they can generate highly detailed outputs, it’s also tricky to tell whether the patterns we see are genuinely meaningful or just the product of overfitting. John von Neumann—though the line is sometimes attributed to Enrico Fermi—joked about this problem when he said, “With four parameters I can fit an elephant, with five I can make him wiggle his trunk.” What he meant by this is that if a model is too flexible, it may “fit” past data perfectly but tell us very little about reality, because it’s just mimicking patterns rather than explaining them.
Case Studies
Social media
How often do you reflect on the consequences of your actions on social media? A single click to “like” a friend’s post or share a funny Reel may feel trivial, but across millions of users, these small actions accumulate into powerful collective outcomes. They can shape public debate by amplifying certain voices, burying others, and in some cases, fueling division. ABM provides a way to explore these dynamics in a virtual space, enabling researchers to test how simple rules of interaction might snowball into large-scale patterns of polarization or misinformation.
Recent work has taken this even further by combining ABM with large language models, creating agents that not only interact with each other but also generate lifelike posts and conversations. In one study, researchers simulated online discussions during the 2020 U.S. election.16 Each agent was given traits like political leaning and communication style, and when released into the model, they quickly began to cluster into like-minded groups. Over time, their conversations reproduced the same partisan language and echo chambers we see in real life. The researchers also tested what happened when recommender systems were introduced, showing that these algorithms significantly strengthened polarization by funneling agents toward similar voices and viewpoints.
The use of ABM to analyze large social media platforms revealed how simple, everyday choices—clicking, posting, or sharing—stack up into emergent outcomes with serious social consequences. And because such experiments would be impossible (and unethical) to run in the real world, simulation offers policymakers, platform designers, and society at large a critical tool for understanding the risks and trade-offs of digital life.
Why Brazil nuts are on top
Perhaps one of the most entertaining applications of ABM was in a study to simulate how mixed nuts segregate over time in a bag.11 If you’ve ever ripped open a bag of mixed confectionery or snacks, you may have found that certain “agents” have sunk to the bottom, while others remain on top. And while you may be thinking that this isn’t one of humanity’s most pressing concerns (unless you like your mixed nuts truly mixed), the research findings had important implications for industries dealing with particulate matter, like pharmaceuticals, manufacturing, and, of course, the food industry.
What the researchers from Carnegie Mellon University found was that the “Brazil nut effect” isn’t just about small pieces sifting downwards. To test this, they built a simulation where each nut was treated like an agent, with its own size and simple rules for how it could move when the container was shaken. Time after time, the same pattern appeared: as small pieces slipped into the gaps below, the larger ones were nudged upwards until they floated to the surface. No single nut “decided” to rise, but the collective outcome of all those tiny interactions was segregation.
The researchers’ simulations also revealed that the way a container is shaken makes a big difference. Vertical shaking quickly produces segregation, while side-to-side motion is far less effective. And unless the shaking is strong enough to lift particles slightly, no segregation occurs at all.
Thirty-four years after this important simulation, researchers at the University of Manchester used time-lapse X-ray Computer Tomography to follow the motion of the Brazil nuts being agitated in a bag.12 By using this technology, the researchers could see what was happening inside the pile of nuts. Competing against smaller peanuts, the Brazil nuts were once again on top, but an interesting behavior was observed. The Brazil nuts that made it to the top first started the process horizontally, before moving into an upright position, and finally finishing in a horizontal position at the top of the bag.
Related TDL Content
Virtual Agents
The world is full of agents. In companies across the globe, AI-powered software called “virtual agents” are simulating human conversation and performing tasks typically handled by customer service representatives. In this article, we look at how these agents work, where they’re being used, and some of the controversies that surround their usage.
Is agent-based modeling the future of behavioral science?
Human behavior doesn’t occur in isolation, but in response to the environment, making ABM a useful behavioral science tool. In this article, Dr. Sekoul Krastev explores how ABM is vital to the future of behavioral science, especially as the field becomes more complex and dynamic as our societies transform.
Sources
- Macal, C. M., & North, M. J. (2005). Tutorial on agent-based modeling and simulation. Proceedings of the Winter Simulation Conference, 14. IEEE
- Nester, M. R. (1996). An applied statistician’s creed. Journal of the Royal Statistical Society: Series C (Applied Statistics), 45(4), 401–410
- Turrell, A. (2016). Agent-based models: Understanding the economy from the bottom up (Quarterly Bulletin, Q4, pp. 173–186). Bank of England.
- Metropolis, N (1987), ‘The beginning of the Monte Carlo method’, Los Alamos Science, Vol. 15(584), pages 125–30.
- Metropolis, N., & Ulam, S. (1949). The Monte Carlo method. Journal of the American Statistical Association, 44(247), 335–341.
- Betinasia. (n.d.). Monte Carlo simulations explained. Betinasia (Academy). https://betinasia.com/blog/academy/monte-carlo-simulations-explained/
- Schelling, T. C. (1971). Dynamic models of segregation. Journal of Mathematical Sociology, 1(2), 143–186.
- Epstein, J. M., & Axtell, R. (1996). Growing artificial societies: Social science from the bottom up. Brookings Institution Press.
- Conte, R., & Castelfranchi, C. (2001). Cognitive and social action. Routledge.
- Park, J. S., O’Brien, J. C., Cai, C. J., Morris, M. R., Liang, P., & Bernstein, M. S. (2023). Generative agents: Interactive simulacra of human behavior. Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology, 1–22. ACM.
- Rosato, A., Strandburg, K. J., Prinz, F., & Swendsen, R. H. (1987). Why the Brazil nuts are on top: Size segregation of particulate matter by shaking. Physical Review Letters, 58(10), 1038–1040.
- Gajjar, P., Johnson, C. G., Carr, J., & Pöschel, T. (2021). Size segregation of irregular granular materials captured by time-resolved 3D imaging. Scientific Reports, 11, 8352.
- Bowen, R. J. (2008). An agent-based combat simulation framework in support of effect-based and net-centric evaluation(Master’s thesis, Old Dominion University). Old Dominion University Digital Commons.
- Nitzsche, C., & Simm, S. (2024). Agent-based modeling to estimate the impact of lockdown scenarios and events on a pandemic exemplified on SARS-CoV-2. Scientific Reports, 14, 13391.
- Chen, Y.-X. (2020). Agent-based research on crowd interaction in emergency evacuation. Cluster Computing, 23, 189–202.
- Ferraro, A., Galli, A., La Gatta, V., Postiglione, M., Orlando, G. M., Russo, D., Riccio, G., Romano, A., & Moscato, V. (2024). Agent-Based Modelling Meets Generative AI in Social Network Simulations. Proceedings of the 2024 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM).
- Epstein, J. M. (2012). Generative social science: Studies in agent-based computational modeling. Princeton University Press.
- Windrum, P., Fagiolo, G., & Moneta, A. (2007). Empirical validation of agent-based models: Alternatives and prospects. Journal of Artificial Societies and Social Simulation, 10(2), Article 8.
- Larooij, M., & Törnberg, P. (2025). Do large language models solve the problems of agent-based modeling? A critical review of generative social simulations [Preprint]. arXiv.



















