WM-Classroom

WM-Classroom preview image

2 collaborators

Default-person Alberto Caccin (Author)
Alice Stocco (Editor)

Tags

(This model has yet to be categorized with any tags)
Model group Wildlife Management | Visible to everyone | Changeable by group members (Wildlife Management)
Model was written in NetLogo 7.0.2 • Viewed 21 times • Downloaded 0 times • Run 0 times
Download the 'WM-Classroom' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


@ authors: Caccin Alberto & Stocco Alice

WM-Classroom v.1.0

A Didactic Multi-Species Agent-Based Model to Explore Predator–Prey–Harvest Dynamics

WHAT IS WM-classroom v.1.0?

WM-classroom v.1.0 is a didactic, tri-trophic agent-based model for teaching population dynamics and basic wildlife-management levers in temperate European contexts. It couples four breeds — wolves, red deer, wild boar, and hunters — on a homogeneous 50×50 landscape with weekly time steps. Rules are intentionally simple and explicit so learners can link assumptions to outcomes.

Note: this version is not site-specific or predictive. It is a functional test-bed for qualitative exploration and classroom exercises.

PURPOSE

Show how simple harvest rules and effort translate into population trajectories.

Provide a scaffold for classroom scenario design, parameter sweeps, and interpretation.

Serve as a starting point for incremental extensions (habitat, demography, behavior).

ENTITIES, STATE VARIABLES, AND SCALES

Breeds (agents):

  • deer
  • boar
  • wolves
  • men (hunters)

Patches:

  • binary green/brown forage; regrowth via per-patch countdown (grass-regrowth-time)

Time scale:

  • 1 tick = 1 week; 52 ticks = 1 year

Core state variables:

  • wildlife (deer, boar, wolves): energy, age
  • hunters: satisfaction (simplified, didactic)

PROCESS OVERVIEW AND SCHEDULING

Each tick executes, in order:

  1. movement (random walk; world topology as set in the Interface)
  2. feeding/predation (herbivores eat green patches; wolves remove one prey on co-location)
  3. hunting (active only if the season is open; see hunting controls)
  4. reproduction (probabilistic, species-specific)
  5. aging and energy update
  6. mortality (starvation if energy = 0, or if age exceeds the species maximum)

Didactic simplifications in v1.0:

  • no age/sex structure; no seasonal reproduction; homogeneous space
  • one removal per encounter; no search/shot success; no handling times
  • deterministic diet tie-break: if deer and boar co-occur with a wolf, the wolf removes boar

HOW TO USE IT (INTERFACE)

  1. Set initial conditions and management levers (see Key interface parameters).
  2. Press SETUP, then GO.
  3. Use BehaviorSpace experiments for multi-run scenarios (see Suggested classroom experiments).

KEY INTERFACE PARAMETERS (v1.0)

Initial populations:

  • initial-number-deer

  • initial-number-boar

  • initial-number-wolves

  • initial-number-hunters

Energetics and reproduction:

  • deer-gain-from-food (reference 6)

  • boar-gain-from-food (reference 6)

  • wolves-gain-from-food (calibrated reference 18)

  • deer-reproduce, boar-reproduce, wolves-reproduce (per-tick probabilities)

Forage:

  • grass-regrowth-time (weeks required for a patch to regrow green after being eaten)

Hunting controls (management levers):

  • shoot-deer, shoot-boar, shoot-wolf (species on/off)

  • deer-cut-off, boar-cut-off, wolves-cut-off (minimum abundance required to allow removals)

  • hunting-season (season length in weeks; hunting active only inside this window)

  • initial-number-hunters (effort proxy; removals occur on co-location with allowed species above the cut-off)

  • wolf-poaching-rate (per-tick probability to remove a wolf when wolves are not legally allowed)

Model simplifications (summary):

  • random-walk movement; homogeneous space; one removal per encounter; no search/shot success

  • deterministic prey-choice tie-break (boar over deer on co-location)

  • no bag limits, tags, species-specific seasons, compliance/reporting, or travel/search costs

OUTPUTS

  • per-tick time series of deer, boar, wolves (and hunters)
  • end-of-run summaries
  • BehaviorSpace CSV exports for multi-run analyses

