Evolution of resource use through behavior imitation

Evolution of resource use through behavior imitation preview image

1 collaborator

Default-person Susan Hanisch (Author)

Tags

cultural evolution  

Tagged by Susan Hanisch almost 2 years ago

evolution 

Tagged by Susan Hanisch almost 2 years ago

imitation 

Tagged by Susan Hanisch almost 2 years ago

sustainability 

Tagged by Susan Hanisch almost 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.0 • Viewed 181 times • Downloaded 8 times • Run 0 times
Download the 'Evolution of resource use through behavior imitation' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

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

Click to Run Model

turtles-own [
  harvest-type
  harvest-amount
  harvest
  energy
  age
]

patches-own [resource]

globals [
  carryingcap
  growthrate
 ]

;;;;;;;;;;;;;;;;;;;;;;
;;;Setup Procedures;;;
;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all

  set carryingcap 100
  set growthrate 0.3

  setup-patches
  setup-turtles

  reset-ticks
end 

to setup-patches

 ask patches [
    set resource ( 75 + random (carryingcap / 4))
    set pcolor scale-color brown resource  0 (carryingcap + 30)
  ]
end 

to setup-turtles
  ask n-of Initial-number-agents patches
    [sprout 1
      [set energy Living-costs + 1
        set shape "person" set size 1
        set age 30 + random 20]]

  ask n-of Sustainables turtles [ set harvest-type "sustainable"]
   ask turtles [
    ifelse harvest-type = "sustainable"
      [set color green ]
      [set harvest-type "greedy"
       set color red]
  ]
end 


;;;;;;;;;;;;;;;;;;;;;;;;
;;;Runtime Procedures;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to go
  if count turtles = 0 [stop]

  ask turtles [
    ifelse harvest-type = "sustainable"
      [set harvest-amount Harvest-sustainables ]
      [set harvest-amount Harvest-greedy ]]

  move
  harvest-patch

  livingcosts

  if imitation-bias = "most successful"    [imitate-successful]
  if imitation-bias = "majority" [imitate-majority]
  if imitation-bias = "minority" [imitate-minority]
  if imitation-bias = "most experienced" [imitate-elder]

  ask turtles [try-new]

  if Reproduction [reproduce]
  death

  ask patches [
    regrow
    recolor]

  ask turtles [ get-older ]

  tick
end 

to move ;;turtle procedure

 ask turtles [
   if random-float 100 < chance-agents-move
    [let nextpatch max-one-of (patches in-radius 2 with [not any? turtles-here] ) [resource]
    if nextpatch != nobody
      [ move-to nextpatch]
    ]
  ]
end 

to harvest-patch
  ask turtles [
   ifelse [resource] of patch-here > harvest-amount
   [set harvest harvest-amount
    ask patch-here [ set resource resource - [harvest-amount] of myself]]
   [set harvest [resource] of patch-here
    ask patch-here [set resource 0]
    ]
    set energy energy + harvest
  ]
end 

to livingcosts
  ask turtles [set energy energy - Living-costs]
end 

to imitate-successful

 ask turtles [
  let neighbor-turtles turtles-on neighbors
  if any? neighbor-turtles
    [if random-float 100 < imitation-likelihood [
    set harvest-type [harvest-type] of max-one-of neighbor-turtles [energy]]]
    update-color]
end 

to imitate-majority
 ask turtles [
  let neighbor-turtles turtles-on neighbors
  if any? neighbor-turtles
    [if random-float 100 < imitation-likelihood [
        ifelse count (neighbor-turtles with [harvest-type = "sustainable"])  > count (neighbor-turtles with [harvest-type = "greedy"])
      [ set harvest-type "sustainable"]
      [ set harvest-type "greedy"]]]
    update-color]
end 

to imitate-minority
  ask turtles [
  let neighbor-turtles turtles-on neighbors
  if any? neighbor-turtles
    [if random-float 100 < imitation-likelihood [
      if ((count (neighbor-turtles with [harvest-type = "greedy"]) != 0) and (count (neighbor-turtles with [harvest-type = "sustainable"]) != 0))
      [ifelse count (neighbor-turtles with [harvest-type = "sustainable"])  > count (neighbor-turtles with [harvest-type = "greedy"])
          [ set harvest-type "greedy"]
          [ set harvest-type "sustainable"]]]
    update-color]
]
end 

to imitate-elder
  ask turtles [
  let neighbor-turtles turtles-on neighbors
  if any? neighbor-turtles
    [if random-float 100 < imitation-likelihood [
    set harvest-type [harvest-type] of max-one-of neighbor-turtles [age]]]
    update-color]
end 

to try-new  ;; turtle procedure
    if random-float 100 < behavior-innovation-rate
    [ifelse harvest-type = "sustainable"
      [set harvest-type "greedy"]
      [set harvest-type "sustainable"]
    ]
   update-color
end 

to reproduce
 ask turtles
  [ let neighborhood  (patch-set neighbors with [not any? turtles-on self ])
      if (any? neighborhood)  and random-float 1 < ( 0.001 * energy );;/ 100)
        [hatch 1 [
         set energy ([energy] of myself / 2)
         set age 0
         move-to one-of neighborhood
        ]
        set energy (energy / 2)
   ]
  ]
end 

to update-color
   ifelse harvest-type = "sustainable"
      [ set color green ]
      [ set color red ]
end 

to death
  ask turtles
  [if energy <= 0 [die]
   if random-float 100 < Death-rate [ die ]
   if age > 80 [die]
  ]
end 

to regrow ;; patch
  ifelse resource > 0
  [set resource precision (resource + ((growthrate * resource) * (1 - (resource / carryingcap )))) 3]
  [ set resource 0.1]
end 

to recolor ;; patch
  set pcolor scale-color brown resource 0 (carryingcap + 30)
end 

to get-older
  set age (age + 0.1)
end 

;;; turtles1 variables

to-report average-energy-greedys
  report sum [energy] of turtles with [harvest-type = "greedy"] / count turtles with [harvest-type = "greedy"]
end 

to-report average-energy-sustainables
  report sum [energy] of turtles with [harvest-type = "sustainable"] / count turtles with [harvest-type = "sustainable"]
end 

There is only one version of this model, created almost 2 years ago by Susan Hanisch.

Attached files

File Type Description Last updated
Evolution of resource use through behavior imitation.png preview Preview for 'Evolution of resource use through behavior imitation' almost 2 years ago, by Susan Hanisch Download

This model does not have any ancestors.

This model does not have any descendants.