natsel
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
breed [predators predator] breed [bugs bug] bugs-own [bigness] to setup ca create-bugs 30 ask bugs [setxy random-xcor random-ycor set heading 0 set color white set size 1 set shape Type-of-organism] ask n-of 5 bugs with [color = white] [set color red] ask n-of 5 bugs with [color = white][set color blue] ask n-of 5 bugs with [color = white] [set color green] ask n-of 5 bugs with [color = white] [set color violet] ask n-of 5 bugs with [color = white] [set color yellow] ask n-of 5 bugs with [color = white] [set color brown] set-size create-predators 1 [ set shape "bird" set color yellow set size 3 set heading 315 ] reset-ticks end to set-size ask bugs [set bigness random 10] ask bugs [set size bigness] end to reproduce ask bugs [ if random 100 > 25 [ hatch 1 [setxy random-xcor random-ycor set heading 0 ifelse random 10 > 5 [set size size + .5 ] [set size size - .5]]]] end to move-predator ask predators [ setxy mouse-xcor mouse-ycor set hidden? not mouse-inside? ] end to go tick check-caught move-predator ask bugs [if size <= .05[die]] if count bugs < 10 [user-message (word "There are " count bugs " bugs. Hit Halt and Reproduce before continuing")] end to check-caught if not mouse-down? or not mouse-inside? [ stop ] let prey [bugs in-radius (size / 3 )] of one-of predators ;; no prey here? oh well if not any? prey [ stop ] ;; eat only one of the bugs at the mouse location ask one-of prey [ die ] end
There is only one version of this model, created over 13 years ago by Pratim Sengupta.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.