Exploring complexity with agent-based models

Daniel Vartanian

University of São Paulo

2024-08-15

Hi there! 👋

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:

  1. Key concepts of complex systems
  2. Entering the world of agent-based models
  3. Real-world applications
  4. Final remarks

Key concepts of complex systems

Complex versus Complicated

Complex versus Complicated

Complex versus Complicated

Emergence

Stable macroscopic patterns arising from local interaction of agents (Epstein, 1999).

When the aggregate exhibits properties not attained by summation (Holland, 2014).

Emergence

A aggregate behavior emerges from the interactions of the parts (CAS) (Holland, 2012).

Chaos

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).

Pseudonoise

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).

Generative science

Simulation is a third
way of doing science

(Axelrod, 1997, p. 24).

Entering the world of agent-based models

Agent-based models

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).

The modeling cycle

Conceptual models

Key components of ABMs

Agents

Environment

Interaction

When to use ABMs?

  • Medium numbers
  • Heterogeneity
  • Time
  • Rich environments
  • Adaptation
  • Complex but local interactions

ABM Frameworks

Real-world applications

Historical ecology

Agent-based model of the ancient Maya social-ecological system (applied archaeology) (NetLogo/Scala-Java).

Systems biology

Multi-scale simulation of LNCaP prostate cancer cell line and combinations of drugs (PhysiBoSS/C++).

Urban planning

Agent-based simulation tool that supports simulation of the evacuation of a city’s population at fine temporal and geographical scales (GAMA/Java).

ABM + AI: Agent hospital

A simulacrum of hospital with evolvable medical agents.

Final remarks

Summary of key takeaways

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.

How to learn more?

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)

Data science specialization (Johns Hopkins)

How to learn more?

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

How to learn more?

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.

Closing remarks

License: MIT License: CC BY 4.0

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.

References

In accordance with the American Psychological Association (APA) Style, 7th edition.

