Top Qs
Timeline
Chat
Perspective

NetLogo

Programming language From Wikipedia, the free encyclopedia

NetLogo
Remove ads

NetLogo is a open-source programming language and integrated development environment (IDE) for agent-based modeling. It is part of a family of agent-based modeling products, which includes NetLogo Web, NetLogo 3D, NetTango, TurtleUniverse, HubNet, HubNet Web, and BehaviorSpace. It is currently being maintained by the Center for Connected Learning and Computer-Based Modeling (CCL) at the School of Education and Social Policy (SESP), Northwestern University.

Quick facts Paradigms, Family ...

NetLogo, the programming language, is a Lisp-style programming language with support for lists, “agentsets”, strings, Input/output, and plotting. Like the software itself, the programming language is also extensible using the built-in extension manager. Many extensions are available, including support for Arrays, Tables, Matrices as well as integrations with popular programming languages like R and Python.

Remove ads

About

Summarize
Perspective

NetLogo was designed by Uri Wilensky, in the spirit of the programming language Logo, to be "low threshold and no ceiling". It teaches programming concepts using agents in the form of turtles, patches, links and the observer.[2] NetLogo was designed with multiple audiences in mind, in particular: teaching children in the education community, and for domain experts without a programming background to model related phenomena.[3] Thousands of scientific articles have been published using NetLogo.[4]

The NetLogo environment enables exploration of emergent phenomena. It comes with an extensive models library including models in a variety of domains, such as economics, biology, physics, chemistry, psychology, and system dynamics.[5] NetLogo allows exploration by modifying switches, sliders, choosers, inputs, and other interface elements.[6] Beyond exploring, NetLogo allows authoring new models and modifying extant models.

NetLogo is open source and freely available from the NetLogo website.[7] It is in use in a wide variety of educational contexts from elementary school to graduate school.[8][9][10][11] Many teachers make use of NetLogo in their curricula.[12][13] NetLogo is also widely used in scientific research having been used in several thousand research papers. [4]

NetLogo was designed and authored by Uri Wilensky,[14] director of Northwestern University's Center for Connected Learning and Computer-Based Modeling (CCL).[15]

Remove ads

Features

NetLogo supports many features[16] including but not limited to:

  • Cross-platform support: NetLogo supports Windows, Linux, and MacOS with the option to build from source
  • Cross-platform reproducibility: NetLogo produces consistent output across platforms
  • Double precision floating point numbers
  • First-class function values: anonymous procedures, closures, and lambda
  • On the fly interactions: NetLogo command center can be used to issue commands on the fly
  • Interface Builder: NetLogo packages a drag-and-drop UI interface builder
  • Agent monitors: The Agent Monitor allows for inspecting and controlling agents
  • Export and import functions (export data, save and restore state of model, make a movie)
  • System Dynamics Modeler: NetLogo includes basic support for dynamic system modeling
  • NetLogo 3D: NetLogo 3D offers support for modeling 3D worlds
  • Headless mode: NetLogo can run heedlessly, allowing batch runs from the command line
  • BehaviorSpace: an open source tool used to collect data from multiple parallel runs of a model
  • Extensions: NetLogo supports extensions for both the software and the programming language in the form of JAR files
Remove ads

Books

Summarize
Perspective

Several books have been published about NetLogo.[17]

Books available in print include:

  • Wilensky, Uri; Rand, William (2015). An introduction to agent-based modeling: Modeling natural, social and engineered complex systems with NetLogo. Cambridge: MIT Press. ISBN 978-0-262-73189-8.
  • Railsback, Steven F.; Grimm, Volker (2011). Agent-Based and Individual-Based Modeling: A Practical Introduction. Cambridge: Princeton University Press. ISBN 978-0-691-13674-5.
  • O'Sullivan, David; Perry, George (2013). Spatial Simulation: Exploring Pattern and Process. Wiley-Blackwell. ISBN 978-1-119-97079-8.
  • Gilbert, Nigel; Troitzsch, Klaus G. (2005). Simulation for the Social Scientist, Second Edition. London: McGraw Hill. ISBN 978-0-335-21600-0.
  • Andersen, Britt (2014). Computational Neuroscience and Cognitive Modeling (CCL). London: Sage. ISBN 978-1-4462-4930-7.
  • Romanowska, Iza; Wren, Colin D.; Crabtree, Stefania A. (2021). Agent Based Modeling for Archaeology: Simulating the Complexity of Societies. Santa Fe, New Mexico: Santa Fe Institute Press. ISBN 978-1-947864-25-2.

