NetLogo

The educational technology and digital learning wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Draft

Introduction

Netlogo is an agent-based modelling and simulation platform. It also allows creating system dynamics model and participatory simulations. It is suitable for research purposes as well as for various educational purposes. Netlogo can be used to teach programming, computational thinking, simulation and model building, and understanding of complex phenomena through models in many different domains.

“NetLogo is a cross-platform multi-agent programmable modeling environment. NetLogo was authored by Uri Wilensky in 1999 and is under continuous development at the CCL (the people who brought you StarLogoT). NetLogo also powers the HubNet participatory simulation system”.

“NetLogo is a well-written, easy-to-install, easy-to-use, easy-to-extend, and easy-to-publish-online environment. The entry level is simple enough and the tutorials provided in the package are straightforward and clear enough that anyone who can read and is comfortable using a keyboard and mouse could create their own models in a short time, with little or no additional instruction” [1]

NetLogo can be described as a programming microworld. It is officially described as a programmable modeling environment for simulating natural and social phenomena. “NetLogo is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of "agents" all operating independently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals.” (What is NetLogo?, retrieved 09:54, 18 September 2009 (UTC))

“NetLogo is a cross-platform multi-agent programmable modeling environment. NetLogo was authored by Uri Wilensky in 1999 and is under continuous development at the CCL (the people who brought you StarLogoT). NetLogo also powers the HubNet participatory simulation system”.

NetLogo is a free environment and as of Feb 2019 is still under active development and a large model library. We tested this under Windows 10 and Ubuntu 18. - Daniel K. Schneider (talk) 11:40, 11 March 2019 (CET)

See also:

The software

NetLogo is free and runs on must systems (since it is programmed in Java). As of Feb 2019, this is a live project, its last update was made in June 2018.

You also can use NetLogo Web, a browser-based platform. However, it does not work as well as the the desktop platform and it does have some restrictions

I suggest donating some money to this open source project since it its authors managed to create a useful environment and keep it going. - Daniel K. Schneider (talk) 16:32, 14 March 2019 (CET)

Download and installation

The software is available via a download page from the official home page. The installer also will install a private Java 8 on all architectures (win / mac / linux).

Linux users: Unpack the archive, and then run the Netlogo binary executable from a terminal in the installation directory. Else, click on it from the file manager.

The source code (for developers) is available from github

The models library is available in the File menu (or via the CTRL-M shortcut).

Programming simple agents

It has an easy to use graphical interface to create simple simulations. You may create a world and parametrize turtles that move around. At some point one then can add programming logic to these objects. Have them move around more smartly, interact with others or with the place on which they currently sit. Turtles can have any shape, i.e. a car.

Netlogo simulations

In addition to a learning environment for simple agent-based programming, NetLogo is a modeling and simulation tool of several kinds.

(1) Firstly, by definition, a multi-turtle environment like NetLogo is an Agent-based modelling and simulation (ABMS) environment since the turtles interact with each other and the environment. You may play with parameters and use the “BehaviorSpace [...] software tool integrated with NetLogo that allows you to perform experiments with models. It runs a model many times, systematically varying the model's settings and recording the results of each model run. This process is sometimes called "parameter sweeping". It lets you explore the model's "space" of possible behaviors and determine which combinations of settings cause the behaviors of interest.” (BehaviorSpace)

A default installation contains many models from several subject areas, including a large section of curricular materials.

(2) The system dynamics modeler allows creating system dynamics models. The System Dynamics manual (retrieved 09:54, 18 September 2009 (UTC)) defines the difference between the two models - ABMS vs. system dynamics like this: “With the agent-based approach we usually use in NetLogo, you program the behavior of individual agents and watch what emerges from their interaction. In a model of Wolf-Sheep Predation, for example, you provide rules for how wolves, sheep and grass interact with each other. When you run the simulation, you watch the emergent aggregate-level behavior: for example, how the populations of wolves and sheep change over time. With the System Dynamics Modeler, you don’t program the behavior of individual agents. Instead, you program how populations of agents behave as a whole. For example, using System Dynamics to model Wolf-Sheep Predation, you specify how the total number of sheep would change as the total number of wolves goes up or down, and vice versa. You then run the simulation to see how both populations change over time.” See System Dynamics (NetLogo) for an example.

