The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.
powered by NetLogo
view/download model file: memes_and_social_learning.nlogo
The model explores the process of observational learning of social factors. The object of the model is the analisys of the transmission of water memes, that is ideas or beliefs connected to water saving.
The turtles are persons, who are interested in three activities: watering garden, washing clothes and washing dishes. They develop for each activity a belief, or meme: it could be a saving one, that is people don't want to waste water, or an indifferent one, that is people don't matter how much water they consume. A meme is identified by a number: 1 for savers and 0 for indifferents. The meme-list contains these three values, one for each activity.
People have a resistance degree to change and a probability to change, both choosen randomly at the beginning of the model.
People look at each other: they create different links among them looking at the number of same memes they share.
The characteristics of their neighbours modify their probability to change: it rises, if they are too much different or if there is a leader near them; it decreases, if their neighbours act like them. If the probability to change exceeds the resistance degree, people change habits, copying others' meme-list or changing some memes.
Click the SETUP button to create turtles and generate the links among them.
Click the GO button to start the simulation or the STEP-BY-STEP button to run the simulation only once.
Before starting the model, you can choose the number of subjects and the level of change-resistance: low, medium or high.
Switching on "movement?" and/or "leaders?" you can choose to let turtles move and/or to set some turtles as leaders, so they will be able to condition their neighbours. You can switch these variables all along the simulation.
There are two plots:
- "Links" shows the number of each type of link;
- "Savers" contains three series corresponding to the three types af activities: each one shows the number of agents with a saver meme for that activity. On its right, three monitors show the values of each series.
Three monitors on the right of the "Links plot" show the percentage composition of links, that is the number of each type of link on the total amount.
Try moving the sliders controlling the system's parameters, that is the possibility of the agents to move and the existance of leaders, and see how they influence the spread of memes and if the system converge to a particular set of habits or not.
It would be interesting to consider explicitly the economic value of each behaviour adopted by the agents. The probability to change and the opposite resistance degree could be linked to the opportunity cost of each habit and not only to the social environment: it would be a more realistic scenario.
Robert Axelrod, "The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration", Princeton, New Jersey, Princeton University Press, 1997.
; -------------------------
; MEMES AND SOCIAL LEARNING
; Emanuela Mirabelli
; -------------------------
turtles-own [
meme-list ; list of behaviours (garden, washer, dishwasher), each with 0-1 values (not water saver - water saver memes)
closers ; list of turtles in radius 5
number-of-same-memes ; list of number of same memes with turtles in closers
leader ; random value 0-1 if the subject is a leader
my-resistance ; change adversity = normal distribution randomly generated
prob-of-change ; probability of changing behaviour
change ; probability of changing behaviour - support variable
maxima ; number of water-saver memes to write in a txt file for 3d plot in wxmaxima
]
undirected-link-breed [weaks weak]
undirected-link-breed [mediums medium]
undirected-link-breed [strongs strong]
; ----------------
; SETUP PROCEDURES
; ----------------
to setup
clear-all
setup-turtles
setup-my-resistance
setup-prob-of-change
setup-links
do-plot
end
to setup-turtles
crt number-of-subjects
ask turtles [
set shape "person"
set size 1.3
setxy random-xcor random-ycor
set meme-list []
set meme-list (list (random 2) (random 2) (random 2))
if leaders? [ask n-of (random number-of-subjects / 3) turtles [set leader 1]]
if not leaders? [set leader 0]
]
end
to setup-my-resistance
ask turtles[
set my-resistance random-float 0.3
if change-adversity = "low" [set my-resistance my-resistance + 0]
if change-adversity = "medium" [set my-resistance my-resistance + 0.3]
if change-adversity = "high" [set my-resistance my-resistance + 0.7]
]
end
to setup-prob-of-change
ask turtles [set prob-of-change random-float 0.1]
end
to setup-links
clear-links
ask turtles [
set closers []
set closers sort other turtles in-radius 5
set number-of-same-memes same-memes-value
]
ask turtles [
(foreach [closers] of self [number-of-same-memes] of self [if ?2 = 1 [create-weak-with ?1]])
(foreach [closers] of self [number-of-same-memes] of self [if ?2 = 2 [create-medium-with ?1]])
(foreach [closers] of self [number-of-same-memes] of self [if ?2 = 3 [create-strong-with ?1]])
]
ask weaks [
set color blue
set thickness 0]
ask mediums [
set color red
set thickness 0.1]
ask strongs [
set color green
set thickness 0.2]
end
to-report same-memes-value ; lista: per ogni turtle in closer dice quanti sono i memi in comune
let n []
foreach [closers] of self [set n lput length filter [? = true](map [?1 = ?2] [meme-list] of self [meme-list] of ?) n]
report n
end
; --------------
; RUN PROCEDURES
; --------------
to go
be-influenced
if movement? [ask turtles [fd 1]]
if leaders? [ifelse any? turtles with [leader = 1] [][ask n-of (random number-of-subjects / 3) turtles [set leader 1]]]
if not leaders? [ask turtles [set leader 0]]
setup-links
do-plot
tick
end
to be-influenced
ask turtles [
let a []
set change prob-of-change
foreach [closers] of self [set a lput [leader] of ? a]
if member? 1 a [set change change + 0.4]
if count my-mediums > (count my-strongs + count my-weaks) [
set change change + 0.2]
if count my-weaks > (count my-strongs + count my-mediums) [
set change change + 0.3]
if count my-strongs > (count my-mediums + count my-weaks) [
set change change - 0.3]
]
ask turtles [
if change > my-resistance [
ifelse leader = 1 [] [
foreach [closers] of self [
ifelse [leader] of ? = 1 [set meme-list [meme-list] of ?]
[ifelse count my-strongs > (count my-mediums + count my-weaks) []
[set meme-list (replace-item random 3 meme-list random 2)]
]]]]]
end
to do-plot
set-current-plot "Links"
set-current-plot-pen "Weaks"
plot count weaks
set-current-plot-pen "Mediums"
plot count mediums
set-current-plot-pen "Strongs"
plot count strongs
set-current-plot "Savers"
set-current-plot-pen "Garden Savers"
plot count turtles with [item 0 meme-list = 1]
set-current-plot-pen "Washer Savers"
plot count turtles with [item 1 meme-list = 1]
set-current-plot-pen "Dishwasher Savers"
plot count turtles with [item 2 meme-list = 1]
end
to write-on-my-file ; procedure to create a file txt to read with maxima
file-delete "agents-points.txt"
file-open "agents-points.txt"
ask turtles [
file-write xcor
file-write ycor
set maxima length filter [? = true] map [? = 1] [meme-list] of self
file-write maxima
file-print ""
]
file-close
end