Books available online include:

Online courses

As of 2019, several massive open online courses are being offered that use NetLogo for assignments and/or demonstrations:

Technical foundation

NetLogo is free and open-source software, released under a GNU General Public License (GPL).[18] Commercial licenses are also available. It is written in Scala and Java and runs on the Java virtual machine (JVM).[19] At its core is a hybrid interpreter/compiler that partially compiles user code to JVM bytecode.[20]

NetLogo Web is a version that runs on JavaScript, instead of the JVM, so models may be run in a web browser. However, it does not yet have all features of the desktop version.

Remove ads

Models

Summarize
Perspective

Models Library

NetLogo provides a built-in models library of over 600 models across multiple disciplines, including social science, psychology, mathematics, physics, biology, economics, game theory, and more. Many of those models are part of the An introduction to agent-based modeling: Modeling natural, social and engineered complex systems with NetLogo textbook [21].

Wolf-Sheep Predation

The Wolf-Sheep Predation model is simple multiagent model in NetLogo is the Wolf-Sheep Predation model,[22] which is shown in the screenshot above. It models the population growth of a predator/prey system over time. It has the following characteristics:

  • There are two breeds of turtles, called sheep and wolves.
  • Sheep and wolves move randomly and have limited energy.
  • Wolves and sheep lose energy by moving. If a wolf or sheep has zero energy, it dies.
  • Sheep gain energy by eating grass.
  • Wolves gain energy by eating sheep.
  • Both wolves and sheep can reproduce, sharing energy with their offspring.

Traffic Grid

The Traffic Grid model[23] in NetLogo simulates vehicular movement and traffic light control on a two‑dimensional city grid. Cars accelerate, decelerate, or stop depending on traffic lights, other vehicles, and a user‑defined speed limit. The model is designed to demonstrate urban traffic dynamics and gridlock formation while allowing users to experiment with traffic management strategies.

Features:

  • Cars accelerate until reaching the speed limit, slow down behind other cars, and stop for red lights.
  • Traffic lights can be controlled either:
    • Manually – users select intersections and toggle lights directly.
    • Automatically – lights switch phases each cycle based on a user‑defined schedule.
  • Global variables include:
    • Grid size (number of horizontal and vertical streets)
    • Number of cars in the simulation
    • Speed limit and ticks per cycle for light changes
  • Cars wrap around the world edges, enabling continuous traffic flow.

Plots and Outputs:

  • Stopped Cars – number of cars stopped each tick
  • Average Speed of Cars – tracks overall traffic flow efficiency
  • Average Wait Time – measures delay per vehicle

The model allows users to test scenarios such as removing lights entirely (causing frequent gridlock), optimizing light phases for maximum flow, and adjusting car density to explore congestion thresholds.

Modeling Commons

The Modeling Commons[24] is a web-based platform for sharing and collaborating on NetLogo models, hosted at modelingcommons.org. Serving as the official NetLogo modeling forum, it allows users to upload, version, and manage NetLogo models, as well as discuss them and attach related files such as data or documentation. Users can search for models by name, author, tags, or content in the Info and Code tabs, and can create "child" variants of existing models to explore modifications while preserving lineage through a parent–child structure. The platform also supports group-based permissions to manage collaboration and access, and automatically grants coauthor status to anyone who uploads a new version of a model. The site is designed to work with all modern web browsers and is most extensively tested on Chrome, Firefox, and Safari.

Remove ads

HubNet

HubNet is a technology that uses NetLogo to run participatory simulations in the classroom.[25] In a participatory simulation, a whole group of users takes part in enacting the behavior of a system. Using an individual device, such as a networked computer or Texas Instruments graphing calculator, each user acts as a separate, independent agent. One example of a HubNet activity is Tragedy of the Commons,[26] which models the economic problem called the tragedy of the commons.

Remove ads

See also

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads