Behavior spread
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model simulates how a feature (a behavior) distributes (spreads) within a population.
Two aspects are differenciated:
- A mental state (MS), which is what the agent (turtle) thinks about the behavior. For each agent the MS is represented as a discrete (0/1) variable.
- An observed behavior (OB), which is what the agent performs in the community. For each agent the OB is represented as a continuous variable in the range [0, 1].
There is a relationship between MS and OB, of probabilistic nature. The notion that MS = 0 (1) should tend to yield OB = 0 (1) is respected.
MS spreads by two simultaneous mechanisms:
- By wear: the agents somehow "get tired" of their MS and shift to the other.
- By socialization: the agents observe the behavior (OB) of other agents, notice the discrepancy between their own MS and the average OB of their peers, and then adapt their MS in order to reduce the discrepancy. The number of peers to be observed by the agent is controlled from a slider (K).
From an initial distribution of MS among the agents, the model shows the changes in the distribution (spread) of MS in time.
HOW IT WORKS
The model differentiates the agents by their MS: all the parameters that control their actions are defined for the extreme cases MS = 0 and MS = 1. The values of these parameters are defined by sliders.
After initialization, the core steps followed by the model are as follows:
Update MS after wear. An average "wear rate" is calculated for the agent based on his MS, and then a calculation determines whether he will change or maintain his MS. WR0 (1) is the probability that if MS = 0 (1) the agent will change his MS because of "wear" in one tick-interval.
Update OB. The agent's OB depends on MS, but has "some noise" on it. A triangular relationship between MS and OB is assumed: if MS = 0, then the most probable outcome is OB = 0, and the less probable is OB = 1, with a linear trend in between. For MS = 1 the most probable outcome is OB = 1, etc.
Update OBD. K agents are selected randomly and its average OB is deducted from the agent's MS.
Update MS based on OBD. The larger the OBD (in absolute value), the larger is the probability that MS will change. For a given MS, this probability of change follows a triangular distribution. PC0 (1) is the total probability that if MS = 0 (1) the agent will change its MS due to OBD.
Additionally on each tick:
- The counters for each type of MS are updated.
- The colors of teh agents are also updated. (MS = 0 is black, MS = 1 is white).
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab) Items in the Interface:
- number_agents, slider: number of agents (turtles).
- MS1, slider: percentage of agents with MS = 1 at start.
- WR0 (1), slider: the probability that if MS = 0 (1) the agent will change his MS because of "wear" in one tick-interval.
- PC0 (1), slider: the total probability that if MS = 0 (1) the agent will change its MS due to OBD.
- K, slider: the number of agents randomly selected to asses their OB and compare it with the agent's MS.
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
- What if the agent observes the K-peers with bias? The extracted parameter could be the average (or a quantile) after removing from the sample the agents whose OB is more distant from the agent's.
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
;; ;; Global variables. ;; globals [count_MS0 count_MS1 ticks_MS01] ;; ;; turtle/breed. ;; ;; ;; turtle/breed variables. ;; turtles-own [ MS ;; mental state OB ;; observed behavior OBD ;; observed behavior discrepancy ] ;; ;; setup. ;; to setup clear-all reset-ticks setup-world setup-turtles ;; etc end ;; ;; setup-world. ;; to setup-world ask patches [ set pcolor green + 2] end ;; ;; setup-turtles. ;; to setup-turtles ;; Initialize global variables. ;; Create the turtles and set their initial states. create-turtles number_agents [ set shape "default" setxy random-xcor random-ycor] ;; Initial MS. ask turtles [ ifelse random 100 < MS1 [ set MS 1 set color 9.9] [ set MS 0 set color 0 ] ] ;; Update counts. update-counts end ;; ;; go. ;; to go ;; Criteria to stop. if (ticks > 5000) [stop] if (count_MS0 = count_MS1) [stop] ;; Otherwise do-things. ;; Update status. update-turtles ;; tick. tick end ;; ;; update-turtles. ;; to update-turtles ask turtles [ ;; update MS after wear let WR (WR0 + (WR1 - WR0) * MS) if random-float 100 < WR [ ifelse MS = 0 [set MS 1] [set MS 0]] ;; update OB ifelse (MS = 1) [ set OB sqrt(random-float 1.)] [ set OB (1 - sqrt(1 - (random-float 1.)))] ;; update OBD set OBD (MS - mean [OB] of other n-of K turtles) ;; update MS after OBD ;; triangular distribution for given MS: let x0 MS - 1 let x1 MS let xm 2 * MS - 1 ;; position of the mode let ym (PC0 + (PC1 - PC0) * MS) * 2 ;; compute y (given MS and OBD): let y 0 ifelse (OBD < xm) [ ifelse ( xm = x0) [ set y ym] [ set y 0 + (OBD - x0) * ym / (xm - x0)] ] [ ifelse ( xm = x1) [ set y ym] [ set y 0 + (x1 - OBD) * ym / (x1 - xm)] ] ;; Change MS according to y if random-float 100 < y * 0.1 ;; 0.1 is the interval precision width for OBD. [ ifelse MS = 0 [set MS 1] [set MS 0]] ;; Update counts. update-counts ;; update color ifelse MS = 0 [set color 0] [set color 9.9] ] end to update-counts ;; Update counts. set count_MS0 count turtles with [MS = 0] set count_MS1 count turtles with [MS = 1] end
There is only one version of this model, created about 5 years ago by Ricardo Gonzalez.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Behavior spread.png | preview | Preview for 'Behavior spread' | about 5 years ago, by Ricardo Gonzalez | Download |
This model does not have any ancestors.
This model does not have any descendants.