Skip to article frontmatterSkip to article content

Welcome to the NetLogo programming material designed specifically for this class. We assume students may not have any prior programming experience. And that’s okay! We will walk through the basics of programming in NetLogo, and also learn in class what it feels like building code for modeling social behavior.

Course Overview

This course teaches agent-based modeling using NetLogo, a powerful yet accessible programming environment. You’ll learn to create computational models that help answer questions about social phenomena.

This guide follows the same structure as the NetLogo documentation, but it is tailored to our course. It is not a replacement for the official documentation, but rather a complement to it. We own all the credit for this material to Ury Wilensky and the Center for Connected Learning and Computer-Based Modeling at Northwestern University Wilensky (1999). The official documentation is a great resource, and we encourage you to use it as well.

In this tutorial, we intend to provide the basic concepts and programming skills necessary to start programming in NetLogo. This tutorial is focused on programming. Come back to this part whenever you need to refresh your memory on the basic concepts of programming in NetLogo.

Learning objectives

By completing this tutorial series, you will be able to:

Why NetLogo for social models?

Learning Approach

This course uses a learning-by-doing approach:

Tutorial Structure

Tutorial 0: Introduction & Interface (40 minutes)

Tutorial 1: Basic Programming Concepts (50 minutes)

Tutorial 2: Working with Agents (60 minutes)

Tutorial 3: Environment and Patches (40 minutes)

Tutorial 4: Building Your First Complete Model (55 minutes)

Tutorial 5: Data Collection and Analysis (45 minutes)

Tutorial 6: Advanced Topics and Troubleshooting (45 minutes)

Getting Started

Begin with: Tutorial 0: NetLogo Introduction & Interface

Prerequisites: None! Just curiosity about social phenomena and willingness to experiment.

What you’ll need:

Learning Path

Recommended progression:

  1. Start with basic concepts and work through each tutorial sequentially
  2. Complete all activities and exercises in each tutorial
  3. Build the example models to reinforce learning
  4. Use the troubleshooting guide when you encounter problems

Time commitment: Plan for approximately 5 hours total to complete all programming tutorials with activities.

Getting Help

If you get stuck:

Ready to start exploring the world of agent-based modeling? Let’s begin!

References