Masthead

Agent-Based Models with NetLogo

NetLogo is a model package specifically design for agent-based modeling. It is much easier to use than a compiled programming language but will not provide the level of performance of a compiled language.

Learning Objectives:

Getting Started

Follow the steps below to get started in NetLogo. We also recommend the NetLogo tutorials available in the "Help" menu.

  1. Enter NetLogo and go to "File -> Models Library".
  2. Load the "Wolf Sheep Predation" model
  3. Press the "setup" button to initialize the model
  4. Press the "go" button to start the model
  5. Press the "go" button again to pause the model
  6. Press the "setup" button to reinitialize the model

This is all you need to do to run an existing NetLogo model. Try changing the parameters and see how this effects the dynamics of the wolves and sheep. The "normal speed" that the model is running at can also be changed. The .

The User Interface

Take a look at the user interface for NetLogo. There are a number of different items that you can add to the interface.

NetLogo Abilities

Spend some time trying out the different models that are available in NetLogo's model library.

Quickly review the contents of Tutorial #1

Introduction to NetLogo Commands

Go to tutorial #2 in the NetLogo User Manual and follow it to learn about NetLogo commands.

Creating a Model

Go through Tutorial #3 in the NetLogo User Manual.

The tutorial is a little out of date:

Note: The tutorials do not show a lot of comments. You need to add section heading blocks and enough inline comments for someone who is not familiar with your model to understand it. Use ";;" for comments

Turn-In

Take the basic model from Tutorial #3 and add a predator-prey dynamic (i.e. something that eats the herbivores). The Wolf-Sheep model shows an example of how to do this.

Make sure your model runs stable with the default settings. Also, make sure you document your code with header blocks and inline comments.

Add a minimum amount of information to the "Info" tab so I know you know how to use the model.

© Copyright 2018 HSU - All rights reserved.