Altera (Director). (2024, September 3). 1000 AI NPCs simulate a CIVILIZATION in Minecraft. https://www.youtube.com/watch?v=2tbaCn0Kl90
Axelrod, R. (1997). Advancing the art of simulation in the social sciences. In R. Conte, R. Hegselmann, & P. Terna (Eds.), Simulating Social Phenomena (Vol. 456, pp. 21–40). Springer. https://doi.org/10.1007/978-3-662-03366-1_2
Babichenko, D., Healy, P., Gomez, M., Kane-Gill, S., Littleton, E. B., Brusilovsky, P., Cohen, P., & Patel, R. (2020, August). The use of agent-based models as non-player characters in serious games. 2020 IEEE 8th International Conference on Serious Games and Applications for Health (SeGAH). 2020 IEEE 8th International Conference on Serious Games and Applications for Health (SeGAH). https://doi.org/10.1109/SeGAH49190.2020.9201889
Baker, B., Kanitscheider, I., Markov, T., Wu, Y., Powell, G., McGrew, B., & Mordatch, I. (2020, February 10). Emergent tool use from multi-agent autocurricula. https://doi.org/10.48550/arXiv.1909.07528
Bao, L., & Fritchman, J. C. (2018). Information of complex systems and applications in agent based modeling. Scientific Reports, 8(1), 6177. https://doi.org/10.1038/s41598-018-24570-1
Borges, J. L. (1984). Obras completas: 1923-1972 (14th ed.). Emecé Editores.
Borges, J. L. (1998). Collected fictions (A. Hurley, Trans.). Penguin Books.
Box, Geoge. E. P. (1979). Robustness in the strategy of scientific model building. In R. L. Launer & G. N. Wilkinson (Eds.), Robustness in statistics (pp. 201–236). Academic Press. https://doi.org/10.1016/B978-0-12-438150-6.50018-2
Carroll, L. (1893). Sylvie and Bruno concluded. Macmillan and Company. https://books.google.com.br/books?id=cTQPAAAAQAAJ
Carvalho, A. M. de, Garcia, L. M. T., Lourenço, B. H., Verly Junior, E., Carioca, A. A. F., Jacob, M. C. M., Gomes, S. M., & Sarti, F. M. (2024). Exploring the nexus between food systems and the global syndemic among children under five years of age through the complex systems approach. International Journal of Environmental Research and Public Health, 21(7, 7), 893. https://doi.org/10.3390/ijerph21070893
City Science. (n.d.). CityScope Champs-Élysées. MIT Media Lab. Retrieved September 24, 2024, from https://www.media.mit.edu/projects/city-scope-champs-elysees/overview/
Comte, A. (1892). Cours de philosophie positive (5th ed., Vol. 1). Au Siège de la Société Positiviste. http://archive.org/details/coursdephilosoph01comt
Daudé, E., Chapuis, K., Taillandier, P., Tranouez, P., Caron, C., Drogoul, A., Gaudou, B., Rey-Coyrehourq, S., Saval, A., & Zucker, J.-D. (2019, May). ESCAPE: Exploring by simulation cities awareness on population evacuation. ISCRAM. https://hal.science/hal-02130387
Dawkins, R. (2016). The selfish gene (40th anniversary edition). Oxford University Press.
Dodig-Crnkovic, G., & Giovagnoli, R. (Eds.). (2013). Computing nature: Turing centenary perspective (Vol. 7). Springer. https://doi.org/10.1007/978-3-642-37225-4
Engels, F. (1954). Dialetics of nature (C. Dutt, Trans.; 2 ed. rev.). Progress Publishers.
Engels, F. (1978). Letters on historical materialism: To Joseph Bloch. In R. C. Tucker (Ed.), The Marx-Engels reader (2nd ed., pp. 760–765). W. W. Norton & Company.
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
Flanagan, A., Bechtold, D. A., Pot, G. K., & Johnston, J. D. (2021). Chrono-nutrition: From molecular and neuronal mechanisms to human epidemiology and timed feeding patterns. Journal of Neurochemistry, 157(1), 53–72. https://doi.org/10.1111/jnc.15246
Friston, K. (2010). The free-energy principle: A unified brain theory? Nature Reviews Neuroscience, 11(2), 127–138. https://doi.org/10.1038/nrn2787
Gilbert, N., Hawksworth, J. C., & Swinney, P. A. (2009). An agent-based model of the english housing market. Papers from the 2009 AAAI Spring Symposium: No. 9: Technosocial Predictive Analytics, 30–35. https://aaai.org/papers/0007-ss09-09-007-an-agent-based-model-of-the-english-housing-market/
Grimm, V., Revilla, E., Berger, U., Jeltsch, F., Mooij, W. M., Railsback, S. F., Thulke, H.-H., Weiner, J., Wiegand, T., & DeAngelis, D. L. (2005). Pattern-oriented modeling of agent-based complex systems: Lessons from ecology. Science, 310(5750), 987–991. https://doi.org/10.1126/science.1116681
Heckbert, S., Isendahl, C., Gunn, J. D., Brewer, S., Scarborough, V. L., Chase, A. F., Chase, D. Z., Costanza, R., Dunning, N. P., Beach, T., Luzzadder-Beach, S., Lentz, D. L., & Sinclair, P. (2019). Growing the ancient maya social-ecological system from the bottom up. In C. Isendahl & D. Stump (Eds.), The Oxford handbook of historical ecology and applied archaeology (pp. 302–322). Oxford University Press. https://doi.org/10.1093/oxfordhb/9780199672691.013.30
Holland, J. H. (1992). Complex adaptive systems. Daedalus, 121(1), 17–30. https://www.jstor.org/stable/20025416
Holland, J. H. (1996). Hidden order: How adaptation builds complexity. Basic Books.
Holland, J. H. (2012). Signals and boundaries: Building blocks for complex adaptive systems. MIT Press. https://doi.org/10.7551/mitpress/9412.001.0001
Holland, J. H. (2014). Complexity: A very short introduction. Oxford University Press.
Horgan, J. (1995, June 1). From complexity to perplexity. Scientific American, 272(6), 104–109. https://www.scientificamerican.com/article/from-complexity-to-perplexity/
Horgan, J. (2004). The end of science revisited. Computer, 37(1), 37–43. https://doi.org/10.1109/MC.2004.1260723
Janssen, M. A. (2020). Introduction to agent-based modeling: With applications to social ecological, and social-ecological systems.
Jones, S. M. (2024). Inequalities in physical activity as an emergent feature of a complex system: An agent-based modelling approach [PhD thesis, Queen’s University Belfast]. https://pure.qub.ac.uk/en/studentTheses/inequalities-in-physical-activity-as-an-emergent-feature-of-a-com
Kermack, W. O., & McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, 115(772), 700–721. https://doi.org/10.1098/rspa.1927.0118
Krakauer, D. (Director). (2023, February 17). What is complexity? Santa Fe Institute. https://www.youtube.com/watch?v=JR93X7xK05o
Krakauer, D., & Wolpert, D. (2024, September 4). The reality ouroboros. Nautilus. https://nautil.us/the-reality-ouroboros-809153/
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
Laplace, P. S. de. (1902). A philosophical essay on probabilities (F. W. Truscott & F. L. Emory, Trans.). John Wiley & Sons.
Laplace, P. S. de. (2009). Essai philosophique sur les probabilités (Rep. 5. ed.). Cambridge University Press.
Lemmen, C., Hokamp, S., Örey, S., & Scheffran, J. (2024). Viable north sea (ViNoS): A NetLogo agent-based model of german small-scale fisheries. Journal of Open Source Software, 9(95), 5731. https://doi.org/10.21105/joss.05731
Lewin, R. (1993). Complexity: Life at the edge of chaos. Collier Books.
Li, J., Wang, S., Zhang, M., Li, W., Lai, Y., Kang, X., Ma, W., & Liu, Y. (2024, May 5). Agent hospital: A simulacrum of hospital with evolvable medical agents. https://doi.org/10.48550/arXiv.2405.02957
Lorenz, E. N. (1963). Deterministic nonperiodic flow. Journal of the Atmospheric Sciences, 20(2), 130–141. https://doi.org/10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2
Lorenz, E. N. (2008). The essence of chaos. UCL Press.
Maestri, S., Merelli, E., & Pettini, M. (2022). Agent-based models for detecting the driving forces of biomolecular interactions. Scientific Reports, 12(1), 1878. https://doi.org/10.1038/s41598-021-04205-8
Meadows, D. (1999). Leverage points: Places to intervene in a system. The Sustainability Institute. https://donellameadows.org/archives/leverage-points-places-to-intervene-in-a-system/
Meadows, D. H. (2008). Thinking in systems: A primer (D. Wright, Ed.). Chelsea Green Publishing.
Merrow, M., & Roenneberg, T. (2020). Circadian clocks: How rhythms structure life [Online course]. https://www.coursera.org/learn/circadian-clocks
Mitchell, M. (2009). Complexity: A guided tour. Oxford University Press.
Mitchell, M. (2013). Introduction to complexity [Online course]. https://www.complexityexplorer.org/courses/
Moore, A. (1986). Watchmen #1. DC.
Muller, D. (Director). (2019, December 6). Chaos: The science of the butterfly effect. Veritasium. https://www.youtube.com/watch?v=fDek6cYijxI
Muller, D. (Director). (2020, January 29). This equation will change how you see the world (the logistic map). Veritasium. https://www.youtube.com/watch?v=ovJcsL7vyrk
Newman, M. (2005). Power laws, Pareto distributions and Zipf’s law. Contemporary Physics, 46(5), 323–351. https://doi.org/10.1080/00107510500052444
Nicolis, G., & Nicolis, C. (2012). Foundations of complex systems: Emergence, information and prediction (2nd ed.). World Scientific.
Parker, D. C., Manson, S. M., Janssen, M. A., Hoffmann, M. J., & Deadman, P. (2003). Multi-agent systems for the simulation of land-use and land-cover change: A review. Annals of the Association of American Geographers, 93(2), 314–337. https://doi.org/10.1111/1467-8306.9302004
Pérez-Villa, A., Echeverría-Garcés, G., Ramos-Medina, M. J., Prathap, L., Martínez-López, M., Ramírez-Sánchez, D., García-Cárdenas, J. M., Armendáriz-Castillo, I., Guerrero, S., Paz, C., & López-Cortés, A. (2023). Integrated multi-omics analysis reveals the molecular interplay between circadian clocks and cancer pathogenesis. Scientific Reports, 13(1), 14198. https://doi.org/10.1038/s41598-023-39401-1
Ponce-de-Leon, M., Montagud, A., Noël, V., Meert, A., Pradas, G., Barillot, E., Calzone, L., & Valencia, A. (2023). PhysiBoSS 2.0: A sustainable integration of stochastic Boolean and agent-based modelling frameworks. Npj Systems Biology and Applications, 9(1), 1–12. https://doi.org/10.1038/s41540-023-00314-4
Popper, K. (2005). Unended quest: An intellectual autobiography (2nd ed.). Taylor and Francis.
Popper, K. R. (1979). Objective knowledge: An evolutionary approach. Oxford University Press.
Popper, K. R. (2002). Conjectures and refutations: The growth of scientific knowledge. Routledge.
Popper, K. R. (2005). The logic of scientific discovery. Routledge.
Puccia, C. J., & Levins, R. (1985). Qualitative modeling of complex systems: An introduction to loop analysis and time averaging. Harvard University Press.
Railsback, S. F., & Grimm, V. (2019). Agent-based and individual-based modeling: A practical introduction (2nd ed.). Princeton University Press.
Rand, B. (2024, July 22). Verification, Validation, and Replication [Online course]. An introduction to agent-based modeling. https://www.complexityexplorer.org/courses/183-introduction-to-agent-based-modeling
Rand, W., & Wilensky, U. (2007). Full spectrum modeling: From simplicity to elaboration and realism in urban pattern formation. North American Association for Computational Social and Organizational Sciences (NAACSOS). http://ccl.northwestern.edu/2007/FullSpectrum.pdf
Ribeiro, S. (2019). O oráculo da noite: a história e a ciência do sonho. Companhia da Letras.
Rodrigues Neto, C. (2022, December 6). Leis de escala: AKA power laws, scale free laws [Academic Lecture]. Sistemas complexos I, São Paulo, SP.
Roenneberg, T., Kuehnle, T., Juda, M., Kantermann, T., Allebrandt, K., Gordijn, M., & Merrow, M. (2007). Epidemiology of the human circadian clock. Sleep Medicine Reviews, 11(6), 429–438. https://doi.org/10.1016/j.smrv.2007.07.005
Sayama, H. (2015). Introduction to the modeling and analysis of complex systems. Open SUNY Textbooks.
Schelling, T. C. (1971). Dynamic models of segregation. The Journal of Mathematical Sociology, 1(2), 143–186. https://doi.org/10.1080/0022250X.1971.9989794
Schelling, T. C. (2006). Micromotives and macrobehavior. W.W. Norton & Company.
Schindel, W. D. (2013). Systems of innovation II: The emergence of purpose. INCOSE International Symposium, 23(1), 1006–1020. https://doi.org/10.1002/j.2334-5837.2013.tb03069.x
Smaldino, P. E. (2023). Modeling social behavior: Mathematical and agent-based models of social dynamics and cultural evolution. Princeton University Press.
Steffen, W., Rockström, J., Richardson, K., Lenton, T. M., Folke, C., Liverman, D., Summerhayes, C. P., Barnosky, A. D., Cornell, S. E., Crucifix, M., Donges, J. F., Fetzer, I., Lade, S. J., Scheffer, M., Winkelmann, R., & Schellnhuber, H. J. (2018). Trajectories of the earth system in the anthropocene. Proceedings of the National Academy of Sciences, 115(33), 8252–8259. https://doi.org/10.1073/pnas.1810141115
Sterman, J. D. (2000). Business dynamics: Systems thinking and modeling for a complex world. Irwin/McGraw-Hill.
Stewart, D., Blocker, H. G., & Petrik, J. M. (2013). Fundamentals of philosophy (8th ed.). Pearson.
Sun, Z., Lorscheid, I., Millington, J. D., Lauf, S., Magliocca, N. R., Groeneveld, J., Balbi, S., Nolzen, H., Müller, B., Schulze, J., & Buchmann, C. M. (2016). Simple or complicated agent-based models? A complicated issue. Environmental Modelling & Software, 86, 56–67. https://doi.org/10.1016/j.envsoft.2016.09.006
Tang, W., & Yang, J. (2020). Agent-based land change modeling of a large watershed: Space-time locations of critical threshold. Journal of Artificial Societies and Social Simulation, 23(1), 15. https://doi.org/10.18564/jasss.4226
The Economic Times (Director). (2023, June 7). ChatGPT founder Sam Altman: AI is not a creature but a tool. The Economic Times. https://www.youtube.com/watch?v=T-lj7ItGjZE
Tisue, S., & Wilensky, U. (2004). NetLogo: Design and implementation of a multi-agent modeling environment. Center for Connected Learning and Computer-Based Modeling. https://ccl.northwestern.edu/2004/netlogo-swarmfest2004.pdf
Tyson, N. deGrasse. (2021, April 3). The universe is under no obligation to make sense to you. [Tweet]. Twitter. https://x.com/neiltyson/status/1378387351806820357
von Bertalanffy, L. (1968). General system theory: Foundations, development, applications. George Braziller.
Wilson, R. (2004, October 2). Emergence isn’t magic. New Scientist, 2467. https://www.newscientist.com/letter/mg18424674-700-emergence-isnt-magic/

