Aim

This short workshop is intended to introduce agent-based modeling and kickstart working with NetLogo. In the first part we will discuss why one would use ABM’s as a theoretical tool to understand democratic debate. In the second part, we will get you started with NetLogo, a very intuitive and easy tool to program simple ABMs. We explain the basics of NetLogo and show some simple and some more advanced code.

Today, we…

  • …get a feeling for when and why to apply Agent-Based Modeling
  • …learn the basic principles of NetLogo
  • …see some basic and some advanced NetLogo code

Preparation

  • If you want to play around with the code yourself, download and install `NetLogo’ (version 6 or higher) on your machine beforehand. A safe download of the software can be found here.

Suggested readings

On actor-based thinking:

  • Macy, M. W., & Willer, R. (2002). From factors to actors: Computational sociology and agent-based modeling. Annual review of sociology, 28(1), 143-166. doi: 10.1146/annurev.soc.28.110601.141117

On the relation between ABM and CSS:

  • Flache, A., Mäs, M., & Keijzer, M. A. (2022). Computational approaches in rigorous sociology: agent-based computational modeling and computational social science. Handbook of Sociological Science, 57-72. 10.4337/9781789909432.00011
  • Keuschnigg, M., Lovsjö, N., & Hedström, P. (2018). Analytical sociology and computational social science. Journal of Computational Social Science, 1, 3-14. 10.1007/s42001-017-0006-5

A more practical guide to starting with ABM:

  • Flache, A., & de Matos Fernandes, C. A. (2021). Agent-based computational models. Research Handbook on Analytical Sociology, 453-73. 10.4337/9781789906851.00033

Exercise

If you want, you can do this little exercise to get your hands dirty with NetLogo coding.

For the hands-on part of the session, we looked at a simple alternative to Everett Rogers’ theory about the diffusion of innovation from a complexity perspective. Rogers argued that the often observed S-curve in the adoption of innovations is due to differences in individual tendencies to adopt an innovation. Assuming that (1) such a tendency is normally distributed in a population, and (2) people are aware of the number of others that have adopted the innovation, reveals the non-linear relationship between time and share of the population that adopted some innovation.

Fig 1. The S-curve (yellow) explained by a distribution of adopters (blue)


Alternatively, Agent-Based Modeling can offer a competing explanation that relies on network structure, but does not make assumptions about individual differences, nor assumes that people have complete information about the state of the world.

The model

We programmed a simple diffusion model in NetLogo. Turtles are placed on a ring network and adopt the color trait of their neighbors depending on some threshold. The code includes a rewiring procedure that enabables the construction of long range ties.