Fish Pair Interactions - Conformity and Aggression
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
turtles-own [ speed neighbor plasticity aggression a-countdown ] breed [ fishes fish ] to setup clear-all reset-ticks create-fishes 1 [ set size 2 set speed boldness1 + random-normal 0 0.1 set a-countdown 0 ifelse boldness1 = 1 [ set plasticity 0.005 + random-normal 0 0.001 ] [ set plasticity 0.0035 + random-normal 0 0.001 ] setxy random-xcor random-ycor ] create-fishes 1 [ set size 2 set speed boldness2 + random-normal 0 0.1 set a-countdown 0 ifelse boldness2 = 1 [ set plasticity 0.005 + random-normal 0 0.001 ] [ set plasticity 0.0035 + random-normal 0 0.001 ] setxy random-xcor random-ycor ] end to go ask turtles [ set neighbor one-of other turtles move chase-escape change-speed ] tick end to move rt random 20 lt random 20 fd 1 * speed end to chase-escape if distance neighbor < 5 and [ speed ] of self > [ speed ] of neighbor and a-countdown < 0 [ set heading towards neighbor fd 1.5 set aggression 1 set a-countdown 10 ] if distance neighbor < 3 and [ speed ] of self < [ speed ] of neighbor [ set heading [heading] of neighbor + random-normal 90 25 fd 2 set aggression 0 ] if distance neighbor > 5 [ interact ] set a-countdown a-countdown - 1 end to interact if distance neighbor > 10 and any? other turtles in-cone 10 60 [ set heading towards neighbor set heading heading + random-normal 0 20 ] if distance neighbor < 10 [ set heading [heading] of neighbor + random-normal 0 20 ] end to change-speed if distance neighbor < 5 [ set speed speed + ([ speed ] of neighbor - [ speed ] of self) * plasticity + random-normal 0 0.001 ] if ([ speed ] of neighbor < [ speed ] of self) and distance neighbor < 10 [ set speed speed + plasticity + random-normal 0 0.001 ] if speed > 2 [ set speed 2 ] if speed < 1 [ set speed 1 ] end
There is only one version of this model, created almost 6 years ago by Vishwanath Varma.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Fish Pair Interactions - Conformity and Aggression.png | preview | Preview for 'Fish Pair Interactions - Conformity and Aggression' | almost 6 years ago, by Vishwanath Varma | Download |
This model does not have any ancestors.
This model does not have any descendants.