Daniel Vartanian
University of São Paulo
2024-08-15
This presentation invites you to explore the fascinating world of complex systems, generative science, and agent-based models. Together, we’ll uncover the key principles and tools that bring these systems to life, revealing how they can transform our understanding of socio-ecological dynamics.
Our journey will follow this path:
(Biological clock illustration by Nobel Prize Outreach. Mechanical clock illustration by Mai/Adobe Stock)
(Photo by Yarek Baranik)
(Artwork by Pérez-Villa et al., 2023)
Stable macroscopic patterns arising from local interaction of agents (Epstein, 1999).
When the aggregate exhibits properties not attained by summation (Holland, 2014).
(Videos by Kurzgesagt – In a Nutshell, Quanta Magazine, and Journey to the Microcosmos)
A aggregate behavior emerges from the interactions of the parts (CAS) (Holland, 2012).
(Artwork by Holland, 2012)
Deterministic nonperiodic flow (Lorenz, 1963).
Systems in which this is the case are said to be sensitively dependent on initial conditions (Lorenz, 2008).
Does the Flap of a Butterfly’s Wings in Brazil Set off a Tornado in Texas? (Lorenz, 2008)
The behavior of some simple, deterministic systems can be impossible, even in principle, to predict in the long term, due to sensitive dependence on initial conditions (Mitchell, 2009).
Order in chaos: You can’t predict how any individual state will evolve, but you can say how a collection of states evolves (Muller, 2019).
(Animation by Jake VanderPlas)
It only looks random (Lorenz, 2008).
Chaoplexologists such as Wolfram assume that much of the noise that seems to pervade nature is actually pseudonoise, the result of some underlying, deterministic algorithm (Horgan, 2004).
Micromotives and macrobehavior (Schelling, 2006).
Simulation is a third
way of doing science
(Axelrod, 1997, p. 24).
(Artwork by DaViDa S/Shutterstock. Flocking model by Wilenski. Video by National Geographic)
Agent-based models (ABMs) are bottom-up stochastic computational models with the purpose of simulating the behavior of agents and their interactions, allowing us to study emergent phenomena.
Instead of describing a system only with variables representing the state of the whole system [a global approach], we model its individual agents [a local approach] (Railsback & Grimm, 2019).
Agents often represent people or other animals, but agents can also represent anything from biological cells to economic firms to political municipalities (Smaldino, 2023).
(Video and image by Primer)
Agents
Environment
Interaction
(Artwork by Lewin, 1993, p. 13)
Agent-based model of the ancient Maya social-ecological system (applied archaeology) (NetLogo/Scala-Java).
Multi-scale simulation of LNCaP prostate cancer cell line and combinations of drugs (PhysiBoSS/C++).
Agent-based simulation tool that supports simulation of the evacuation of a city’s population at fine temporal and geographical scales (GAMA/Java).
A simulacrum of hospital with evolvable medical agents.
Complex systems are systems with many interconnected parts that exhibit emergent behavior.
Complexity science seeks to explain emergent phenomena or mechanisms that “screen-off” their constituent parts and thereby allow new levels of description and understanding.
Agent-based models are bottom-up stochastic computational models with the purpose of simulating the behavior of agents and their interactions, allowing us to study emergent phenomena.
Here are some resources to help you get started:
🎓 Courses
Introduction to complexity (Santa Fe Institute)
Introduction to agent-based models (Santa Fe Institute)
Introdução à ciência da computação com python - Parte 1 (USP-IME)
Introdução à ciência da computação com python - Parte 2 (USP-IME)
Here are some resources to help you get started:
📝 Articles
Foundational papers in complexity science
Epstein, J. M. (1999). Agent-based computational models and generative social science. Complexity, 4(5), 41–60. https://doi.org/10.1002/(SICI)1099-0526(199905/06)4:5<41::AID-CPLX9>3.0.CO;2-F
Ladyman, J., Lambert, J., & Wiesner, K. (2013). What is a complex system? European Journal for Philosophy of Science, 3(1), 33–67. https://doi.org/10.1007/s13194-012-0056-8
Grimm, V., Railsback, S. F., Vincenot, C. E., Berger, U., Gallagher, C., DeAngelis, D. L., Edmonds, B., Ge, J., Giske, J., Groeneveld, J., Johnston, A. S. A., Milles, A., Nabe-Nielsen, J., Polhill, J. G., Radchuk, V., Rohwäder, M.-S., Stillman, R. A., Thiele, J. C., & Ayllón, D. (2020). The ODD protocol for describing agent-based and other simulation models: a second update to improve clarity, replication, and structural realism. Journal of Artificial Societies and Social Simulation, 23(2), 7. https://doi.org/10.18564/jasss.4259
Here are some resources to help you get started:
🎥 Videos
Krakauer, D. (2023, February 17). What is complexity? [YouTube video]. Santa Fe Institute. https://www.youtube.com/watch?v=JR93X7xK05o
📙 Books
Mitchell, M. (2009). Complexity: a guided tour. Oxford University Press.
Wilensky, U., & Rand, W. (2015). An introduction to agent-based modeling: modeling natural, social, and engineered complex systems with NetLogo. The MIT Press.
Railsback, S. F., & Grimm, V. (2019). Agent-based and individual-based modeling: a practical introduction (2. ed.). Princeton University Press.
Smaldino, P. E. (2023). Modeling social behavior: mathematical and agent-based models of social dynamics and cultural evolution. Princeton University Press.
This presentation was created using the Quarto Publishing System. Code and materials are available on GitHub.
Several of these slides benefited from significant contributions from Bill Rand, Camilo Rodrigues Neto, and others.
(Artwork by Allison Horst)
In accordance with the American Psychological Association (APA) Style, 7th edition.
(Artwork by Allison Horst)
Linktree
Presentation
The new soup is the soup of human culture. We need a name for the new replicator, a noun that conveys the idea of a unit of cultural transmission, or a unit of imitation. ‘Mimeme’ comes from a suitable Greek root, but I want a monosyllable that sounds a bit like ‘gene’. I hope my classicist friends will forgive me if I abbreviate mimeme to meme.
Murphy’s law: “Anything that can go wrong will go wrong” (epigram).
From the etymological perspective, “complicated” and “complex” share the same prefix “com”, which means together in its Proto-indo-european (PIE) root. But “complicated” comes from the Latin verb “plicare” which means fold (noun, as in ten folds) and implies many; “complex” has the Latin root, “plectere”, which means braiding, linking, weave, interlace, and intertwine. Thus, complex has the implication of interaction and intertwining besides the meaning of “many parts” shared with complicated.
If you think about it, the extensive clock control is like a finely-tuned choreography. Everything is organized to happen at the right time, just like a Rube Goldberg machine (Merrow & Roenneberg, 2020).
(Artwork by Rube Goldberg)
The aggregate behavior influences the agent behavior and vice-versa (Holland, 2012).
Circadian clocks regulate and/or modulate functions at all levels, ranging from gene expression and physiology to behavior and cogitation (Roenneberg et al., 2007).
(Artwork by Flanagan et al., 2021)
Its parts define it.
It does not exhibit aggregate/emergent behavior.
It is not adaptive.
It is not robust.
It does not produce extreme events.
It is not self-organized.
In a very general sense, a system is a collection of interacting elements that together produce, by virtue of their interactions, some form of system-wide behavior (von Bertalanffy, 1968).
A system is defined by an observer and may have an arbitrary content domain (Bao & Fritchman, 2018).
The structure of complex systems creates their behavior (Sterman, 2000) (the system as cause).
(Artwork by Schindel, 2013)
Systems that don’t yield to compact forms of representation or description (David Krakauer in Mitchell (2013)).
A system of many interacting parts where the system is more than just the sum of its parts (Mark Newman in Mitchell (2013)).
A system that involves a large number of parts undergoing a kaleidoscopic array of simultaneous interactions, exhibiting aggregate behavior that cannot be simply derived from the actions of the individual parts (Holland, 1992).
Systems with many connected agents that interact and exhibit self-organization and emergence behavior, all without the need for a central controller (Camilo Rodrigues Neto).
Dialectics at its finest (my working definition).
(Artwork by Julia Jabur)
A system can be considered complex if its entities are:
There seems to be no complexity at the extremes of the intervals. Our society is complex because it lies between the extremes.
(Video by Derek Muller)
The seven basics consist of 4 properties and 3 mechanisms that are common to all complex adaptive systems:
Complexity is common at intermediate levels of these characteristics:
Primate brain: Human beings have difficulty understanding complex systems because they are not designed to do so. Our brains evolved to deal with the immediate environment, not to understand the intricacies of the global economy or the climate system.
Humans have difficult to simulate steps in their minds. We are not good at understanding exponential growth, for example.
Oracle of the Night: Dreams as simulations? (Ribeiro, 2019).
Although the detailed behavior of a chaotic system cannot be predicted, there is some “order in chaos” seen in universal properties common to large sets of chaotic systems, such as the period-doubling route to chaos and Feigenbaum’s constant. Thus even though “prediction becomes impossible” at the detailed level, there are some higher-level aspects of chaotic systems that are indeed predictable.
Emergence isn’t magic (Wilson, 2004).
You are dealing with an emergence phenomenon when there is no need to look under the hood (Krakauer, 2023).
[…] we defined emergent phenomena to be simply stable macroscopic patterns arising from local interaction of agents (Epstein, 1999).
In complex adaptive systems, emergent properties often occur when coevolving signals and boundaries generate new levels of organization.
A word about emergence (Holland, 2012, Topic 5.5).
Is a molecule of \(\text{H}_2\text{O}\) water?
Can you understand a anthill by studying a single ant?
Are you just a collection of cells?
Uma andorinha não faz verão.
Is love just a chemical?
(Video by Kurzgesagt – In a Nutshell)
We’re not looking down levels to explain the level of interest.
Power laws (\(y = ax^{-k}\)).
Pareto’s/Zipf’s distributions.
~80/20 rule: 80% of the effects come from 20% of the causes.
[…] the distributions of the sizes of cities, earthquakes, forest fires, solar flares, moon craters and people’s personal fortunes all appear to follow power laws (Newman, 2005).
Top U.S. retail companies by market cap as of September 2024
(Graph by Retail Dogma)
Power laws (\(y = ax^{-k}\)).
Pareto’s/Zipf’s distributions.
~80/20 rule: 80% of the effects come from 20% of the causes.
(Artwork by Alcera Consulting)
When the system have feedback loops, the notion of cause and effect must be treated with care.
Feedback loops generate non-linear dynamics and power-law distributions.
(Artwork by Marilia Marz)
The order in complex systems is said to be robust because, being distributed and not centrally produced, it is stable under perturbations of the system (Ladyman et al., 2013).
(Graph by The Copernicus Climate Change Service)
Systems in a highly stable state (deep valley) have low potential energy, and considerable energy is required to move them out of this stable state. Systems in an unstable state (top of a hill) have high potential energy, and they require only a little additional energy to push them off the hill.
There are places within a complex system where a small shift in one thing can produce big changes in everything (D. Meadows, 1999).
Leverage points are points of power (D. H. Meadows, 2008).
Possible states, even if unlikely: by modelling such interactions, it can suggest that properties exist in the system that had not been noticed in the real world situation (Dodig-Crnkovic & Giovagnoli, 2013).
Complexity science seeks to explain emergent phenomena or mechanisms that “screen-off” their constituent parts and thereby allow new levels of description and understanding (Krakauer & Wolpert, 2024).
(Artwork by Sayama, 2015)
(Artwork by Brian Castellani & Lasse Gerrits)
Whereas artificial-intelligence researchers seek to understand the mind by mimicking it on a computer, proponents of artificial life hope to gain insights into a broad range of biological phenomena. And just as artificial intelligence has generated more portentous rhetoric than tangible results, so has artificial life.
There are several other concepts/subjects in complexity science that were not shown here, but are essential for a good understanding of complex systems and their behavior. Some of these concepts are:
(See the appendices section for more information on these concepts)
A model is a simplified representation of a system. It can be conceptual, verbal, diagrammatic, physical, or formal (mathematical) (Sayama, 2015).
A good model is simple, valid, and robust (Sayama, 2015).
All models are wrong, but some are useful (Box, 1979, p. 202).
(Mercator projection by Daniel R. Strebe. Earth photo by the European Space Agency)
(Seymour Papert (1928–2016) – Father of educational computing. Photo by MIT Museum)
(Artwork by Stevens Institute of Technology)
… En aquel Imperio, el Arte de la Cartografía logró tal Perfección que el mapa de una sola Provincia ocupaba toda una Ciudad, y el mapa del imperio, toda una Provincia. Con el tiempo, esos Mapas Desmesurados no satisfacieron y los Colegios de Cartógrafos levantaron un Mapa del Imperio, que tenía el tamaño del Imperio y coincidía puntualmente con él. Menos Adictas al Estudio de la Cartografía, las Generaciones Siguientes entendieron que ese dilatado Mapa era Inútil y no sin Impiedad lo entregaron a las Inclemencias del Sol y de los Inviernos. En los desiertos del Oeste perduran despedazadas Ruinas del Mapa, habitadas por Animales y por Mendigos; en todo el País no hay otra reliquia de las Disciplinas Geográficas.
Suárez Miranda: Viajes de varones prudentes, libro cuarto, cap. XLV, Lérida, 1658
… In that Empire, the Art of Cartography attained such Perfection that the map of a single Province occupied the entirety of a City, and the map of the Empire, the entirety of a Province. In time, those Unconscionable Maps no longer satisfied, and the Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and which coincided point for point with it. The following Generations, who were not so fond of the Study of Cartography as their Forebears had been, saw that that vast Map was Useless, and not without some Pitilessness was it, that they delivered it up to the Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is no other Relic of the Disciplines of Geography.
Suarez Miranda, Viajes de varones prudentes, Libro N, Cap. XLV, Urida, 1658
“What a useful thing a pocket-map is!” I remarked.
“That’s another thing we’ve learned from your Nation,” said Mein Herr, “map-making. But we’ve carried it much further than you. What do you consider the largest map that would be really useful?”
“About six inches to the mile.”
“Only six inches!” exclaimed Mein Herr. “We very soon got to six yards to the mile. Then we tried a hundred yards to the mile. And then came the grandest idea of all ! We actually made a map of the country, on the scale of a mile to the mile!”
“Have you used it much?” I enquired.
“It has never been spread out, yet,” said Mein Herr: “the farmers objected: they said it would cover the whole country, and shut out the sunlight ! So we now use the country itself, as its own map, and I assure you it does nearly as well.”
Nous devons done envisager l’etat présent de l’univers, comme l’effet de son état antérieur, et comme la cause de celui qui va suivre. Une intelligence qui pour un instant donné, connaîtrait toutes les forces dont la nature est animée, et la situation respective des êtres qui la composent, si d’ailleurs elle était assez vaste pour soumettre ces données à l’analyse, embrasserait dans la même formule les mouvemens des plus grands corps de l’univers et ceux du plus léger atome: rien ne serait incertain pour elle, et l’avenir comme le passé, serait présent à ses yeux.
We ought then to regard the present state of the universe as the effect of its anterior state and as the cause of the one which is to follow. Given for one instant an intelligence which could comprehend all the forces by which nature is animated and the respective situation of the beings who compose it - an intelligence sufficiently vast to submit these data to analysis ― it would embrace in the same formula the movements of the greatest bodies of the universe and those of the lightest atom; for it, nothing would be uncertain and the future, as the past, would be present to its eyes.
Popper’s hypothetico-deductive method.
(Artwork by Virpi Oinonen)
Verification is the process of making sure your conceptual model matches your implemented model.
Validation is the process of making sure your implemented model corresponds to the real world.
Abstract models allow for the examination of general principles in detail (W. Rand & Wilensky, 2007).
Empirical models are generally more oriented towards prediction and often need to address specific questions posed by policy-makers at particular sites (Sun et al., 2016).
Full spectrum modeling combines the benefits of abstract and empirical models (W. Rand & Wilensky, 2007).
\[ \begin{cases} \cfrac{\mathrm{d}}{\mathrm{d} t} \text{S} = - \lambda \text{S} \text{I} \\ \cfrac{\mathrm{d}}{\mathrm{d} t} \text{I} = \lambda \text{S} \text{I} - \gamma \text{I} \\ \cfrac{\mathrm{d}}{\mathrm{d} t} \text{R} = \gamma \text{I} \\ \end{cases} \]
Global (Top-Down) approach.
Local (Bottom-Up) approach.
Most used ABM software.
A more intuitive and visual approach to modeling phenomena.
Low Threshold, No Ceiling (Tisue & Wilensky, 2004).
Open-source and free!
Inequalities in physical activity as an emergent feature of a complex system: an agent-based modelling approach (NetLogo/Scala-Java).
Agent-based models for detecting the driving forces of biomolecular interactions (Orion/Java).
Agent-based land change modeling of a large watershed: space-time locations of critical threshold (C++).
Agent-based Model of the German small-scale fisheries (NetLogo/Scala-Java).
An interactive platform to improve decision-making related to the revitalization of the Champs Élysées (GAMA/Java).
An agent-based model of the UK housing market (NetLogo/Scala-Java).
Probabilistic Relational Agent-Based Models (PRAM) influenza simulation: a SIR model (Unity3D/C++).
WorldClim 2.1 in NetLogo (NetLogo/Scala-Java).
(Vartanian et al., 2024, Unpublished)
How social groups influence political preferences and how these preferences can lead to segregation behaviors? (NetLogo/Scala-Java).
(Vartanian, 2024, Unpublished)
Emergent tool use from multi-agent autocurricula.
Simulation of 1000+ autonomous agents collaborating in a virtual world.
Materialists, on the other hand, believe that only matter and its physical properties are real, while mind, thoughts, and the like are simply manifestations of matter. The idealist tries to explain physical matter as a by-product of mind; the materialist tries to explain mind as a by-product of matter.
[…] I grew up implicitly thinking that intelligence was this really special human thing, kind of somewhat magical, and I now think that it’s sort of a fundamental property of matter. That’s definitely a change in my worldview.
(The Economic Times, 2023) (quote starts at 13:54)
The 4 Fundamental Laws of Dialectical Materialism by Engels and Marx (in opposition to Hegel’s idealist dialectic, inspired by Heraclitus):
No phenomenon in nature can be understood if considered in isolation, separate from surrounding phenomena.
The error [of Hegel] lies in the fact that these laws, as laws of thought, are imposed on nature and history, rather than being deduced from them.
Dialectics as the science of interconnections (sound familiar?).
graph LR A(A) --> B(B) B --> A
Dialectical materialism will consider that something can be both A and not-A at the same time. This is in opposition to the Law of excluded middle, which states that something can only be A or not-A.
I suggest that it is the aim of science to find satisfactory explanations, of whatever strikes us as being in need of explanation.
Dialectics must be understood as an non-falsifiable conjecture. It should be an inspiration, but never as something given. Similar to the Free energy principle (FEP) proposed by Karl Friston (Friston, 2010).
The whole development of dialectic should be a warning against the dangers inherent in philosophical system-building. It should remind us that philosophy must not be made a basis for any sort of scientific system and that philosophers should be much more modest in their claims. One task which they can fulfill quite usefully is the study of the critical methods of science (K. R. Popper, 2002).
Popper disagrees that physical reality develops dialectically.
Popper interprets Marx as an economic determinist and historicist.
Popper views Marx’s predictions, based on dialectical materialism, as something exact, subject to testing and refutation. At the same time, he points out that some of Marx’s predictions did not hold up when tested against history.
Although Popper praises Marx for his anti-dogmatic stance, he argues that criticisms of dialectical materialism were never tolerated by orthodox Marxists.
Popper asserts that the dialectical method is dangerous because it can be used as a form of evasion, thus becoming a tool for reinforcing dogma.
[…] I want to stress the point that although I should not describe myself as a materialist, my criticism is not directed against materialism, which I personally should probably prefer to idealism if I were forced to choose (which happily I am not). It is only the combination of dialectic and materialism that appears to me to be even worse than dialectic idealism.
Nevertheless I personally think that Marx’s economism — his emphasis on the economic background as the ultimate basis of any sort of development — is mistaken and in fact untenable (K. R. Popper, 2002).
According to the materialist conception of history, the ultimately determining element in history is the production and reproduction of real life. More than this neither Marx nor I have ever asserted. Hence if somebody twists this into saying that the economic element is the only determining one, he transforms that proposition into a meaningless, abstract, senseless phrase (Engels, 1978).
For our present purpose it is not so important to analyse Marx’s materialism and economism as to see what has become of the dialectic within his system. Two points seem to me important. One is Marx’s emphasis on historical method in sociology, a tendency which I have called ‘historicism’. The other is the anti- dogmatic tendency of Marx’s dialectic.
Hence, Marx’s anti-dogmatic attitude exists only in the theory and not in the practice of orthodox Marxism, and dialectic is used by Marxists, following the example of Engels’ Anti-Dühring, mainly for the purposes of apologetics to defend the Marxist system against criticism. As a rule critics are denounced for their failure to understand the dialectic, or proletarian science, or for being traitors. Thanks to dialectic the anti-dogmatic attitude has disappeared, and Marxism has established itself as a dogmatism which is elastic enough, by using its dialectic method, to evade any further attack. It has thus become what I have called a reinforced dogmatism.
Prophecy certainly need not be unscientific, as predictions of eclipses and other astronomical events show. But Hegelian dialectic, or its materialistic version, cannot be accepted as a sound basis for scientific forecasts.
Thus if forecasts based on dialectic are made, some will come true and some will not. In the latter case, obviously, a situation will arise which has not been foreseen. But dialectic is vague and elastic enough to interpret and to explain this unforeseen situation just as well as it interpreted and explained the situation which it predicted and which happened to come true. Any development whatever will fit the dialectic scheme; the dialectician need never be afraid of any refutation by future experience.
The whole development of dialectic should be a warning against the dangers inherent in philosophical system-building. It should remind us that philosophy must not be made a basis for any sort of scientific system and that philosophers should be much more modest in their claims. One task which they can fulfil quite usefully is the study of the critical methods of science.
The activity can be represented by a general schema of problem- solving by the method of imaginative conjectures and criticism, or, as I have often called it, by the method of conjecture and refutation. The schema (in its simplest form) is this:
flowchart LR A(P1) --> B(TT) B --> C(EE) C --> D(P2)
flowchart LR A(P) --> B(TT) B --> C(EE) C --> A
Here \(\text{P}_1\), is the problem from which we start, \(\text{TT}\) (the ‘tentative theory’) is the imaginative conjectural solution which we first reach, for example our first tentative interpretation. \(\text{EE}\) (‘error- elimination’) consists of a severe critical examination of our conjecture, our tentative interpretation: it consists, for example, of the critical use of documentary evidence and, if we have at this early stage more than one conjecture at our disposal, it will also consist of a critical discussion and comparative evaluation of the competing conjectures. \(\text{P}_2\) is the problem situation as it emerges from our first critical attempt to solve our problems. It leads up to our second attempt (and so on).
flowchart LR A(P1) --> B(TT) B --> C(EE) C --> D(P2)
The history of ideas teaches us very clearly that ideas emerge in logical or, if the term is preferred, in dialectical contexts. My various schemata such as
flowchart LR A(P1) --> B(TT) B --> C(EE) C --> D(P2)
may indeed be looked upon as improvements and rationalizations of the Hegelian dialectical schema: they are rationalizations because they operate entirely within the classical logical organon of rational criticism, which is based upon the so-called law of contradiction; that is to say, upon the demand that contradictions, whenever we discover them, must be eliminated. Critical error-elimination on the scientific level proceeds by way of a conscious search for contradictions.
Notre activité intellectuelle est suffisamment excitée par le pur espoir de découvrir les lois des phénomènes, par le simple désir de confirmer ou d’infirmer une théorie. […] la philosophie positive est le véritable état définitif de l’intelligence humaine […] (Comte, 1892, pp. 9–10).
Why post-positivist?
But I shall certainly admit a system as empirical or scientific only if it is capable of being tested by experience. These considerations suggest that not the verifiability but the falsifiability of a system is to be taken as a criterion of demarcation. In other words: I shall not require of a scientific system that it shall be capable of being singled out, once and for all, in a positive sense; but I shall require that its logical form shall be such that it can be singled out, by means of empirical tests, in a negative sense: it must be possible for an empirical scientific system to be refuted by experience.
Everybody knows nowadays that logical positivism is dead. But nobody seems to suspect that there may be a question to be asked here — the question “Who is responsible?” or, rather, the question “Who has done it?”. (Passmore’s excellent historical article does not raise this question.) I fear that I must admit responsibility.
One can sum up all this by saying that the criterion of the scientific status of a theory is its falsifiability, or refutability, or testability.