(3) With the Hubnet model you may “run participatory simulations in the classroom. In a participatory simulation, a whole class takes part in enacting the behavior of a system as each student controls a part of the system by using an individual device, such as a networked computer or Texas Instruments graphing calculator.” (HubNet, retrieved 09:54, 18 September 2009 (UTC)).

Netlogo includes additional features, consult the NetLogo web site.

Simulation example

The following screen capture shows a comparison between an agent-based and a simulation-based predation model made by Wilensky (2005). [2]. In the simple agent model the wolves at some point will eat all the sheep and then die out. In the simulation model, populations can recover since fractions of a single wolf or sheep are allowed. A second, more comple sheep - wolves - grass model is more stable.

Agent vs. system dynamcis. Only 3 sheep left in the agent model after 307 ticks

We discuss both of types of models in the NetLogo Wolf Sheep Predation model and System Dynamics (NetLogo).

Participatory simulation

According to the CCL page (March 2019), “The HubNet technology built into NetLogo enables a network of learners to collaboratively explore and control a simulation. Students engaged in such a participatory simulation act out the roles of individual elements of a system while observing how the behavior of the system as a whole can emerge from these individual behaviors. The emergent behavior of the system and its relation to individual participant actions and strategies can then become the object of collective experimentation, discussion, and analysis.”

An example in the model library is Oil Cartel HubNet model [3]. It can be run for an economics class for example. Each student then plays a member of the cartel according to the following setup described in the "Info" page of the simulation: “The cartel currently has an agreement in place to limit overall production, resulting in one common official price, and a quota for each member. Each member of this cartel independently decides whether to abide by the agreement or to “cheat” on the agreement and try to boost profits by producing and selling beyond their quota. Furthermore, cartel members face different revenue demands (“Profit-Needed”) from their home government, as they come from countries of differing levels of economic prosperity.”

For educational researchers

NetLogo has a configurable logging feature to study user behavior and interaction. For example, the system can be used in education to teach simulation thinking, curricular topics like population dynamics, and programming. Student data can be collected for various studies.

The system also can be used as research tool to create analytical models.

Party model example

See also NetLogo Wolf Sheep Predation model and System Dynamics (NetLogo) for other NetLogo examples.

Below we introduce the NetLogo Party model [4], a simple group dynamics system example based on the work of the pioneering economist Thomas Schelling [5]. It is also discussed in Resnick, M. & Wilensky, U. (1998) [6]

Purpose of the model

This analytical model explains how preferences about opposite gender presence in a group can lead (or not) to segregation of genders in party groups. In the library there is a related segration model about urban housing that is based on the idea that agents want make sure that they live near some of their own. The effect is separation, even if the preferences are not very high. Such models help creating economic models of human behavior, i.e. how systems are created by the aggregation of individual behavior.

According to the author [4], a cocktail party is modeled. {{quotation. The men and women at the party form groups. A party-goer becomes uncomfortable and switches groups if their current group has too many members of the opposite sex. [...] The party-goers have a TOLERANCE that defines their comfort level with a group that has members of the opposite sex. If they are in a group that has a higher percentage of people of the opposite sex than their TOLERANCE allows, then they are considered uncomfortable”, and they leave that group to find another group. Movement continues until everyone at the party is “comfortable” with their group.}}

Users can explore the following parameters:

  • tolerance. E.g. 60% means that groups with less or equal 60% are tolerated. Else the agent moves to a next group
  • num-groups
  • number. Number of invited people.

“The number happy and single sex groups plots and monitors show how the party changes over time: number happy is how many party-goers are happy (that is, comfortable), single sex groups shows the number groups containing only men or only women.”

Example runs

The following run shows, that for a party with 30 participants, max. group size of 6 and tolerance of opposite sex = 33 we find five stable single sex groups after 10 iterations. Since distribution in the setup and movement of people is probabilistic, different runs can produce different results. The next screen shot shows a different result, stable after 7 ticks.

