Prey Choice Model - Optimal Foraging Theory

Prey Choice Model - Optimal Foraging Theory preview image

1 collaborator

Default-person Peter Yaworsky (Author)

Tags

anthropology 

Tagged by Peter Yaworsky 6 months ago

archaeology 

Tagged by Peter Yaworsky 6 months ago

behavioral decision making 

Tagged by Peter Yaworsky 6 months ago

hunter gatherers 

Tagged by Peter Yaworsky 6 months ago

optimal foraging theory 

Tagged by Peter Yaworsky 6 months ago

prey choice model: 

Tagged by Peter Yaworsky 6 months ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.0 • Viewed 242 times • Downloaded 20 times • Run 0 times
Download the 'Prey Choice Model - Optimal Foraging Theory' modelDownload this modelEmbed this model

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


OVERVIEW

This is an agent-based simulation of the classic "diet breadth model" of optimal foraging theory (see Foley 1985).

SIMULATION OPERATION

SETUP: Initialize the number of foragers and total number of prey.

FORAGERS: One or more foragers ( selected by the user) are placed randomly and given 100 energy units (eu's) to start with. Each forager begins to move in random directions; each cell moved costs the forager 1 energy unit.

PREY: Prey (total determined by , selected by the user) are placed randomly and move randomly. Up to 4 distinct prey species can be defined. The user selects the relative density of the species, its food value (when consumed by a forager), and the costs to process the species before it can be eaten. Prey are ranked according to their net food value = gross food value - processing costs.

FORAGING: When a forager encounters prey, she/he decides whether to take it or continue searching for prey. If she/he is not very hungry (energy >= 85), she/he will only take the 1st ranked prey; if she/he is hungrier (energy 70-85), she/he will take 1st or 2nd order prey; if she/he is even hungrier (energy 55-70, she/he will take prey ranked 1st through 3rd; if she/he is very hungry (energy < 55), she/he will take any prey. On taking any prey, the forager received the net food value. A patch turns red briefly to mark when a prey is taken.

MONITORING DIET BREADTH: The species of any prey taken is added to the beginning of a running list of the 10 most recent prey taken; if the length of the list is over 10, the last prey on the list is removed. The number of different prey species in the list is monitored as diet breadth.

HOW TO USE IT

Set the options (see above). Press "setup". Then press "run".

THINGS TO TRY

Try changing the density of the 1st ranked species or of other species. What happens to diet diversity? Try changing the food values in each cell or the distance moved by each forger each cycle. The classic diet breadth model considers only one forager. What happens if more than one forager are placed in the simulation?

EXTENDING THE MODEL

Other OFT models could be simulated in this way.

CREDITS AND REFERENCES

C. Michael Barton, Arizona State University

For an overview of OFT models, see Foley, R. (1985). Optimality theory in anthropology. Man, 20, 222-242.

Comments and Questions

What is this Model?

Original Source: The model provided here is an ABM of the Prey Choice Model as derived by Charnov (1976) and outlined in Stephens & Krebs (1986). Outline: Each forager's goal is to maximize their overall running mean return rate as they search the world for prey species. Each prey species has a different a. profitability, b. handling cost (time), and c. density on the landscape. The decision variable of the forager is, once they encounter a prey item, do they a. handle and consume that prey item gaining its energy but also paying in time the costs of handling, or b. pass on the prey item and continue searching for an item that is more profitable. If the post encounter return rate (energy/handling time) is greater than the mean running return rate of the forager, the forager should take the prey species. If the post encounter return rate is lower, the forager should continue searching for more profitable prey items. Insight: The model illustrates how the decision to handle a prey item is dependent on the abundance/encounter rate of the highest ranked prey items and that the abundance of lower prey ranked items does not matter. The model illustrates how long term return rate maximization can result in either narrow diets when the highest ranked resource is readily abundant or broadens when the highest ranked prey items are less abundant. It shows that a foraging organism sensitive to changes in long term return rates can readily adapt their diet. Illustrates the influence of population density increases on diet (more foragers) and how greater competition and resource depletion can result in a broadening of the diet. Works Cited: Charnov, Eric L. “Optimal Foraging: Attack Strategy of a Mantid.” The American Naturalist 110, no. 971 (1976): 141–51. Stephens, David W., and John R. Krebs. Foraging Theory. New Jersey: Princeton University Press, 1986.

Posted 6 months ago

Click to Run Model

; Prey Choice Model from Optimal Foraging Theory
; see Charnov, Eric L. “Optimal Foraging: Attack Strategy of a Mantid.” The American Naturalist 110, no. 971 (1976): 141–51.
; see Stephens, David W., and John R. Krebs. Foraging Theory. New Jersey: Princeton University Press, 1986.
; by Peter M. Yaworsky, PhD, Aarhus University/Copenhagen University. Adapted from code original written by Michael Barton (ASU).
;V1 submitted 18/2/2025

breed [foragers forager]
breed [animals animal]

foragers-own [time rr energy diet-breadth]
animals-own [species food-value processing-costs rank]
patches-own [ptimer]
globals [rank-list prey-list diversity _recording-save-file-name]

to Setup
  ;; (for this model to work with NetLogo's new plotting features,
  ;; __clear-all-and-reset-ticks should be replaced with clear-all at
  ;; the beginning of your setup procedure and reset-ticks at the end
  ;; of the procedure.)
  __clear-all-and-reset-ticks
  Setup_Animals
  Setup_Foragers
  Setup_Patches
end 

to Go
  ask foragers [
    Move
    set time ticks + 1
    set rr (energy / time)
    Forage
    Calculate-Diversity
    ]

  ask animals [
    Move
    ;;Reproduce
    ]

  ask patches [Patch_Color]

  Do_Plots
  tick
  if not any? foragers [stop]
end 

to Setup_Foragers
  create-foragers init-foragers
    [
    set shape "person"
    set size 2.5
    set color yellow
    set energy 0
    set prey-list [] ; rolling list of prey species taken
    ]
  ask foragers [setxy random-xcor random-ycor] ; place the foragers randomly in the world
end 

to Setup_Animals
  ; Create 4 animal species with different processing costs, food values, birth rates, and initial population densities

  let total-density (density1 + density2 + density3 + density4)
  let number1 round (init-prey * density1 / total-density)
  let number2 round (init-prey * density2 / total-density)
  let number3 round (init-prey * density3 / total-density)
  let number4 round (init-prey * density4 / total-density)

  set rank-list (list (food-value1 - processing-cost1) (food-value2 - processing-cost2)
    (food-value3 - processing-cost3) (food-value4 - processing-cost4))

  set rank-list sort-by [ [?1 ?2] -> ?1 > ?2 ] rank-list

  create-animals number1 [
    set species 1
    set shape "cow"
    set size 2
    set color brown
    set food-value food-value1
    set processing-costs processing-cost1
    set rank position (food-value1 - processing-cost1) rank-list + 1
    ]

  create-animals number2 [
    set species 2
    set shape "rabbit"
    set size 1.5
    set color grey
    set food-value food-value2
    set processing-costs processing-cost2
    set rank position (food-value2 - processing-cost2) rank-list + 1
    ]

  create-animals number3 [
    set species 3
    set shape "fish"
    set size 1.5
    set color blue
    set food-value food-value3
    set processing-costs processing-cost3
    set rank position (food-value3 - processing-cost3) rank-list + 1
    ]

  create-animals number4 [
    set species 4
    set shape "turtle"
    set size 1.5
    set color lime
    set food-value food-value4
    set processing-costs processing-cost4
    set rank position (food-value4 - processing-cost4) rank-list + 1
    ]

  ask animals [setxy random-xcor random-ycor] ; place the animals randomly in the world
end 

to Setup_Patches
  ask patches [set ptimer 20]
end 

to Move
  rt random 45
  lt random 45
  fd 1
end 

to Forage
  let prey one-of animals-here                  ;; seek a random animal
  if prey != nobody  [                          ;; did we get one?  If so,
    if (rr <= [food-value / processing-costs] of prey)
         [ ask patch-here [set pcolor red]
          ask patch-here [set ptimer 01]
          set energy energy + [food-value] of prey  ;; get energy from eating animal
          set time time + [processing-costs] of prey
          set prey-list fput ([species] of prey) prey-list ; add prey-species to running list of prey taken
        ]
      ]
  while [length prey-list > 100] [set prey-list remove-item 100 prey-list] ; manage running list of prey taken
end 

to Patch_Color
  ifelse ptimer < 20
    [set ptimer ptimer + 1]
    [if pcolor != black [set pcolor black]]
end 

to Calculate-Diversity
  set diversity 0
  if member? 1 prey-list [set diversity diversity + 1]
  if member? 2 prey-list [set diversity diversity + 1]
  if member? 3 prey-list [set diversity diversity + 1]
  if member? 4 prey-list [set diversity diversity + 1]
end 

to Do_Plots
  set-current-plot "Prey Taken"
  set-current-plot-pen "species 1"
  plot length (filter [ ?1 -> ?1 = 1 ] prey-list)
  set-current-plot-pen "species 2"
  plot length (filter [ ?1 -> ?1 = 2 ] prey-list)
  set-current-plot-pen "species 3"
  plot length (filter [ ?1 -> ?1 = 3 ] prey-list)
  set-current-plot-pen "species 4"
  plot length (filter [ ?1 -> ?1 = 4 ] prey-list)
  set-current-plot "Forager Energy"
  set-current-plot-pen "fenergy"
  plot (mean [rr] of foragers)
end 

to Check-Death
  ask foragers [if energy <= 0 [die]]
end 

There is only one version of this model, created 6 months ago by Peter Yaworsky.

Attached files

File Type Description Last updated
Prey Choice Model - Optimal Foraging Theory.png preview Preview for 'Prey Choice Model - Optimal Foraging Theory' 6 months ago, by Peter Yaworsky Download

This model does not have any ancestors.

This model does not have any descendants.