SUGGESTED CLASSROOM EXPERIMENTS (BehaviorSpace)

  • Baseline: no hunting (all shoot-* off; poaching off)
  • Deer-only vs Boar-only hunting: vary species cut-off grid
  • Effort gradient: vary initial-number-hunters
  • Season length gradient: vary hunting-season
  • Predator control: shoot-wolf on; vary wolves-cut-off (season-bound)
  • Poaching: prey harvest on; vary wolf-poaching-rate

RELATED MODELS

Wilensky (2005) NetLogo “Wolf Sheep Predation (Docked Hybrid)” — inspirational teaching baseline

CREDITS AND REFERENCES (SELECTED)

ABM pedagogy and ecology:

  • Bousquet, F., & Le Page, C. (2004). Multi-agent simulations and ecosystem management: A review. Ecological Modelling, 176(3–4), 313–332.

  • McLane, A. J., Semeniuk, C., McDermid, G. J., & Marceau, D. J. (2011). The role of agent-based models in wildlife ecology and management. Ecological Modelling, 222(8), 1544–1556.

  • Railsback, S. F., & Grimm, V. (2019). Agent-Based and Individual-Based Modeling: A Practical Introduction (2nd ed.). Princeton University Press.

Predator-prey dynamics:

  • Lotka, A. J. (1926). Elements of Physical Biology. Williams & Wilkins, Baltimore.

  • Volterra, V. (1927). Variazioni e fluttuazioni del numero d’individui in specie animali conviventi. Società Anonima Tipografica “Leonardo da Vinci”, Roma.

Foundational ecology:

  • Elton, C. S. (1927). Animal Ecology. Macmillan, London.

  • Odum, E. P., & Barrett, G. W. (2004). Fundamentals of Ecology (5th ed.). Brooks/Cole. (Earlier ed.: Odum, 1959, W. B. Saunders.)

Wolf–prey (Europe):

  • Meriggi, A., & Lovari, S. (1996). A review of wolf predation in southern Europe: Does the wolf prefer wild prey to livestock? Journal of Applied Ecology, 33(6), 1561–1571.

  • Capitani, C., Bertelli, I., & Varuzza, P. (2004). A comparative analysis of wolf (Canis WM-classroom) diet in three different Italian ecosystems. Mammalian Biology, 69, 1–10. (journal/year as listed in thesis refs).

  • Mattioli, L., Capitani, C., Gazzola, A., Scandura, M., & Apollonio, M. (2011). Prey selection and dietary response by wolves in a high-density multi-species ungulate community. European Journal of Wildlife Research, 57, 909–922.

NetLogo platform:

  • Tisue, S., & Wilensky, U. (2004). NetLogo: Design and implementation of a multi-agent modeling environment. Proceedings of Agent 2004 Conference on Social Dynamics: Interaction, Reflexivity and Emergence, University of Chicago.

  • Wilensky, U. (1999). NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

HOW TO CITE

Model:

  • Caccin, A., and Stocco, A. (2025). WM-classroom v.1.0: Large-Ungulate–Predator–User System (NetLogo). Modeling Commons.

NetLogo:

  • Wilensky, U. (1999). NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University.

  • Wilensky, U. (2005). Wolf Sheep Predation (Docked Hybrid). Center for Connected Learning and Computer-Based Modeling, Northwestern University.

COPYRIGHT AND LICENSE

© 2025 GreenSea Soc. Coop. Licensed under CC BY 4.0 (Attribution). You may share and adapt with attribution. For info: info@greenseainstitute.com

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;; breeds: boars, deer, wolves, men.
breed [deer a-deer] ;;
breed [boar a-boar] ;;
breed [wolves wolf] ;;
breed [men a-man] ;; men are meant to be hunters
turtles-own [energy age]  ;; all breeds have energy and age
men-own [motivation]
patches-own [countdown];;
globals [week-of-year];

