Agent based modelling

Agents and the art of computer modelling

Screenshot vortices and ntrees MOSAIIC V1 screenshot
Vortices and nTrees (left) Trafic simulation (right).

“To an observer B, an object A* is a model of an object A to the extent that B can use A* to answer questions that interest him about A”

Marvin Minsky

Models are tools used by observers to answer questions about selected objects. The most well-known category of scientific models are mathematical models. These are built around laws, equations linking observable variables relative to the object. These equations are algebraic if the link is directly between the values of the variables (ex: PV=nRT), and differential if the link connects the way those variables change and evolve (ex: dx(t)/dt = x(t)(α – βy(t))). These models are very common in every domain of science. They are nonetheless tools, and as such there are things they do well and others not so much.

One limitation is solvability : you may identify the way the transformation of x is linked to that of y (differential equations), but you may not necessarily be able to deduce x or y for a given t for example. Another one is the choice and the number of variables : these methods work well on objects and domain with a relative homogeneity, and may not handle well local heterogeneities. For example, there are numerous equational trafic models, inspired by fluid mechanics methods, that are great descriptors and predictors of trafic on motorways and the main ways of a road network. They will probably fail at predicting the impact of individual decisions on the greater state of trafic at a smaller scale, such as people stuck in crossroads or deciding to use one way street in reverse. They may even not be the right tools for modeling trafic at the scale of a dozen blocks, as they would not provide easy way to describe crossroad handling in general.

Individual based models (IBM) are much better at modeling these multi-scale heterogeneous phenomena. Although there were tries to incorporate a greater individuality into laws models, the movement developed mainly thanks to more computer science inspired, rules model. Rules based models are models where at each step you have rules to compute the next step. Earlier rules based IBM were built upon cellular automata. In these, it is the space of the domain that you divide in small regular chunks, very often a rectangular grid. You then provide rules to describe the evolution of each cell of this grid. Cellular automata can provide admirable results, in urban dynamics for example, but are a somewhat counterintuitive formulation of crowds of mobile entities for example. Mirroring the eulerian vs lagrangian point of view in fluid mechanics, this is where agent based models (ABM) step in. Heir of the object oriented programming, they will always consist in sets of individual agents, semi-autonomous entities with goals and abilities to interact with their environment and their social networks.

One of the strengths of ABM are their abilities to model individuality and heterogeneity. Their main weakness is they are difficult to calibrate and validate: with so much individual liberty, how can we be sure we got everything right? Which part of the models are necessary, which are useless, which could be improved?

ABM are tested and experimented upon through multi-scale simulation. The trick is to design individual rules for the agents, and to test collective variables that can be compared to parts of more macroscopic scales of the modeled object (Minsky’s A*). For example, in a traffic ABM we will model the behavior of each vehicle, the way they interact among each other and with the roads network, and will measure for instance the hourly traffic volume at specific locations where we have relevant data.

The underlying goal of my work on ABM is trying to improve bits of our understanding of the links and interactions between these different scales. How do we go from car to traffic jam? From a particle of water to a vortex? From an animal to its flock? Not only how to compute the whole from the interactions of the individuals, but also, when it is relevant, how does the states and behaviors of the whole interacts with the behavior of the individual, through perception and action.

My earlier work on these questions is developed here, while my latest project on trafic and crisis management ABM, called MOSAIIC, is developed there.