NetLogo
The long-standing desktop environment for agent-based models: turtles, patches, links and a built-in experiment runner.
- Best for
- Fast agent-based prototypes and teaching
- Pricing
- Free (open source)
- Licence
- GPL-2.0
- Site
- netlogo.org ↗
What it is
NetLogo is a programmable modelling environment for agent-based simulation, developed at Northwestern University’s Center for Connected Learning since 1999. You write models in the NetLogo language, a descendant of Logo, and build an interface of buttons, sliders, plots and monitors around them in the same window. The world is made of three kinds of agent: turtles that move, patches that make up the grid, and links that connect turtles. An observer issues commands to all of them.
It runs on the JVM as a desktop application for Windows, macOS and Linux, and NetLogo Web runs many models in a browser. The current major line is NetLogo 7, released in September 2025, which brought a redesigned interface with light and dark themes and a new file format. The source is on GitHub under the GPL.
Where it fits in AI-driven worlds
To find out whether a rule set produces interesting behaviour before committing to building it into a game, NetLogo is usually the quickest option. Flocking, predator and prey dynamics, the spread of rumours through a population, traffic, resource competition: each of these takes a few dozen lines, and you can watch it run within minutes.
That makes it a sketchbook for emergent systems. The ecology of a survival game, the reputation system of a city builder or the crowd logic of a strategy title can be tested in isolation, with sliders exposed for every parameter. BehaviorSpace, the built-in experiment tool, then sweeps those parameters across many runs and exports the results, which is the honest way to check whether a behaviour is robust or just a lucky seed.
It is also a useful target for AI coding assistants. The language is small and stable, there is decades of example code in the Models Library, and the results are visible straight away, so it is easy to tell when generated code is wrong.
Strengths
- Low ceremony. A model is one file. There is no build step, no project structure and no dependency management to think about.
- Live feedback. You can change a slider or type a command into the Command Center while the model runs, which encourages experimentation.
- The Models Library. Hundreds of documented sample models across biology, social science, physics and computer science, many of them classic models from the research literature.
- BehaviorSpace. Parameter sweeps and repeated runs are built in rather than something you have to script yourself.
- Extensions. There are extensions for GIS data, network analysis, and calling out to Python and R, so you are not limited to what the core language offers.
- Longevity. It has been maintained for over 25 years and has a large body of teaching material, including Wilensky and Rand’s textbook An Introduction to Agent-Based Modeling.
Limits
- Not a game engine. Graphics are a 2D grid (with a 3D variant), and there is no physics, audio or asset pipeline. You prototype here and rebuild elsewhere.
- Performance ceiling. It handles thousands of agents comfortably, but large or long-running models will be slower than a compiled or array-based implementation.
- Its own language. NetLogo code does not transfer directly to Python, C# or JavaScript. Porting a model to a game means rewriting it, though the logic usually carries over cleanly.
- Software engineering tooling is thin. Version control works, but testing, modularity and refactoring support are basic compared with a general-purpose language.
- File format change. NetLogo 7 introduced a new model format, so check the transition guide if you are opening older models or sharing with people on 6.x.
Getting started
Download the installer from the NetLogo website, open it, and paste this into the Code tab:
to setup
clear-all
create-turtles 100 [ setxy random-xcor random-ycor ]
reset-ticks
end
to go
ask turtles [
right random 50
left random 50
forward 1
]
tick
end
Then add two buttons on the Interface tab, one calling setup and one calling go with the “Forever” box ticked. You now have a hundred agents wandering at random. From there, the Models Library (File, then Models Library) is the best teacher: open Wolf Sheep Predation or Flocking, read the Info tab, and change things.
Verdict
NetLogo is still the fastest route from a “what happens if” question to a running agent-based model. It will not ship your game, and it is not meant to, but as a place to test the rules behind a living world before you build them properly, it earns its place. If you later need Python’s data tools, Mesa is the natural next step.
