At last, we have reached the very ﬁnal chapter, on agent-based models (ABMs). ABMs are arguably the most generalized framework for modeling and simulation of complex systems, which actually include both cellular automata and dynamical networks as special cases. ABMs are widely used in a variety of disciplines to simulate dynamical behaviors of systems made of a large number of entities, such as traders’ behaviors in a market (in economics), migration of people (in social sciences), interaction among employees and their performance improvement (in organizational science), ﬂocking/schooling behavior of birds/ﬁsh (in behavioral ecology), cell growth and morphogenesis (in developmental biology), and collective behavior of granular materials (in physics). Figure 19.1 shows a schematic illustration of an ABM.
It is a little challenging to deﬁne precisely what an agent-based model is, because its modeling assumptions are wide open, and thus there aren’t many fundamental constraints that characterize ABMs. But here is what I hope to be a minimalistic deﬁnition of them:
Agent-based models are computational simulation models that involve many discrete agents.
There are a few keywords in this deﬁnition that are important to understand ABMs.
The ﬁrst keyword is “computational.” ABMs are usually implemented as simulation models in a computer, where each agent’s behavioral rules are described in an algorithmic fashion rather than a purely mathematical way. This allows modelers to implement complex internal properties of agents and their nontrivial behavioral rules. Such representations of complex individual traits are highly valued especially in social, organizational
and management sciences, where the modelers need to capture complex, realistic behaviors of human individuals. This is why ABMs are particularly popular in those research areas.
This, of course, comes at the cost of analytical tractability. Since agents can have any number of complex properties and behavioral rules, it is generally not easy to conduct an elegant mathematical analysis of an ABM (which is why there is no “Analysis” chapter on ABMs after this one). Therefore, the analysis of ABMs and their simulation results are usually carried out using more conventional statistical analysis commonly used in social sciences, e.g., by running Monte Carlo simulations to obtain distributions of outcome measurements under multiple experimental conditions, and then conducting statistical hypothesis testing to see if there was any signiﬁcant difference between the different experimental conditions. In this sense, ABMs could serve as a virtual replacement of experimental ﬁelds for researchers.
The second keyword in the deﬁnition above is “many.” Although it is technically possible to create an ABM made of just a few agents, there would be little need for such a model, because the typical context in which an ABM is needed is when researchers want to study the collective behavior of a large number of agents (otherwise it would be sufﬁcient to use a more conventional equation-based model with a small number of variables). Therefore, typical ABMs contain a population of agents, just like cells in CA or nodes in dynamical networks, and their dynamical behaviors are studied using computational simulations.
The third keyword is “discrete.” While there are some ambiguities about how to rigorously deﬁne an agent, what is commonly accepted is that an agent should be a discrete individual entity, which has a clear boundary between self and the outside. CA and network , so they qualify as special cases of ABMs. In the meantime, continuous ﬁeld models adopt continuous spatial functions as a representation of the system’s state, so they are not considered ABMs.
There are certain properties that are generally assumed in agents and ABMs, which collectively deﬁne the “agent-ness” of the entities in a model. Here is a list of such properties:
Typical properties generally assumed in agents and ABMs
- Agents are discrete entities.
- Agents may have internal states.
- Agents may be spatially localized.
- Agents may perceive and interact with the environment.
- Agents may behave based on predeﬁned rules.
- Agents may be able to learn and adapt.
- Agents may interact with other agents.
- ABMs often lack central supervisors/controllers.
- ABMs may produce nontrivial “collective behavior” as a whole.
Note that these are not strict requirements for ABMs (perhaps except for the ﬁrst one). Some ABMs don’t have internal states of agents; some don’t have space or environment; and some do have central controllers as special kinds of agents. Therefore, which model properties should be incorporated into an ABM is really up to the objective of your model.
Before we move on to actual ABM building, I would like to point out that there are a few things we need to be particularly careful about when we build ABMs. One is about coding. Implementing an ABM is usually much more coding-intense than implementing other simpler models, partly because the ABM framework is so open-ended. The fact that there aren’t many constraints on ABMs also means that you have to take care of all the details of the simulation yourself. This naturally increases the amount of coding you will need to do. And, the more you code, the more likely an unexpected bug or two will sneak into your code. It is thus very important to keep your code simple and organized, and to use the best practices in computer programming (e.g., modularizing sections, adding plenty of comments, implementing systematic tests, etc.), in order to minimize the risks of having bugs in your simulation. If possible, it is desirable to have multiple people test and thoroughly check your code.
Another issue we should be aware of is that, since ABMs are so open-ended and ﬂexible, modelers are tempted to add more and more complex settings and assumptions into their ABMs. This is understandable, as ABMs are such nice playgrounds to try testing “what-if” scenarios in a virtual world, and the results can be obtained quickly. I have seen many people who became fascinated by such an interactive modeling experience and tried adding more and more details into their own ABMs to make them more “realistic.” But beware—the increased model complexity means the increased difﬁculty of analyzing and justifying the model and its results. If we want to derive a useful, reliable conclusion from our model, we should resist the temptation to unnecessarily add complexity to our ABMs. We need to strike the right balance between simplicity, validity, and robustness, as discussed in Section 2.4.
Do a quick online literature search to learn how ABMs are used in various scientiﬁc disciplines. Choose a few examples of your interest and learn more about how researchers developed and used their ABMs for their research.