Evolution of sustainability through monitoring and punishment GERMAN

Evolution of sustainability through monitoring and punishment GERMAN preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Default-person Susan Hanisch (Author)

Tags

social evolution 

Tagged by Susan Hanisch over 3 years ago

sustainability 

Tagged by Susan Hanisch over 3 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 318 times • Downloaded 12 times • Run 0 times
Download the 'Evolution of sustainability through monitoring and punishment GERMAN' 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 [
  harvestPref
  harvest-amount
  punisher?
  aware-of-who
  energy
  harvest
  punished?
  rs
     ]

patches-own [ resource ]

globals [
  commons
  commonsResources
  harvestTraits

   ]

to setup
  clear-all
   ask n-of Anzahl-Agenten patches [
    sprout 1 [
    set shape "circle"
      set size 0.8
      set punished? false
      set aware-of-who []
      set rs 0
    ifelse random-float 100 < Prozent-Nachhaltige
     [set harvestPref "low"]  ;; determine the harvest preference (high or low)
     [set harvestPref "high"]
    ifelse random-float 100 < Prozent-Bestrafer
     [set punisher? true]  ;; determine the harvest preference (high or low)
     [set punisher? false]
    update-color  ;; change the color of the agent on the basis of the strategy
    set energy Lebenshaltungskosten + 1]
  ]

  ask patches [
    set resource Tragfähigkeit
    set pcolor scale-color brown resource  0 (Tragfähigkeit + 30) ]

  reset-ticks
end 


;;;;;;; Main routine ;;;;;;

to go
  if count turtles = 0 [stop]

  ask turtles
   [ifelse harvestPref = "low"
      [set harvest-amount Erntemenge-nachhaltig]
      [ set harvest-amount Erntemenge-gierig]

    set aware-of-who []
    harvesting
   ]

    sense-cheaters
    punish

   ask turtles
  [ set energy energy + harvest

    expend-energy
    reproduce

    death]

  ask patches [
    regrow
    recolor]
  tick
end 

to harvesting
 ifelse Strafe = "Ernte einmal aussetzen"
  [ifelse punished? = false
    [harvest-commons]
    [set harvest 0]
   ]
  [harvest-commons]
  set punished?  false
end 

to harvest-commons  ;; from Waring et al., 2017

   set harvest 0

      ; define the patches withing the local Moore neighborhood on which the current agent may harvest.
      set Commons (patch-set neighbors patch-here) ;; set list of patches to harvest from to include all neighboring patches

      set commonsResources sum ([resource] of Commons)  ;; sums all of the resources in my commons
      let commonsList sort-on [resource] Commons  ;; sort the list by the amount of resource on the patch
      set commonsList reverse commonsList  ;; reverse the sort list so it is largest to smallest

      ifelse commonsResources < harvest-amount  ;; if the total commons are less than what the agent wants to harvest
      [ set harvest (commonsResources); - ( count myCommons * 0.1 ))
        ask Commons [ set resource 0 ]
        move-away
      ]

      [
        while [harvest < harvest-amount][  ;; while you are still in need
        ;; harvest some resource from the neighborhood
          foreach commonsList [ ?1 ->
            ifelse [resource] of ?1 <= (harvest-amount - harvest)
              [set harvest (harvest + [resource] of ?1 )
               ask ?1 [set resource 0]
              ]

              [ask ?1 [
                set resource (resource - ([harvest-amount] of myself - [harvest] of myself))
              ]
                set harvest harvest-amount
              ]
          ]  ;; end foreach
        ]  ;; end while
     ] ;; end second part of ifelse commonsResources
end 

to move-away
  let next-patch max-one-of (neighbors with [not any? turtles-here]) [resource]
  if next-patch != nobody
    [move-to next-patch
     set energy energy - 1
     ]
end 

to sense-cheaters
  ask turtles with [punisher? = true]
   [ set harvest harvest - Kosten-Wahrnehmung
     let cheaters  (turtles-on neighbors) with [harvestPref = "high"]
     set aware-of-who n-of  ( Erkennungsgrad  / 100 * count cheaters) cheaters
   ]
end 

to punish
  ask turtles with [ harvestPref = "high" and punished? = false]
  [let punishers  (turtles-on neighbors) with [ member? myself [aware-of-who] of self]
    if any? punishers
   [ set punished? true
      if Strafe = "töten"[die]
      if Strafe = "Strafgebühr zahlen"
       [set harvest harvest  - Strafgebühr
        set punished? false
        ask turtles-on neighbors [set harvest harvest  + (Strafgebühr / (count turtles-on neighbors) )]
       ]
       if Strafe = "verbannen"
        [move-to one-of patches with  [not any? turtles-here and distance myself > 10  ]]
      ask punishers [
        set harvest harvest  - ( Kosten-Bestrafung / count punishers)

      ]
     ]
  ]
end 

to expend-energy
  set energy energy - Lebenshaltungskosten
end 

to reproduce
  let birthrate 0.001 * energy
  if random-float 1 < birthrate [
    let destination one-of neighbors with [not any? turtles-here]
    if destination != nobody [
        hatch 1 [
        move-to destination
        set punished? false
        set aware-of-who []
        mutate
        set energy ([energy] of myself / 2)]
       ]
    set energy (energy / 2)
          ]
end 

;; modify the children of agents according to the mutation rate

to mutate  ;; turtle procedure
    if random-float 100 < Mutationsrate
    [
    ifelse harvestPref = "high"
    [set harvestPref "low"]
    [set harvestPref "high"]
    ]
    if random-float 100 < Mutationsrate
    [ ifelse punisher? = true
    [set punisher?  false]
    [set punisher?  true ]
    ]
   update-color
end 

to update-color
   ifelse harvestPref = "low"
      [ ifelse punisher? = true
        [set color green ]
        [set color turquoise]
      ]
      [ ifelse punisher? = true
          [set color orange ]
          [set color red]
      ]
end 

to death
    if energy <= 0 [ die ]
    if random-float 100 < Sterberate [ die ]
end 

to regrow
  ifelse resource > 0
  [set resource ceiling (resource + ((Wachstumsrate * resource) * (1 - (resource / Tragfähigkeit )))) ]
  [set resource 0.1 ]
end 

to recolor
  set pcolor scale-color brown resource  0 (Tragfähigkeit + 30)
end 

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

Attached files

File Type Description Last updated
Evolution of sustainability through monitoring and punishment GERMAN.png preview Preview for 'Evolution of sustainability through monitoring and punishment GERMAN' over 3 years ago, by Susan Hanisch Download

This model does not have any ancestors.

This model does not have any descendants.