Thank you!

Linktree

Presentation

Appendices

(AP) A unit of cultural transmission

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.

(AP) Warning

Murphy’s law: “Anything that can go wrong will go wrong” (epigram).

(AP) Complex versus Complicated

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.

(AP) Complex versus 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).

(AP) Complex versus Complicated

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).

(AP) Complex versus Complicated

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.

(AP) What is a system?

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).

(AP) What is a complex system?

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).

(AP) What is a complex system?

(AP) Complex structures

A system can be considered complex if its entities are:

  • Diverse
  • Interdependent
  • Connected
  • Adaptive

There seems to be no complexity at the extremes of the intervals. Our society is complex because it lies between the extremes.

(AP) The 7 basics

The seven basics consist of 4 properties and 3 mechanisms that are common to all complex adaptive systems:

  • Aggregation (property)
  • Nonlinearity (property)
  • Flows (property)
  • Diversity (property)
  • Tags (mechanism)
  • Internal models (mechanism)
  • Building blocks (mechanism)

(Holland, 1996)

Complexity is common at intermediate levels of these characteristics:

  • Diversity/heterogeneity
  • Interaction/dynamics
  • Connectivity/interconnectedness
  • Adaptation/learning/evolution

(Rodrigues Neto, 2022)

(AP) Human difficulties in understanding complex systems

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).

