Like most things in life, it’s complicated.
if any? mammoths-here [
let r random 100
if r < 3 [ die ] ; mammoths have a 3% chance of killing the human
if r < 3 + odds-of-killing [
ask one-of mammoths-here [ die ] ; successfully hunt a mammoth!
set mammoths-killed-by-humans mammoths-killed-by-humans + 1
]
This part is like wolf-sheep predation. The next part is unrelated.
ask mammoths [
; mammoths have a 5% chance of dying if they're over 30
if age > 30 * 12 and random-float 100 < 5 [ die ]
; they also get another 5% chance of dying if their density is too high
if density > 0.50 and random-float 100 < 5 [ die ]
; if they are on a patch affected by climate change, they get a 5% chance of dying
if [ pcolor ] of patch-here = green + 3 and random-float 100 < 5 [
set mammoths-killed-by-climate-change mammoths-killed-by-climate-change + 1
die
]
; finally, all mammoths have a 0.33% chance of dying.
if random-float 100 < 0.33 [ die ]
Sent from my iPhone
Hello!