Agent-based Modelling

Lecturers: Flaminio Squazzoni & Simone Gabbriellini

Modality: In presence

Week 2: 19-23 August 2024


Workshop contents and objectives

Macro social dynamics, such as ethnic segregation patterns, socio-economic inequalities, and opinion polarization, are puzzling because they are emerging outcomes of complex, non-linear interactions by a multitude of individuals or organisations. Standard quantitative social research struggles to capture the fundamental micro-macro generative mechanisms behind these complex dynamics, as it cannot explore the effect of heterogeneous agent behaviour and complex social interactions. Qualitative social research explores observed behaviours in realistic social settings but is poorly equipped to discriminate among possible explanations for the emergence of large-scale social patterns. This is what agent-based modelling can offer to any student regardless of their qualitative or quantitative background: Observing the emergence of social dynamics in a computer simulation by specifying heterogeneous rules for agent behaviour and studying the effect of complex spatial/network interaction settings on social aggregates. By using the computer as an experimental laboratory to manipulate various behavioural and sociological parameters (e.g., agent behavioural strategies, social networks, spatial neighbourhoods), students can test alternative micro-macro explanations of large-scale social dynamics.  

This workshop aims to introduce students with little or no experience to agent-based modelling using NetLogo as the programming language. The goal is to help students “agentize” their conceptual model, i.e., bring back their social dynamics of interest to agent behaviour and interaction and provide computational foundations for using NetLogo as an easy tool to build their own model. Some canonical models will be introduced and coded step-by-step in the class. After this course, students will be able to design a model of their social dynamics of interest with NetLogo, learn how to incorporate empirical data in important model parameters and use this tool to generate output dataset to be analysed statistically with R, Python, Stata or any other statistics package, and/or exposed visually with graphs and videos.


Workshop design

In the morning sessions, theoretical concepts and examples of models will be presented and discussed in the class. Topics will include residential segregation, social influence, culture dynamics, and opinion polarisation. In the afternoon sessions, students will be guided to code their assigned models and perform individual/team exercises.


Detailed lecture plan (daily schedule)

Day 1.
Morning: Introduction to Agent-Based Modelling
Afternoon: Introduction to NetLogo

Day 2.
Morning: Schelling’s residential segregation model
Afternoon: NetLogo excercises

Day 3.
Morning: Axelrod’s model of cultural dynamics
Afternoon: NetLogo excercises

Day 4.
Morning: Flache & Macy’s model of polarisation & networks
Afternoon: NetLogo excercises

Day 5.
Morning: Model Design and Analysis
Afternoon: Individual/team exercises


Class materials

All materials, code, presentations, papers, and recommended reading will be available through iCorsi.





Recommended readings or preliminary material

  • Bianchi, F. & Squazzoni, F. (2015) Agent-based models in sociology. Wiley Interdisciplinary Reviews: Computational Statistics, 7(4), 284-306.
  • Bianchi, F. & Squazzoni, F. (2019) Modeling and social science: Problems and promises. In Moallemi, E. A. & de Haan, F. J. (Eds.), Modelling Transitions. Virtues, vices, visions of the future, London, UK: Routledge, 60-74.
  • Gilbert, N. (2019) Agent-based models, Sage, Second edition.
  • Squazzoni, F. (2012) Agent-based computational sociology. Hoboken, NJ: Wiley Blackwell
  • Squazzoni, F. & Bianchi, F. (2023) Exploring interventions on social outcomes with in silico, agent-based experimets. In Damonte A. & Negri F. (Eds.), Causality in policy studies: A pluralist Toolbox. Berlin Heidelberg, Springer, 217.234.