under the sea
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
globals [seaweed] breed [sharks shark] breed [seals seal] breed [fishes fish] patches-own [countdown] to setup clear-all ask patches [ set pcolor blue ] if seaweed? [ ask patches [ set pcolor one-of [green blue] if-else pcolor = green [ set countdown seaweed-regrowth-time ] [set countdown random seaweed-regrowth-time] ] ] set-default-shape sharks "shark" create-sharks initial-number-sharks [ set color gray set size 5.5 set label-color white - 2 setxy random-xcor random-ycor ] set-default-shape seals "seal" create-seals initial-number-seals [ set color black set size 3.5 setxy random-xcor random-ycor ] set-default-shape fishes "fish" create-fishes initial-number-fishes [ set color orange set size 2 setxy random-xcor random-ycor ] set seaweed count patches with [pcolor = blue] reset-ticks end to go if not any? turtles [ stop ] ask fishes [ move if seaweed? [ eat-seaweed ] reproduce-fishes lifespan ] ask seals [ move catch-fish reproduce-seals lifespan ] ask sharks [ move catch-seals reproduce-sharks lifespan ] if seaweed? [ ask patches [ grow-seaweed ] ] set seaweed count patches with [ pcolor = blue ] tick end to move rt random 50 lt random 50 fd 1 end to eat-seaweed if pcolor = green [ set pcolor blue ] end to reproduce-fishes if random-float 100 < fishes-reproduce [ hatch 1 [ rt random-float 360 fd 1 ] ] end to reproduce-seals if random-float 100 < seals-reproduce [ hatch 1 [ rt random-float 360 fd 1 ] ] end to reproduce-sharks if random-float 100 < sharks-reproduce [ hatch 1 [ rt random-float 360 fd 1 ] ] end to catch-fish let prey one-of fishes-here if prey != nobody [ ask prey [ die ] ] end to catch-seals let prey one-of seals-here if prey != nobody [ ask prey [ die ] ] end to lifespan let fishpop fishes-here let sealpop seals-here let sharkpop sharks-here if ticks = 50 [ ask fishpop [ die ] ] if ticks = 60 [ ask sealpop [ die ] ] if ticks = 70 [ ask sharkpop [ die ] ] end to grow-seaweed if pcolor = blue [ ifelse countdown <= 0 [ set pcolor green set countdown seaweed-regrowth-time ] [ set countdown countdown - 1 ] ] end
There is only one version of this model, created over 8 years ago by Olivia Cornteo.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.