NetLogo party model, 33% tolerance. Run 1
NetLogo party model, 33% tolerance. Run 2

If we set tolerance to 66%, we find four single sex groups and two mixed groups after three ticks.

NetLogo party model, 66% tolerance. Run 1

Educational benefits

When NetLogo is used as modeling tool by students, it “promotes several processes of reasoning that are central to science: developing original hypotheses, formalizing ideas, researching existing solutions, and critical analysis of results.” (Wilensky & Reisman 2006:205) [7]

Moreover, we also can find a "learning through building" approach that is popular in engineering sciences: “If you can’t build it, then you don’t under-stand it. Our approach of modeling underlying mechanisms takes the engineer’s dictum seriously. To model a system, it is not sufficient to understand only a handful of isolated facts about it. Rather, one must understand many facts and concepts about the system and, most important, how these relate to each other.The process of modeling is inherently about developing such conceptual relations and seeking out new facts and concepts when a gap in one’s knowledge is discovered.” (Wilensky & Reisman 2006:202) [7]

“Using the NetLogo language, students and researchers have constructed large numbers of models of complex phenomena in the natural and social worlds. The Models Library that comes with NetLogo covers phenomena in biology, chemistry, physics, earth science economics, history, sociology, business, medicine and a variety of other domains. These models can be explored and revised as part of model-based inquiry in middle, secondary and undergraduate classrooms as well as serving as the basis for research in more advanced settings.” (Center for Connected Learning and Computer-Based Modeling (CCL), retrieved March 2019).

NetLogo is an nice environment to teach computational thinking. Since digital literacy and thinking has become hot topic again, e.g. mandatory in many curricula, interest for NetLogo should rise the following years. It is more than a programming environment and as such suitable for integrated pedagogic approaches that marry informatics, method, mathematics, domains-specific knowledge,etc. - Daniel K. Schneider (talk) 17:18, 15 March 2019 (CET)

Classical vs. embodied models

According to Wilensky and Reisman (2006), [7], embodied, agent-based models do have some advantages over system-dynamics (or similar) models. In a study, “using agent-based, embodied modeling tools, students model the microrules underlying a biological phenomenon and observe the resultant aggregate dynamics.” In the two cases described, “students framed hypotheses, constructed multiagent models that incorporate these hypotheses, and tested these by running their models and observing the outcomes. Contrasting these cases against traditionally used, classical equation-based approaches, we argue that the embod-ied modeling approach connects more directly to students’ experience, enables ex-tended investigations as well as deeper understanding, and enables “advanced” top-ics to be productively introduced into the high school curriculum.”

Teaching systems thinking in highschool

In a metareview, Yoon et al. (2018) [8] discuss the state of research on complex systems in science education (CSSE), an important component of the Next Generation Science Standards (NGSS). The authors conclude (p 315.) with “critical needs in five areas: (a) a need for more research in different knowledge domains outside of the content areas of biology and ecology, (b) a need for more research on system states as opposed to structures and processes, (c) a need to develop a common understanding of the complex systems content that is essential to be learned, (d) a need to consider contextual factors that will affect the learning environment and population including teacher learning, and (e) more comparative research to determine the value of CSSE interventions over traditional forms of instruction, including an emphasis on what teachers need in professional development activities.”. Yoon et al. (2018:313) also conclude that “CSSE studies have made significant inroads with respect to what students know about complex systems and how learning can be supported.A prudent next step might be for the field to reach consensus on essential content features of complex systems learning.”

Netlogo as research tool

Netlogo has been used for many research projects in different domains. Simulation packages and associated materials distributed by NetLogo plaform are “also widely used by researchers to construct models of scientific and policy phenomena such as policies to limit spread of HIV, examine the effects of school choice policy, or more basic science such as modeling predator-prey ecologies, properties of materials, evacuation behavior and many more.” (CCL], March 2019).

The references page includes a few hundred articles, Google scholar a few thousands. While earlier publications seem to focus on education, we believe there is dominance of research-focused publications. E.g. in 2018, 102 articles were listed. Only about 11 directly concern education.

