title: NetLogo
text: # NetLogo
  
  NetLogo is a programming language and integrated development environment (IDE) for agent-based modeling.
  
  ## 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. 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. Many scientific articles have been published using NetLogo.
  
  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. NetLogo allows exploration by modifying switches, sliders, choosers, inputs, and other interface elements. Beyond exploring, NetLogo allows authoring new models and modifying extant models.
  
  NetLogo is open source and freely available from the NetLogo website. It is in use in a wide variety of educational contexts from elementary school to graduate school. Many teachers make use of NetLogo in their curricula.
  
  NetLogo was designed and authored by Uri Wilensky, director of Northwestern University's Center for Connected Learning and Computer-Based Modeling (CCL).
  
  ## Other features
  
  In addition to agent-based modeling, NetLogo also includes basic support for dynamic system modeling.
  
  ## Books
  
  Several books have been published about NetLogo.
  
  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:
  
  * Vidal, Jose (2010). "Fundamentals of Multiagent Systems Using NetLogo" (PDF).
  
  ## Online courses
  
  As of 2019, several massive open online courses are being offered that use NetLogo for assignments and/or demonstrations:
  
  * Mitchell, Melanie. "Introduction to Complexity". Santa Fe Institute.
  * Page, Scott E. "Model Thinking". University of Michigan.
  * Brooks, Peter. "Introduction to Comp Sci". Stuyvesant High School.
  
  ## Technical foundation
  
  NetLogo is free and open-source software, released under a GNU General Public License (GPL). Commercial licenses are also available. It is written in Scala and Java and runs on the Java virtual machine (JVM). At its core is a hybrid interpreter/compiler that partially compiles user code to JVM bytecode.
  
  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 have all features of the desktop version, and the official website advises that the "desktop version of NetLogo is recommended for most uses".
  
  ## Examples
  
  A simple multiagent model in NetLogo is the Wolf-Sheep Predation model, 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.
  
  ## HubNet
  
  HubNet is a technology that uses NetLogo to run participatory simulations in the classroom. 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, which models the economic problem called the tragedy of the commons.
  
  