thief and cops
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[guardie guardia] breed[ladri ladro] breed[facce faccia] globals [ n_ladri] to setup clear-all reset-ticks crea_guardie crea_ladri crea_faccia set-default-shape turtles "circle" end to go if ticks = 1000 [ ask facce [set color [255 255 255 ] ] ] ask guardie [muovi_tipo_1 pen-down acchiappa] ask ladri [muovi_tipo_2] conta if n_ladri = 0 [stop] tick end to muovi_tipo_1 rt random 30 lt random 30 fd 1 end to muovi_tipo_2 rt random angolo lt random angolo fd 1 end to crea_tartarughe create-turtles n_tartarughe[ setxy random-xcor random-ycor set color [0 255 255] set size 1.5 set shape "default" ] end to crea_guardie create-guardie 10 [ setxy random-xcor random-ycor set color [0 0 255] set size 2 set shape "circle" ] end to crea_ladri create-ladri random n_tartarughe [ setxy random-xcor random-ycor set color [255 0 0] set size 1.5 set shape "default" ] end to crea_faccia create-facce 1 [ setxy random-xcor random-ycor set color [0 255 0] set size 2 set shape "face happy" ] end to conta set n_ladri count ladri end to acchiappa let sfortunato one-of ladri in-radius 1 if sfortunato != nobody [ ask sfortunato [ die ] ] end
There is only one version of this model, created over 3 years ago by gioele de felice.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
thief and cops.png | preview | Preview for 'thief and cops' | over 3 years ago, by gioele de felice | Download |
This model does not have any ancestors.
This model does not have any descendants.