(AP) Chaos

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.

(AP) Isn’t that psychohistory?

(AP) Untangling versus Entangling

(AP) Emergence

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).

(AP) Emergence

(AP) Emergence

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).

(AP) Structural levels

(AP) How can something be more than the sum of its parts?

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?

(AP) Reductionism

(AP) Reductionism versus Compression

We’re not looking down levels to explain the level of interest.

(AP) Power laws & Factor sparsity

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

(AP) Power laws & Factor sparsity

Power laws (\(y = ax^{-k}\)).

Pareto’s/Zipf’s distributions.

~80/20 rule: 80% of the effects come from 20% of the causes.

(AP) Feedback loops

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.

(AP) Robustness

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).

(AP) Equilibrium states

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.

(AP) Leverage points

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).

(AP) Complexity science(s?)

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).

(AP) Map of the complexity sciences

(AP) Quem te viu, quem te vê

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.

(AP) Other concepts

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)

(AP) What is a model?

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).

(AP) Why use ABM?

  • Description
  • Explanation
  • Experimentation
  • Analogy
  • Education
  • Prediction

(AP) Types of models

(AP) Del rigor en la ciencia

… 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

(AP) On exactitude in science

… 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

(AP) A map on a scale of 1 to 1

“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.”

(AP) Laplace’s demon

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.