Links

Official:

  • NetLogo Home Page. This website includes the downloads, user manual, extensions, model library documentation, links to various groups, etc.

Extra model libraries:

Tutorials:

Bibliography

Below a random selection. Much more is available in the official Resources and Links page, the CCL Research Papers index, publications that cite NetLogo index.

  • Dubovi, I., Dagan, E., Mazbar, O. S., Nassar, L., & Levy, S. T. (2018). Nursing students learning the pharmacology of diabetes mellitus with complexity-based computerized models: A quasi-experimental study. Nurse education today, 61, 175-181 http://ccl.northwestern.edu/2018/dubovi2018.pdf
  • Lotka, A.J. (1956) Elements of Mathematical Biology. New York: Dover.
  • Line Have Musaeus, P. M. (2019).Computational Thinking in the Danish High School: Learning Coding, Modeling, and Content Knowledge with NetLogo. Proceedings of the SIGCSE '19 Proceedings of the 50th ACM Technical Symposium on Computer Science Education (pp. 913-919). Minneapolis, MN, USA, http://ccl.northwestern.edu/2019/danish.pdf
  • Wilensky, U & Rand, W. (2015). Introduction to Agent-Based Modeling: Modeling Natural, Social and Engineered Complex Systems with NetLogo. Cambridge, MA. MIT Press.
  • Kornhauser, D., Wilensky, U., & Rand, W. (2009). Design guidelines for agent based model visualization. Journal of Artificial Societies and Social Simulation, JASSS, 12(2), 1.
  • Yoon, S. A., Goh, S. E., & Park, M. (2018). Teaching and Learning About Complex Systems in K–12 Science Education: A Review of Empirical Studies 1995–2015. Review of Educational Research, 88(2), 285-325 http://ccl.northwestern.edu/2018/yoon2018.pdf
  • Wilensky, U. & Reisman, K. (1999). Connected Science: Learning Biology through Constructing and Testing Computational Theories – an Embodied Modeling Approach. International Journal of Complex Systems, M. 234, pp. 1 - 12. (This model is a slightly extended version of the model described in the paper.)

Cited with footnotes

  1. Sklar, E. (2007). NetLogo, a multi-agent simulation environment. Artificial Life, 13(3):303–311. https://doi.org/10.1162/artl.2007.13.3.303, cited by Luis Izquierdo, Segismundo Izquierdo & William Sandholm, Agent-Based Evolutionary Game Dynamics, Open Textbook.
  2. Wilensky, U. (2005). NetLogo Wolf Sheep Predation (Docked Hybrid) model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation(DockedHybrid). Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
  3. Maroulis, S. and Wilensky, U. (2004). NetLogo Oil Cartel HubNet model. http://ccl.northwestern.edu/netlogo/models/OilCartelHubNet. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
  4. 4.0 4.1 Wilensky, U. (1997). NetLogo Party model. http://ccl.northwestern.edu/netlogo/models/Party. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
  5. Schelling, T. (1978). Micro-motives and Macro-Behavior. New York: Norton.
  6. Resnick, M. & Wilensky, U. (1998). Diving into Complexity: Developing Probabilistic Decentralized Thinking through Role-Playing Activities. Journal of Learning Sciences, Vol. 7, No. 2. http://ccl.northwestern.edu/papers/starpeople/
  7. 7.0 7.1 7.2 Wilensky, U., & Reisman, K. (2006). Thinking Like a Wolf, a Sheep, or a Firefly: Learning Biology Through Constructing and Testing Computational Theories—An Embodied Modeling Approach. Cognition and Instruction, 24(2), 171–209. https://doi.org/10.1207/s1532690xci2402_1
  8. Yoon, S. A., Goh, S. E., & Park, M. (2018). Teaching and Learning About Complex Systems in K–12 Science Education: A Review of Empirical Studies 1995–2015. Review of Educational Research, 88(2), 285-325 http://ccl.northwestern.edu/2018/yoon2018.pdf