Introduction to Agent-Based Modelling & NetLogo for International Relations and Security Studies

A practical and research-oriented handbook for learning Agent-Based Modelling through the problems of international politics.

The handbook combines NetLogo skills with substantive questions from international relations. Rather than separating programming from theory, each part asks how political actors, relationships, environments and decision rules can be translated into explicit computational models.

It develops from the foundations of Agent-Based Modelling, through practical NetLogo skills, toward complete models of strategic interaction and advanced methods for computational research.

This is a learning document, not an authoritative textbook.

The handbook develops alongside my own study of Agent-Based Modelling and NetLogo. I use it to structure what I read, test my understanding, document what I learn, and gradually connect those ideas to International Relations.

Because of that, some explanations may be incomplete, simplified, or reflect my own interpretation of a concept. I may also get things wrong. Where that happens, I hope to correct and improve the handbook as my understanding develops.

The questions and exercises throughout the handbook should be read in the same way. Some are questions that occurred to me while reading; others are exercises, modelling problems, or thought experiments that helped me understand a concept more clearly. They are not intended as canonical exercises or as an authoritative curriculum.

Corrections, alternative interpretations, criticism, and suggestions are very welcome.

Agent-Based Modelling · NetLogo · International Relations · Simulation · Computational Methods


Why Agent-Based Modelling?

Agent-Based Modelling starts from individual actors, their rules and their interactions, and asks what larger patterns can emerge from them. This makes it particularly useful for political systems in which outcomes are produced through adaptation, interdependence, feedback and strategic interaction rather than through a single linear cause.

Instead of specifying the outcome, specify the actors and mechanisms and examine what kind of political system emerges.

Learn
Understand Agent-Based Modelling as a way of explaining complex social and political systems

Build
Learn NetLogo by constructing actors, environments, networks and strategic interactions

Research
Develop models that can be explored, tested, documented, and used in computational international relations research

The Handbook

The handbook is organised as a progression. It begins with the intellectual foundations of Agent-Based Modelling, develops the practical skills needed to work in NetLogo, applies those skills to international-relations models, and concludes with advanced approaches for research and strategic analysis.

Track 0 – The Field

Understanding what Agent-Based Modelling is, where it comes from, and what kind of explanation it can provide.

M0 – Agent-Based Modelling as a Field

Introduces the intellectual foundations of ABM: generative explanation, emergence, complexity, and the historical development of computational social science. It also positions ABM in relation to game theory, network analysis, machine learning and international-relations research.

Track A – NetLogo Fundamentals

Learning how NetLogo represents agents, environments and interactions, and how those technical choices connect to political analysis.

A1 – Why NetLogo?
Introduces NetLogo as a modelling environment and explains why its agent-centred design is particularly useful for learning and experimenting with complex systems. It also considers the trade-offs between accessibility, rapid model-building and the greater flexibility of general-purpose programming languages.

A2 – Interface Tour
Explains how the Interface, Code and Info environments fit together in an actual modelling workflow. The chapter introduces buttons, sliders, monitors and plots while treating interface design as part of how a model communicates with researchers and decision-makers.

A3 – The Four Primitives
Introduces turtles, patches, links and the observer as the basic building blocks of NetLogo. The chapter connects these primitives to substantive IR choices about actors, territory, relational structure and levels of analysis.

A4 – Syntax Basics
Introduces the core syntax needed to make NetLogo models executable: commands, reporters, variables, procedures, conditionals, iteration and agent context. The aim is to move from understanding the model conceptually to expressing its logic clearly in code.

Track B – Core Programming Skills

Developing the practical tools needed to build models in which agents can select, move, interact, form relationships and produce data.

B1 – Agentsets: ask, of and with

Develops the logic of selecting and querying groups of agents. The chapter shows how ask, of and with allow behaviour to depend on who an actor is, what properties it has, and which other agents meet particular conditions.

B2 – Movement & Spatial Planning

Introduces movement, distance, neighbourhoods and spatial perception. The chapter explores how agents can navigate an environment and make decisions based on what exists around them.

B3 – Links & Networks

Develops NetLogo’s network capabilities by creating, changing and analysing relationships between agents. Alliances, rivalries, trade relations and other connections can therefore become part of the model’s actual causal structure rather than merely visual decoration.

B4 – Time & Stochastic Design