to setup
  clear-all
  set week-of-year 1

  ask patches [
      set pcolor one-of [ green brown ]
      ifelse pcolor = green
        [ set countdown grass-regrowth-time ]
      [ set countdown random grass-regrowth-time ] ; initialize grass regrowth clocks randomly for brown patches
    ]

  set-default-shape deer "deer"
  create-deer initial-number-deer [ ;; create the deer
    ;; then initialize their variables
    set color orange
    set size 1.5
    ;;set label-color blue
    ;;set energy 1 + random deer-max-initial-energy  ;; se pascolano:
    set energy random (2 * deer-gain-from-food)
    set age random 521 ;; initial age can be up to 10 years
    setxy random-xcor random-ycor
  ]

  set-default-shape wolves "wolf 7"
  create-wolves initial-number-wolves [ ;; create the wolves
    ;; then initialize their variables
    set color black
    set size 1
    set energy random (2 * wolf-gain-from-food)
    set age random 270 ;; initial age can be up to 5 years
    setxy random-xcor random-ycor
  ]

  set-default-shape boar "boar"
  create-boar initial-number-boar [ ;; create the boar
    ;; then initialize their variables
    set color blue
    set size 1.5
    ;;set label-color black
    ;;set energy 1 + random boar-max-initial-energy  ;; se pascolano:
    set energy random (2 * boar-gain-from-food)
    set age random 521 ;; initial age can be up to 10 years
    setxy random-xcor random-ycor
  ]

   set-default-shape men "person"
  create-men initial-number-hunters [ ;; create the (regular) hunters
    ;; then initialize their variables
    set color yellow
    set size 2
    ;;set label-color black
    set energy  1000
    set motivation 10
    setxy random-xcor random-ycor
  ]

  reset-ticks
end 

to go
  if not any? turtles [ stop ]
  ask deer [
    move
    set energy energy - 1  ;; deer lose energy as they move
    eat-grass-deer
    advance-age
    reproduce-deer
    death
  ]

  ask boar [
    move
    set energy energy - 1  ;; boars lose energy as they move
    eat-grass-boar
    advance-age
    reproduce-boar
    death
  ]

  ask wolves [
    move
    set energy energy - 1  ;; wolves lose energy as they move
;    catch-deer
;    catch-boar
    catch-prey
    advance-age
    reproduce-wolves
    death
  ]

  ask men [
    move
    ;;set energy energy - 1  ;; hunters lose energy as they move
    set motivation motivation - 1  ;; hunters want to hunt as time passes
    if shoot-deer = TRUE [ ;; if deer hunting is allowed then
      if count deer > deer-cut-off [hunt-deer]] ;; if there are enough deer then hunt deer
    if shoot-boar = TRUE [ ;; if boar hunting is allowed then
      if count boar > boar-cut-off [hunt-boar]] ;; if there are enough boar then hunt boar
    if shoot-wolf = TRUE [ ;; if wolf control is allowed then
      if count wolves > wolves-cut-off [poach]] ;; if there are too many wolves then kill some
    stay-home ;; if you feel you've hunted enough, take a break
  ]

  ask patches [
    grow-grass
  ]

ifelse week-of-year = 52               ;; check if year is over
  [set week-of-year 1]                 ;; then restart count of weeks
  [set week-of-year week-of-year + 1]  ;; otherwise advance 1 week

tick
end 

to grow-grass  ; patch procedure
  ; countdown on brown patches: if you reach 0, grow some grass
  if pcolor = brown [
    ifelse countdown <= 0
      [ set pcolor green
        set countdown grass-regrowth-time ]
      [ set countdown countdown - 1 ]
  ]
end 

to move  ;; turtle procedure
  rt random 50
  lt random 50
  fd 1
end 

to advance-age ;; turtle procedure
  set age age + 1
end 

to eat-grass-deer
  if pcolor = green [
    set pcolor brown
    set energy energy + deer-gain-from-food
  ]
end 

to eat-grass-boar
  if pcolor = green [
    set pcolor brown
    set energy energy + boar-gain-from-food
  ]
end 

to reproduce-deer  ;; deer procedure
  if age > 52 [
    if energy > 2 * deer-gain-from-food [
    if random-float 100 < deer-reproduce [  ;; throw "dice" to see if you will reproduce
    set energy (energy / 2)                ;; divide energy between parent and offspring
    hatch 1 [ set age 0
      rt random-float 360 fd 1 ]   ;; hatch an offspring and move it forward 1 step
  ]]]
