NetLogo User Community Models
by Van Parunak (Submitted: 04/29/2013)
## WHAT IS IT?
NetLogo encourages the development of entity-based or agent-based models. Many of the systems for which NetLogo models are popular have also been modeled with alternative methods, such as systems of differential equations. The differences between these broad classes of techniques are non-trivial and of great importance to practicing modelers (Parunak et al. 1998).
This model illustrates one such difference, identified by Shnerb et al. 2000. They present a simple scenario consisting of two interacting populations.
* Immortals are never born and never die. They move by diffusion (modeled in NetLogo by invoking DOWNHILL on their concentration) at a velocity specified by IMMORTALS-DIFFUSION.
* Mortals die, are born, and move. Their movement is by diffusion (driven by the concentration of other mortals). The probability that a mortal will die at a given time step is MORTALS-DEATH-RATE (expressed as 100 * the probability). Birth requires the presence of an immortal on the same patch. The probability that a mortal occupying a patch with an immortal will reproduce is given by MORTALS-BIRTH-RATE.
The differential equations capturing this behavior are quite simple. Their solution predicts that the long-term population of mortals will grow without limit if MORTALS-BIRTH-RATE * the density of the immortal population is greater than MORTALS-DEATH-RATE, and go to zero if the product is less than the death rate.
Shnerb et al. observe that this prediction is sometimes violated by an agent-based model of the same scenario. The reason is that the distribution of agents is not homogeneous. New mortals are not randomly distributed over the territory, but are born in the vicinity of their "father" immortals, and thus have a higher chance to encounter an immortal (namely, their father) than the mean field approximation would suggest. I built this model to see how robust this effect is and gain experience with its dynamics.
## HOW TO USE IT
1. Adjust the slider parameters (see below), or use the default settings.
Parameters (all probabilities are expressed as whole-number percentages, and compared with random-int-or-float 100 to make decisions)
## THINGS TO NOTICE
The default settings give a balance of -14, predicting extinction, but in many runs the population of mortals explodes.
In other runs for the same balance, the population collapses. You may need to press SETUP several times before finding an initial distribution of agents that permits the explosion of mortals.
Explosion is not necessarily monotonic. The population of mortals can grow very large (10,000 or more, in which case the model slows down significantly!), and yet subsequently collapse.
## THINGS TO TRY
Try adjusting the parameters under various settings. How sensitive is the stability of the model to the particular parameters?
You might count the proportion of setups that permit the population of mortals to grow to a certain threshold, as a function of the balance. What is the shape of this curve?
How does diffusion speed affect the likelihood of a boom in mortals?
## EXTENDING THE MODEL
What happens if we introduce a gestation period, by requiring a certain number of time steps to pass between a meeting between a mortal and an immortal, and the birth of the new mortal?
What if new mortals are not born in the vicinity of their parents, but rather are assigned to a random location in the terrain?
What happens if we make the immortals mortal?
## NETLOGO FEATURES
Note the use of breeds to model two different kinds of "turtles": mortals and immortals.
DOWNHILL is a very easy way to model diffusion. (It would be nice to have a version of this primitive that makes the movement decision, not deterministically, but stochastically, selecting direction based on a roulette wheel whose segments are sized according to some function of the density to which DOWNHILL is responding.)
## RELATED MODELS
This model was constructed by beginning with the Wolf-Sheep predation model in the NetLogo distribution (Wilensky 1998), and retains much of its structure for dealing with interacting populations. (The logic is, of course, quite different.)
## CREDITS AND REFERENCES
H. V. D. Parunak, R. Savit, and R. L. Riolo. Agent-Based Modeling vs. Equation-Based Modeling: A Case Study and Users' Guide. In Proceedings of Multi-agent systems and Agent-based Simulation (MABS'98), 10-25, Springer, 1998.
N. M. Shnerb, Y. Louzoun, E. Bettelheim, and S. Solomon. The importance of being discrete: Life always wins on the surface. Proc. Natl. Acad. Sci. USA, 97(19 (September 12)):10322-10324, 2000.
U. Wilensky. NetLogo Wolf Sheep Predation model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL, 1998.
To refer to this model in academic publications, please use:
(back to the NetLogo User Community Models)