Explains how models represent time, sequencing and randomness. The chapter considers ticks, ordering effects, probabilistic behaviour and why seemingly small choices about timing can change the dynamics of a simulation.

B5 – Data Structures & Procedures

Moves from simple scripts toward organised models built from reusable procedures and structured information. The goal is to make increasingly complex simulations readable, modular and easier to test.

B6 – Input/Output & Data Handling

Introduces ways to bring information into a model and extract results from it. The chapter prepares models for systematic experimentation, external datasets and further analysis outside NetLogo.

Track C – Building International Relations Models

Moving from NetLogo skills to complete models of strategic interaction in international politics.

C1 – Model 1: Arms Race

Builds a model of reciprocal military competition in which states respond to one another’s changing capabilities. The model provides a first framework for exploring feedback, insecurity and escalation through repeated interaction.

C2 – Model 2: Alliance Formation

Models how alliances can emerge from changing relationships, interests and strategic pressures. The chapter shifts attention from individual bilateral choices toward the larger structure produced by repeated alliance decisions.

C3 – Model 3: Deterrence & Escalation

Explores strategic interaction under threat, uncertainty and competing assessments of resolve. The model creates a controlled environment for examining when deterrence holds, when it fails, and how local decisions can generate escalation.

C4 – Model 4: Economic Coercion & Diffusion

Examines coercion in an interconnected system in which economic pressure can travel through networks rather than remaining confined to two actors. The model links strategic choice to dependence, substitution, spillovers and diffusion.

C5 – Model 5: Integration Model

Combines the preceding modelling elements into a more complex international system. Actors, capabilities, relationships, spatial conditions and strategic decisions are brought together to explore how multiple mechanisms interact within the same simulation.

Track D – Advanced Methods for Research

Moving beyond model-building toward systematic experimentation, validation, behavioural complexity and human–machine strategic analysis.

D1 – BehaviourSpace & Sensitivity Analysis

Introduces systematic experimentation with a model across many parameter combinations and repeated runs. The chapter asks which results are robust and which depend strongly on particular assumptions or parameter choices.

D2 – Calibration, Validation & ODD

Examines how an agent-based model can be documented, calibrated and evaluated against theory or evidence. The ODD protocol provides a structured way to make the model’s purpose, entities, processes and design choices explicit.

D3 – NetLogo Extensions

Introduces specialised extensions that expand what NetLogo can represent and analyse, including capabilities such as geographic data and more advanced network or analytical functions.

D4 – Bounded Rationality & Heterogeneous Cognition

Moves beyond perfectly informed or uniformly rational agents. The chapter explores how differences in information, memory, attention, heuristics and decision rules can be represented explicitly within a population of political actors.

D5 – Human-Machine Collaboration and AI-Augmented Agents

Explores models in which computational agents can incorporate learning algorithms or AI-based reasoning and asks what changes when parts of an agent’s decision process are delegated to more adaptive systems.

D6 – Foresight & Scenario Generation

Uses simulation as a way to explore multiple plausible developments rather than produce a single forecast. The emphasis is on identifying pathways, vulnerabilities, branching dynamics and conditions under which different futures become possible.

D7 – Participatory & Companion Modelling

Introduces modelling approaches in which stakeholders participate in defining, challenging or interacting with the model. The chapter treats modelling not only as analysis, but also as a structured process for eliciting knowledge and exposing disagreements.

D8 – Wargaming & Policy Interfaces

Explores the boundary between computational simulation, human-played strategic exercises and decision-support interfaces. The chapter asks where computational models can strengthen wargaming and where human judgment should remain deliberately inside the analytical process.

D9 – The Wider ABM Software Landscape

Places NetLogo within the broader ecosystem of Agent-Based Modelling platforms and programming environments. The chapter considers when NetLogo remains the right tool and when scale, performance, integration or research requirements justify moving elsewhere.

More Than a Coding Guide

Learning to model also means learning to make theoretical choices explicit

Political Theory → Agent Rules
What must actors perceive, remember and do for a political mechanism to exist inside the model?

Interaction → Emergence
How do repeated local decisions generate patterns at the level of alliances, conflict, cooperation or international order?

Simulation → Research
How can model behaviour be explored, challenged and compared without confusing simulation output with prediction?

The purpose of learning to model is not to replace political theory with code. Rather, it is to make our assumptions about actors, interaction and political systems explicit enough to explore what follows from them.