(AP) Laplace’s demon

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.

(AP) The modelling cycle

  1. Formulate the question.
  2. Assemble hypotheses for essential processes and structures.
  3. Choose scales, entities, state variables, processes, and parameters.
  4. Implement the model.
  5. Analyze, test, and revise the model.
  6. Communicate the model.


Popper’s hypothetico-deductive method.

(AP) Tools for conceptual modelling

(AP) Nonrealistic models

(AP) Nonrealistic models

(AP) Analyzing agent-based models

(AP) Verification and validation

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.

verification_validation A Real WorldB Conceptual ModelA->B DesignC Implemented ModelB->C ConstructionC->A ValidationC->B Verification

(AP) Pattern-oriented model design

(AP) Abstract versus Empirical models

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).

(AP) A picture is worth a thousand words

\[ \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.

(AP) Public health

Inequalities in physical activity as an emergent feature of a complex system: an agent-based modelling approach (NetLogo/Scala-Java).

(AP) Biophysics

Agent-based models for detecting the driving forces of biomolecular interactions (Orion/Java).

(AP) Geography

Agent-based land change modeling of a large watershed: space-time locations of critical threshold (C++).

(AP) Fishery

Agent-based Model of the German small-scale fisheries (NetLogo/Scala-Java).

(AP) Urban planning

An interactive platform to improve decision-making related to the revitalization of the Champs Élysées (GAMA/Java).

(AP) Housing market

An agent-based model of the UK housing market (NetLogo/Scala-Java).

(AP) Epidemiology

Probabilistic Relational Agent-Based Models (PRAM) influenza simulation: a SIR model (Unity3D/C++).

(AP) Climatology

WorldClim 2.1 in NetLogo (NetLogo/Scala-Java).

(AP) Social psychology

How social groups influence political preferences and how these preferences can lead to segregation behaviors? (NetLogo/Scala-Java).

(AP) ABM + AI: Hide-and-seek

Emergent tool use from multi-agent autocurricula.

(AP) ABM + AI: Project Sid

Simulation of 1000+ autonomous agents collaborating in a virtual world.

(AP) Dialectical materialism’s conjecture

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.

(AP) Dialectical materialism’s conjecture

[…] 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.

(AP) Dialectical materialism’s conjecture

The 4 Fundamental Laws of Dialectical Materialism by Engels and Marx (in opposition to Hegel’s idealist dialectic, inspired by Heraclitus):

  1. Reciprocal action of matter in motion.
  2. The law of the transformation of quantity into quality and vice versa.
  3. The law of the interpenetration of opposites.
  4. The law of the negation of the negation.

(AP) Dialectical materialism’s conjecture

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

(AP) Dialetics and the law of excluded middle

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.

(AP) Popper’s vision of science

I suggest that it is the aim of science to find satisfactory explanations, of whatever strikes us as being in need of explanation.

(AP) Dialetics: a non-falsiable conjecture

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).