end 

to reproduce-boar  ;; boar procedure
  if age > 52 [
    if energy > 2 * boar-gain-from-food [
    if random-float 100 < boar-reproduce [  ;; throw "dice" to see if you will reproduce
    set energy (energy / 2)                ;; divide energy between parent and offspring
    hatch 1 [ set age 0
      rt random-float 360 fd 1 ]   ;; hatch an offspring and move it forward 1 step
  ]]]
end 

to reproduce-wolves  ;; wolf procedure
  if age > 52 [
    if energy > 2 * wolf-gain-from-food [
    if random-float 100 < wolf-reproduce [  ;; throw "dice" to see if you will reproduce
    set energy (energy / 2)               ;; divide energy between parent and offspring
    hatch 1 [ set age 0
      rt random-float 360 fd 1 ]  ;; hatch an offspring and move it forward 1 step
  ]]]
end 

to catch-prey  ;; wolves procedure
    ifelse (any? boar-here and not any? deer-here)
        [let prey one-of boar-here                    ;; grab a random boar
          if prey != nobody                             ;; did we get one?  if so,
        [ ask prey [ die ]                          ;; kill it
          set energy energy + wolf-gain-from-food ] ;; get energy from eating
         ]
      [ifelse (any? deer-here and not any? boar-here)
        [let prey one-of deer-here                    ;; grab a random deer
         if prey != nobody                             ;; did we get one?  if so,
        [ ask prey [ die ]                          ;; kill it
         set energy energy + wolf-gain-from-food ] ;; get energy from eating
         ]
      [if (any? deer-here and any? boar-here)
          [let prey one-of boar-here                    ;; If both boar and deer available, boar is the preferre target
           if prey != nobody                             ;; did we get one?  if so,
             [ ask prey [ die ]                          ;; kill it
               set energy energy + wolf-gain-from-food ] ;; get energy from eating
             ]
  ]]
end 

to death  ;; turtle procedure
  ;; when energy dips below zero, die
  if energy < 0 [ die ]
  ifelse breed = wolves                          ;; when age grows above a maximum, die
    [if age > 521 [ die ]]                       ;; wolves die younger than herbivores
     [if age > 1042 [ die ]]
end 

to hunt-deer
  if week-of-year >= 52 - hunting-season [          ;; check if hunting is open
  if count deer > deer-cut-off [
      let prey one-of deer-here                     ;; grab a random prey > one-of preylist ???
      if prey != nobody                             ;; did we get one?  if so,
      [ ask prey [ die ]                          ;; kill it
        set motivation motivation + 1 ]]] ;; get appagated
end 

to hunt-boar
  if week-of-year >= 52 - hunting-season [          ;; check if hunting is open
  if count boar > boar-cut-off [
      let prey one-of boar-here                     ;; grab a random prey > one-of preylist ???
      if prey != nobody                             ;; did we get one?  if so,
      [ ask prey [ die ]                            ;; kill it
        set motivation motivation + 1 ]]]           ;; get appagated
end 

to poach
  ifelse count wolves > wolves-cut-off ;; implement counter in the interface ;;
[let prey one-of wolves-here                         ;; grab
  if prey != nobody                                  ;;
    [ask prey [ die ]]]
    [let prey one-of wolves-here                     ;; grab
     if prey != nobody [                             ;;
     if random-float 100 < wolf-poaching-rate [      ;; throw "dice" to see if hunter is willing to poach
        ask prey [ die ]]]]
end 

to stay-home
  if motivation > 20
  [hide-turtle
  wait 0.2
  show-turtle]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Alberto Caccin 7 days ago Info section updated Download this version
Alberto Caccin 2 months ago Initial upload Download this version

Attached files

File Type Description Last updated
README_DATA.md background Experiment .csv description 2 days ago, by Alberto Caccin Download
WM-Classroom.png preview Preview for 'WM-Classroom' 2 months ago, by Alberto Caccin Download
WM-Classroom_experiments.zip data BehaviorSpace Experiment exports 2 days ago, by Alberto Caccin Download

This model does not have any ancestors.

This model does not have any descendants.