NetLogo

Wikipedia

NetLogo
Paradigmsmulti-paradigm: educational, procedural, agent-based, simulation
FamilyLisp
Designed byUri Wilensky
DeveloperNorthwestern University Center for Connected Learning and Computer-Based Modeling (CCL)
First appeared1999; 26 years ago (1999)
Stable release
6.4.0[1] Edit this on Wikidata / 17 November 2023; 21 months ago (17 November 2023)
Typing disciplineDynamic, strong
ScopeLexical
Implementation languageScala, Java
PlatformIA-32, x86-64
OSCross-platform: JVM
LicenseGPL
Filename extensions.nlogox, .nlogo, .nlogo3d, .nls
Websitewww.netlogo.org
Major implementations
Scala (Desktop), JavaScript (Web)
Influenced by
Logo, StarLogo

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.

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.

About

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]

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

Books

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.

Models

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.

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.

See also

References

  1. "Release 6.4.0". 17 November 2023. Retrieved 19 November 2023.
  2. Wilensky, Uri (1999–2019). "Types of Agents in NetLogo". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  3. Kornhauser, Daniel; Rand, William; Wilensky, Uri (November 15–17, 2007). Visualization Tools for Agent-Based Modeling in NetLogo (PDF). Agent2007. The Center for Connected Learning and Computer-Based Modeling (CCL). Chicago, Illinois: Northwestern University. Retrieved 2019-05-03.
  4. 1 2 Wilensky, Uri (1999–2025). "NetLogo References". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2025-01-24.
  5. Wilensky, Uri (1999–2025). "NetLogo Models Library". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  6. Wilensky, Uri (1999–2025). "Interface Guide". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2020-01-24.
  7. Wilensky, Uri (1999–2019). "Download NetLogo". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  8. Sengupta, Pratim; Wilensky, Uri (2011). "Lowering the Learning Threshold: Multi-Agent-Based Models and Learning Electricity" (PDF). The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  9. Wilensky, Uri; Novak, Michael (2010). "Teaching and Learning Evolution as an Emergent Process: The BEAGLE project (chapter 10)". In Taylor, R.; Ferrari, M. (eds.). Epistemology and Science Education: Understanding the Evolution vs. Intelligent Design Controversy (PDF). New York: Routledge.
  10. Blikstein, Paulo; Wilensky, Uri (2009). "An Atom is Known by the Company it Keeps: A Constructionist Learning Environment for Materials Science Using Agent-Based Modeling (CCL)" (PDF). International Journal of Computers for Mathematical Learning. 14 (2): 81–119. doi:10.1007/s10758-009-9148-8. S2CID 10500589.
  11. Levy, Sharona T.; Wilensky, Uri (2009). "Students' Learning with the Connected Chemistry (CC1) Curriculum: Navigating the Complexities of the Particulate World" (PDF). Journal of Science Education and Technology. 18 (3): 243–254. Bibcode:2009JSEdT..18..243L. doi:10.1007/s10956-009-9145-7. S2CID 62526922.
  12. Wilensky, Uri (1999–2019). "University, secondary, and online courses that utilize NetLogo". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  13. Holmes, David M. "Comp Sci at Stuyvesant with D. Holmes". Professional web site for David Holmes. New York City, New York, United States. Retrieved 2019-05-03.
  14. "Profile: Dr. Uri Wilensky".
  15. Tisue, Seth; Wilensky, Uri (October 2004). NetLogo: Design and Implementation of a Multi-Agent Modeling Environment (PDF). Agent2004. Chicago, Illinois. Retrieved October 4, 2012.
  16. "What is NetLogo?". NetLogo User Manual. NetLogo. Retrieved 4 August 2025.
  17. Wilensky, Uri (1999–2019). "NetLogo: Resources and Links". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.
  18. "Under what license is NetLogo released? Is the source code available?".
  19. "NetLogo Frequently Asked Questions (FAQ)". December 14, 2015.
  20. Stonedahl, Forrest; Tisue, Seth; Wilensky, Uri (2006). Breeding faster turtles: Progress towards a NetLogo compiler (PDF). Agent 2006. Chicago, Illinois. Retrieved October 22, 2012.
  21. 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.
  22. "Wolf Sheep Predation".
  23. "Traffic Grid (GitHub)". GitHub. Center for Connected Learning and Computer Modeling, Northwestern University. Retrieved 4 August 2025.
  24. "Quick Introduction to the Modeling Commons". Modeling Commons. Center for Connected Learning and Computer Modeling. Retrieved 4 August 2025.
  25. "HubNet Guide". December 14, 2015.
  26. Wilensky, Uri (2002). "Tragedy of the Commons HubNet". The Center for Connected Learning and Computer-Based Modeling (CCL). Evanston, Illinois: Northwestern University. Retrieved 2019-05-03.