NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo Models Library:
Sample Models/Biology

(back to the library)

Rock Paper Scissors

[screen shot]

If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

WHAT IS IT?

This model explores the role of movement and space in a three species ecosystem. The system consists of three species, represented by red patches, green patches, and blue patches, which compete over space. The interactions between the species are based on the game Rock-Paper-Scissors. That is, red beats green, green beats blue, and blue beats red. Organisms compete with their neighbors, move throughout the environment, and reproduce. These interactions result in spiral patterns whose size and stability depends on the movement rate of the organisms.

The model is written in an event-based fashion, to reflect the formulation of the published model. See HOW IT WORKS and EXTENDING THE MODEL.

HOW IT WORKS

Each patch can be occupied by one of three species or can be blank. The species are represented by three colors: red, green, and blue. Each tick, the following types of events happen at defined average rates:

  • Select event: Two random neighbors compete with each other. In competition, red beats green, green beats blue, and blue beats red, like in rock paper scissors. The losing patch becomes blanks.
  • Reproduce event: Two random neighbors attempt to reproduce. If one of the neighbors is blank, it acquires the color of the other. Nothing happens if neither neighbor is blank.
  • Swap event: Two random neighbors swap color. This represents the organisms moving.

The exact number of, for instance, swap events that occur each tick is drawn from a Poisson distribution with mean equal to (count patches) * 10 ^ swap-rate-exponent. A Poisson distribution defines how many times a particular event occurs given an average rate for that event assuming that the occurrences of that event are independent. Here, the occurrences of the events are approximately independent since they're being performed by different organisms.

The events occur in a random order involving random pairs of neighbors.

HOW TO USE IT

Press SETUP to initialize the model and GO to run it.

SWAP-RATE-EXPONENT, REPRODUCE-RATE-EXPONENT, and SELECT-RATE-EXPONENT each control the rate at which their respective actions are performed. There will be an average of count patches * 10 ^ rate-exponent events each tick for each event type. This means that increasing a slider by 1.0 will result in that event type occurring 10 times more often, no matter what the other sliders are set to. The SWAP-%, REPRODUCE-%, and SELECT-% monitors indicate what percentage of events will be swap, reproduce, and select events (respectively) each tick.

The POPULATIONS plot shows how much of each organism there is over time.

THINGS TO NOTICE

Running the model quickly results in a collection of interconnected spirals in which each species is chasing another species.

Global population levels of each of the species oscillate over time.

THINGS TO TRY

  • What happens as you increase SWAP-RATE-EXPONENT? What happens to the shape and size of the spirals? Why does this happen?
  • What happens as you decrease SWAP-RATE-EXPONENT?
  • Can you find parameter settings that result in the extinction of one of the species? What happens to the other two species?

EXTENDING THE MODEL

  • Try generalizing the model to more than three species.
  • The model is written in an event-based manner. Try rewriting it in a more idiomatic agent-based way.

NETLOGO FEATURES

The model makes heavy use of the random-poisson primitive. This primitive is useful when modeling events that happen at various rates. Furthermore, this model uses a technique wherein a list of events is produced and shuffled to simulate the occurrence of each event at each rate while still allowing the events to occur in arbitrary orders.

RELATED MODELS

Wolf Sheep Predation shows a simpler predator prey model.

CREDITS AND REFERENCES

Reichenbach, T., Mobilia, M., & Frey, E. (2008). Self-organization of mobile populations in cyclic competition. Journal of Theoretical Biology, 254(2), 368–383. https://www.sciencedirect.com/science/article/pii/S0022519308002464?via%3Dihub

Reichenbach, T., Mobilia, M., & Frey, E. (2007). Mobility promotes and jeopardizes biodiversity in rock-paper-scissors games. Nature, 448(7157), 1046–1049. https://doi.org/10.1038/nature06095

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 2017 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

(back to the NetLogo Models Library)