(AP) Popper versus Dialetical materialism

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.

(AP) Popper versus Dialetical materialism

[…] 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.

(AP) Popper versus Dialetical materialism

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).

(AP) Popper versus Dialetical materialism

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.

(AP) Popper versus Dialetical materialism

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.

(AP) Popper versus Dialetical materialism

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.

(AP) Popper’s hypothetico-deductive method

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

(AP) Popper’s hypothetico-deductive method

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)

(AP) Popper’s hypothetico-deductive method

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.

(AP) Popper against positivism (or the problem of induction)

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?

  • Anti-inductivist (deduction, satisfactory answers)
  • Anti-verificationist (falsifiability as demarcation criterion)
  • Anti-historicist (rebuttable presumptions)

(AP) Popper against positivism (or the problem of induction)

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.

(AP) Popper against positivism (or the problem of induction)

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.

(AP) The 7 conclusions of Popper on science

  1. It is easy to obtain confirmations, or verifications, for nearly every theory —if we look for confirmations.
  2. Confirmations should count only if they are the result of risky predictions; that is to say, if, unenlightened by the theory in question, we should have expected an event which was incompatible with the theory—an event which would have refuted the theory.

(AP) The 7 conclusions of Popper on science

  1. Every ‘good’ scientific theory is a prohibition: it forbids certain things to happen. The more a theory forbids, the better it is.
  2. A theory which is not refutable by any conceivable event is nonscientific. Irrefutability is not a virtue of a theory (as people often think) but a vice.

(AP) The 7 conclusions of Popper on science

  1. Every genuine test of a theory is an attempt to falsify it, or to refute it. Testability is falsifiability; but there are degrees of testability: some theories are more testable, more exposed to refutation, than others; they take, as it were, greater risks.
  2. Confirming evidence should not count except when it is the result of a genuine test of the theory; and this means that it can be presented as a serious but unsuccessful attempt to falsify the theory. (I now speak in such cases of ‘corroborating evidence’).

(AP) The 7 conclusions of Popper on science

  1. Some genuinely testable theories, when found to be false, are still upheld by their admirers — for example by introducing ad hoc some auxiliary assumption, or by re-interpreting the theory ad hoc in such a way that it escapes refutation. Such a procedure is always possible, but it rescues the theory from refutation only at the price of destroying, or at least lowering, its scientific status. (I later described such a rescuing operation as a ‘conventionalist twist’ or a ‘conventionalist stratagem’).

(AP) The 7 conclusions of Popper on science

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.