NetLogo banner
 Home Page
 Download
 Models
 Community Models
 Extensions
 User Manual:
  Web version
  Printable version
 FAQ
 Resources
 Contact Us

NetLogo Models Library:
HubNet Activities/Unverified

Note: This model is unverified. It has not yet been tested and polished as thoroughly as our other models.

For information about HubNet, click here.

(back to the library)

Predator Prey Game

[screen shot] (The run link is disabled because HubNet Activities cannot be run in the web applet version of NetLogo)

Note: If you download the NetLogo application, all of the HubNet Activities are included.

This activity is available only for computer HubNet, not calculator HubNet.

WHAT IS IT?

This model simulates a predator-prey relationship. The population consists of wolf packs (predators) and sheep herds (prey), some controlled by students via HubNet clients and some androids controlled by the computer. The wolves gain energy from consuming sheep, and the sheep gain energy from consuming grass (a primary producer). The model allows students to examine simple population dynamics like those modeled through the Lotka-Volterra equations in a participatory way.

HOW IT WORKS

Predators and prey move around the world, searching for food. Prey eat plants (green areas), while predators eat prey. All animals gain energy by finding food and expend energy in the search for food. Prey also lose energy when predators catch them. Each predator agent can be thought of as a pack of wolves and each prey can be thought of a herd of sheep. Prey can be caught by predators a few at a time before they ultimately die out. In other words, a prey agent does not die the very first time they run into a predator. The grass is also a limited resource; it regrows at a fixed rate. Android predators and prey can wander around the world at random, while student predators and prey are directed through the HubNet clients.

If an animal's energy gets too low it dies. If a student controls the animal, that student is given the option to "recreate" as a predator or prey. Until the student "recreates" they cannot interact with the rest of the system, i.e. they cannot be eaten, they cannot eat, and they cannot move. By recreating the students have some control over the populations in the world and can dramatically shift the population dynamics. If the energy of an android goes below zero the android merely dies. However, androids do have the ability to reproduce, which student agents do not. Every tick each prey has a PREY-REPRODUCE chance of creating a new prey, and each predator has a PREDATOR-REPRODUCE chance of creating a new predator.

HOW TO USE IT

To start the game first press the SETUP button then press the GO button and ask the students to log in. You may also want to create android predators or prey using the ADD-PREDATORS and ADD-PREY buttons. You can control the movement of the androids using the WANDER? switch (which determines whether they move at all) and the ANDROID-DELAY slider (which determines how many seconds elapse between android movements).

The total number of PREDATORS and PREY, including both students and androids are displayed in the corresponding monitors. You can control the amount of energy each animal gains from consuming food by using the PREDATOR-GAIN-FROM-FOOD and the PREY-GAIN-FROM-FOOD sliders. PLANT-REGROWTH-RATE brown areas regrow grass at every tick in the model. Thus modifying this slider controls the amount of grass that is available for the sheep to consume.

If you wish to change all the students to either predators or prey press the MAKE-STUDENTS-PREDATORS or MAKE-STUDENTS-PREY buttons. These buttons do not affect androids.

To start the game over press the SETUP button, this will return all students to initial energy levels and place them at a new random position. It will kill all the androids and clear the plots.

AVERAGE ENERGY plots the average energy of all predators in red, and all prey in green, this includes androids. POPULATION plots the total of each type of animal.

Client Information
After logging in, the client interface will appear for the students, and if GO is pressed in NetLogo they will be assigned a role as predator or prey at random. Their character will consist of an animal indicator, a wolf if they are a predator or a sheep if they are prey, and an icon. The icon is their unique identifier so it's easy to distinguish themselves from other animals. A description of the icon will appear in the YOU ARE A: monitor. If the student does not like the shape and/or color of their icon they can hit the CHANGE APPEARANCE button at any time to change to another random icon.

The student controls the movement of their turtle with the UP, DOWN, LEFT, and RIGHT buttons (they can also use the hot-keys as short cuts) and the STEP-SIZE slider. Clicking any of the directional buttons (or using the hot-keys) will cause their turtle to move in the respective direction a distance of STEP-SIZE.

ENERGY for the appropriate animal is displayed in the monitor of same name. If the energy is zero or less, then the agent dies. The ROLE monitor will display "dead", the animal indicator shape will appear as a sad face, and the STATUS monitor will indicate that the student should recreate as a predator or prey. After s/he selects one s/he cannot switch roles until the animal dies again.

THINGS TO NOTICE

Predators may find it better to stay together. Prey, however, may learn to stay more scattered, so as to not become easy prey to a large group of predators.

At first students may find it advantageous to be predators but if many students become predators, the balance will shift and it may be more advantageous to "recreate" as a prey.

THINGS TO TRY

Try changing the amount of energy gained from food for both predators and prey, at what point does it cease to be advantageous to be a predator?

Try to balance out the system so that no predators or prey go hungry.

Change the PLANT-REGROWTH-RATE slider. How does this affect the balance between the predators and prey?

EXTENDING THE MODEL

Try making the androids move toward food rather than moving randomly.

There is no cost for changing the step-size for a student agent. Is there a way a larger step-size could "cost" the agent something?

NETLOGO FEATURES

Because so much information must be conveyed through the appearance of each turtle, each player is actually made up of two turtles; one turtle's shape is either a wolf or a sheep to indicate whether it is a predator or prey. Behind the first turtle is an icon turtle that helps students distinguish themselves from other players (and androids). Thus though each student is viewed as one agent, they are actually made up of two turtles.

RELATED MODELS

The various Wolf-Sheep models are non-HubNet versions of a similar model. Also see the Bug Hunter model and the Guppy model for other HubNet models that explore population dynamics.

CREDITS AND REFERENCES

To refer to this model in academic publications, please use: Wilensky, U. (2002). NetLogo HubNet Predator Prey Game model. http://ccl.northwestern.edu/netlogo/models/HubNetPredatorPreyGame. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use: Copyright 2002 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/HubNetPredatorPreyGame for terms of use.

(back to the NetLogo Models Library)