Belief Consolidation
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 the spread and consolidation of beliefs on a social network.
The vast majority of things we believe come from sources other than direct experience. Knowledge and beliefs spread through populations and are passed down through generations. For any event witnessed by multiple people, there will be multiple accounts of what happened; yet somehow a common knowledge of what “actually” occurred eventually seems to be consolidated in the population.
Often times, there are multiple differing beliefs on a topic within a population. Under some conditions, these beliefs will be consolidated into a single belief shared by the whole populations, and under other conditions the distinct beliefs will remain distinct.
When multiple beliefs exist within a population, such as different political or religious beliefs, people tend to have many more friends that are similar to them in these areas than different. This tendency to have connections to similar people is termed homophily.
This model simulates how communal knowledge and beliefs about an event emerge from the differing accounts of multiple individuals, how multiple beliefs are either maintained in a population or converge to single group belief and how people with similar beliefs end up maintaining bonds with each much longer than people with divergent beliefs.
HOW IT WORKS
The Agents The model uses circles to represent people and links between them to represent friendships (or any other type of relationship). Individuals have a belief represented by a list of three numbers in the range 1-255, a stubbornness in the range 0 to 1 and a tolerance in the range 0 to 1. Individuals display their beliefs with their color, and their stubbornness with their size (larger is more stubborn). Individuals that with a stubbornness equal to 1 are displayed as squares instead of circles because they play an important role in the model.
Agent Behavior Each individual behaves as follows at each tick (from the perspective of the individual):
- I choose someone I'm linked with to interact with.
- We see how different our beliefs are. This is calculated as a fraction, so if our beliefs are maximally different, the difference between our beliefs will be 1 and if they are exactly the same, it will be 0.
- If both our tolerances are greater than the differences between our beliefs, we share beliefs. If not, we stop interacting.
- To share our beliefs, we each use a weighted average according to our stubbornness. For example, if my stubbornness is 0.8, I will multiply my belief by 0.8 and my friend's belief by 0.2 and add them.
- After we share our beliefs, our friendship is strengthened by
friendship-gain
- Next I make random friends. With probability
random-friend-prob
, I make a new friend with a random other person. With a probability three times higher than this, I make a new friend with someone who is a friend of one of my friends. - If I have no friends, I always try to make random new friend.
After all the individuals have gone through the above procedures, all friendships are weakened by friendship-decay
. If the strength of a friendship reaches 0, the friendship ends.
HOW TO USE IT
The network-type
chooser determines the initial structure of the network from, random
, preferential attachment
or small world
. The network is initially displayed according to the layout
chooser. The network can be displayed with a new layout at any time.
After the network type has been chosen a number of sliders control the properties of the people on the network:
initial-num
: The number of people on the networknum-with-initial-belief
: Only a certain number of nodes start with an initial belief. This can be as few as 1, or as many as the number of people on the network.ave-stubbornness
: The average stubbornness value for the people in the network.stubbornness-std-dev
: The standard deviation of the stubbornness values.ave-tolerance
: The average tolerance value for the people in the network.tolerance-std-dev
: The standard deviation of the tolerance values.initial-friendship-strength
: This sets the initial strength of friendships. After this they are strengthened through belief sharing interactions, and weakened automatically every tick.
After these sliders have been set:
- The
setup
button creates a network according the values on the sliders. - The
go-once
button causes all of the agent behaviors described in the How It Works section to happen once. - The
go
button causes the agent behaviors to happen continuously. - The
spring?
chooser controls whether the network layout updates like a spring. This means links act as springs, pushing nodes away that are too close and pulling nodes closer that are too far away. Ifspring?
is turned off, a static layout can be chosen at any time by pressing thelayout
button on the top of the screen.
While the model is running, new beliefs can be added. The tolerance and stubbornness of the turtles with the new beliefs are changed according to the values on the sliders. So a group with a new belief can be introduced that is more or less stubbornn and tolerant than the original group.
add-new-belief
button: adds a new beliefnum-with-new-belief
: determines the number of nodes given the new belief.
Whenever turtles average their beliefs, a certain ammount of noise is added.
noise
: determines the maximum ammount of noise added. A random ammount of noise is added between 0 and thenoise
noise-effect
: determines where the noise is addedother belief
: the noise is added to the other person's belief, and then they are averagedaveraged belief
: the belief are averaged and then the noise is added.
Adding noise to the averaged belief means that even people with stubbornness=1 will slowly change beliefs due to noise. Adding noise only to the other person's belief means that people with stubbornness=1 will never change beliefs. Also the effect of noise is reduced when it is only added to the other person's belief, because it gets multiplied by (stubborness - 1). Depending on the situation being modeled, these could both be valid assumptions.
Turtles also make friends randomly, and their friendships are strengthened or weakened.
random-friend-prob
: The probability of making a random friend. The probability of becoming friends with a friend of a friend is 3 times this number.friendship-decay
: The ammount that all friendships are weakened each tickfriendship-gain
: The ammount that a friendship is strengthened when beliefs are shared.
THINGS TO NOTICE
The Belief distribution will cosntantly fluctuate slightly, but tends to not actually move much.
Notice which links seem to break more often.
If there are two stable beliefs in the population, notice how they tend to segregate (form homophilous links)
THINGS TO TRY
Try changing the noise
slider while the model is running. What happens to the Belief distribution?
Try changing the noise-effect
between other belief
and averaged belief
. Try doing this when there are some fully stubborn people in the world (represented by squares). What changes when the noise-effect
is changed?
Try initializing the population with two different beliefs. Repeat this with different average tolerance and stubbornness values, and different standard deviations. Can you get the two beliefs to maintain themselves in the network? Can you get the two beliefs to average into a single belief?
Try letting one belief spread across the whole population, then increase the average stubbornness and add a few people with a new belief.
Try changing the random-friend-prob
, friendship-gain
and friendship-decay
sliders. Notice how the degree distribution changes.
EXTENDING THE MODEL
People right now have three components to their beliefs, but only one stubbornness and tolerance. The three components could represent different types of beliefs and people would have different stubbornnesses and tolerances for each component of the belief. Then friendship strength or gain could partly be on how many belief components two individuals have in common.
Some sort of spatial component could be added. Maybe people live on a certain patch and are more likely to make links with other people nearby.
Right now, all agents have the same influence. In the real world certain people are much more influential than others. It could be interesting to give people an influence variable and then work this into the belief sharing algorithm so that more influential people change other people's beliefs more easily. Influence could be based on something like degree, or it could be an inherent property.
RELATED MODELS
Virus on a Network Language Change
CREDITS AND REFERENCES
Model developed by Jacob Kelter http://modelingcommons.org/browse/one_model/3664#model_tabs_browse_discuss
Comments and Questions
extensions [nw] globals[ the-event num-original-beliefs population ] turtles-own[ belief stubbornness tolerance ] links-own[ friendship-strength] ;;Set up procedure to setup ca set-default-shape turtles "circle" make-turtles ;creates the turtles and the network set population initial-num ;sets the global variable population set-event ;This is what the intial belief is based off of ;;Have turtles initiall set beliefs to all 0s ask turtles [ set belief [0 0 0] set-stubbornness/tolerance ] give-turtles-belief the-event num-with-initial-belief ;give a certain # of people an initial belief based on the the-event set-friendship-strengths color-turtles set-turtle-size reset-ticks end ;;Go procedure to go ask turtles [ if belief != [0 0 0] [ ;if the turtle has a belief ;If the turtle has neighbors, it interacts if count link-neighbors > 0 [ let neighbor one-of link-neighbors ;;pick a neighbor spread-belief neighbor ;;spreads belief to neighbor, if the neighbor is similar, the friendship is strenghthened. ] ] ;Randomly might make a friend with a friend of a friend make-random-friend-of-friend ;Randomly might make a random friend make-random-friend if count link-neighbors = 0 [ ;;if turtle has no friends, it automatically makes a new friend create-link-with one-of other turtles ] ] ;Friendships weaken ask links [ set friendship-strength friendship-strength - friendship-decay if friendship-strength < 0 [ die ] ] color-turtles set-turtle-size if spring? [ spring-layout ] tick end ;************************************************************************************************ ;SETUP CODE ;;sets the intial event. In this version of the model, the intial event is represented by ;A string of three numbers between 0 and 255 so that the turtles can display their ;belief with their color to set-event set the-event (list random 255 random 255 random 255) ask patches with ([pycor = max-pycor and pxcor < (min-pxcor + 3)]) [set pcolor the-event] end ;;Gives a number of turtles a new belief. to give-turtles-belief [new-belief num-with-belief] ask one-of turtles [set belief new-belief ] while [num-with-belief > count turtles with [belief = new-belief] ] [ ask one-of turtles with [belief = new-belief] [ ask one-of link-neighbors [ set belief new-belief ] ] ] ;add noise to new belief ask turtles with [belief = new-belief] [ set belief (map[? + random-float noise] new-belief) trim-belief-between-1-255 ] end ;A turtle gets a stubbornness and tolerance according to normal distribution around the values ;chosen on the sliders. Stubbornness and tolerance are limited to the range 0 to 1 to set-stubbornness/tolerance set stubbornness random-normal ave-stubbornness stubbornness-std-dev if stubbornness > 1 [set stubbornness 1] if stubbornness < 0 [set stubbornness 0] set tolerance random-normal ave-tolerance tolerance-std-dev if tolerance > 1 [set tolerance 1] if tolerance < 0 [set tolerance 0] end ;;sets initial friendship strength to set-friendship-strengths ask links [ set friendship-strength initial-friendship-strength ] end ;************************************************************************************************ ;GO CODE ;;Code to spread beliefs. In this version each tick a turtle picks one neighbor to interact ;with. The turtles average the beliefs and add some noise. to spread-belief [neighbor] let my-belief belief ;;new variable to hold my-belief let neighbor-belief [belief] of neighbor ;;variable to hold neighbor's belief ifelse neighbor-belief = [0 0 0] ;;If neighbor has no belief. I pass my belief to neighbor [ ask neighbor [ set belief (map [? + random-float 2 * noise - noise] my-belief) trim-belief-between-1-255] ] [ ;;Second option of ifelse above: If the neighbor does have a belief. ;If we can tolerate our differences, we average our beliefs, using stubborness as the weighting let disagreement disagreement-between-2 my-belief neighbor-belief ;calculate the disagreement ;if tolerance is greater than disagreement, then share beliefs and strenthen friendship if disagreement < tolerance and disagreement < [tolerance] of neighbor [ ifelse noise-effect = "averaged belief" ;;the noise gets added after our beliefs are averaged. Noise still effects the beliefs of stubborn turtles [ set belief (map [ ( (?1 * stubbornness) + (?2 * (1 - stubbornness)) + random-float 2 * noise - noise )] my-belief neighbor-belief) trim-belief-between-1-255 ask neighbor [ set belief (map [ ( (?1 * stubbornness) + (?2 * (1 - stubbornness)) + random-float 2 * noise - noise)] neighbor-belief my-belief) trim-belief-between-1-255 ]] ;;the noise gets added to the other turtle's belief, then averaged. Noise doesn't effet beliefs of stubborn turtles [ set belief (map [ ( (?1 * stubbornness) + ((?2 + random-float 2 * noise - noise)) * (1 - stubbornness))] my-belief neighbor-belief) trim-belief-between-1-255 ask neighbor [ set belief (map [ ( (?1 * stubbornness) + ((?2 + random-float 2 * noise - noise)) * (1 - stubbornness)) ] neighbor-belief my-belief) trim-belief-between-1-255 ]] ;After sharing belief, strengthen friendship strengthen-friendship neighbor ] ] end ;Strengthens the friendship of two nodes that just interacted to strengthen-friendship [neighbor] ask link-with neighbor [set friendship-strength friendship-strength + friendship-gain] end ;;Turtles make a new connection randomly to make-random-friend if random-float 1 < (random-friend-prob) [ let potential-friends other turtles with [not link-neighbor? myself] if any?(potential-friends) [ ;if there is such a friend create-link-with one-of potential-friends [set friendship-strength initial-friendship-strength] ] ] end ;Turtles make a new friend with a friend of one of their friend's with a much higher probability than randomly to make-random-friend-of-friend if random-float 1 < (random-friend-prob * 3) [ let friends-of-friends sort-by [count ?1 > count ?2] [link-neighbors] of link-neighbors ;makes list of agentsets. one for the friends of each friend ;When there are 1 turtle agent sets in the list, it is only the asking turtle in it. They must be removed so turtle doesn't try to link with itself while [length friends-of-friends > 0 and count item (length friends-of-friends - 1) friends-of-friends < 2] [ set friends-of-friends but-last friends-of-friends ] ;If there are any friends of friends, make a friend with one of them if length friends-of-friends >= 1 [ create-link-with one-of other (one-of friends-of-friends) ] ] end ;;Colors turtles according to their belief to color-turtles ask turtles [ ifelse belief = [0 0 0] [set color grey] [set color belief] ] end ;;Sizes turtles according to stubbornness to set-turtle-size let max-stubbornness max([stubbornness] of turtles) ask turtles [ ifelse stubbornness = 0 [set size .5] [set size (.5 + stubbornness / max-stubbornness)] ifelse stubbornness = 1 [set shape "square"] [set shape "circle"] ] end ;;Adds a new belief to the world to add-new-belief let new-belief (list random 255 random 255 random 255) ;Give turtles new belief ask one-of turtles [set belief new-belief ] while [num-with-new-belief > count turtles with [belief = new-belief] ] [ ask one-of turtles with [belief = new-belief] [ ask one-of link-neighbors [ set belief new-belief ] ] ] ;The turtles with the new belief get new stubbornness and tolerances according to the sliders ask turtles with [belief = new-belief] [ set-stubbornness/tolerance ] ;;Add noise to new belief ask turtles with [belief = new-belief] [ set belief (map[? + random-float noise] new-belief) trim-belief-between-1-255 ] color-turtles set-turtle-size ;increase the number of beliefs set num-original-beliefs num-original-beliefs + 1 ;display the new belief on upper left patches ask patches with ([pycor = max-pycor - num-original-beliefs and pxcor < (min-pxcor + 3)]) [set pcolor new-belief] end ;If there is noise being added to the system, this checks to make sure the beliefs are within ;0 to 255 so that they can be displayed as a color to trim-belief-between-1-255 if noise > 0 [ ;;If noise is zero, don't bother checking let counter 0 repeat 3 [ if item counter belief > 255 [set belief replace-item counter belief 255] if item counter belief < 1 [set belief replace-item counter belief 1] set counter counter + 1 ] ] end ;******************************************************************************** ;Code to Generate Initial Network. Taken from the Network Externsion General Demo ;;Makes network according the type selected in the chooser to make-turtles if network-type = "Random" [make-random-network] if network-type = "Preferential Attachment" [make-pref-attach-network] if network-type = "Small World" [make-small-world-network] end to generate [ generator-task ] ; we have a general "generate" procedure that basically just takes a task ; parameter and run it, but takes care of calling layout and update stuff set-default-shape turtles "circle" run generator-task layout-once ;update-plots end to make-random-network generate task [ nw:generate-random turtles links initial-num connexion-prob ] end to make-pref-attach-network generate task [ nw:generate-preferential-attachment turtles links initial-num ] end to make-small-world-network generate task [ nw:generate-small-world turtles links sqrt(initial-num) sqrt(initial-num) 2 true] end to redo-layout [ forever? ] if layout = "radial" and count turtles > 1 [ layout-radial turtles links ( max-one-of turtles [ count my-links ] ) ] if layout = "spring" [ let factor sqrt count turtles if factor = 0 [ set factor 1 ] repeat ifelse-value forever? [ 1 ] [ 50 ] [ layout-spring turtles links (1 / factor) (150 / factor) (1.5 / factor) display if not forever? [ wait 0.005 ] ] ] if layout = "circle" [ layout-circle sort turtles max-pxcor * 0.9 ] if layout = "tutte" [ layout-circle sort turtles max-pxcor * 0.9 repeat 10 [ layout-tutte max-n-of (count turtles * 0.5) turtles [ count my-links ] links 12 ] ] end to layout-once redo-layout false end to spring-layout let factor sqrt count turtles if factor = 0 [ set factor 1 ] layout-spring turtles links (2 / factor) (70 / factor) (.5 / factor) end ;******************************************************************************************** ;Reporter Code. Reporters on agreement between nodes ;;A measure of the level of agreement among all the turtles regarding the first part of ;the belief. (the first number in the belief list) to-report B0-disagreement let aveB0 sum( [item 0 belief] of turtles with [ (belief != [0 0 0])]) / population let disagreement sum( [abs(item 0 belief - aveB0)] of turtles with [ (belief != [0 0 0])]) / (population * aveB0) report disagreement end to-report B1-disagreement let aveB1 sum( [item 1 belief] of turtles with [ (belief != [0 0 0])]) / population let disagreement sum( [abs(item 1 belief - aveB1)] of turtles with [ (belief != [0 0 0])]) / (population * aveB1) report disagreement end to-report B2-disagreement let aveB2 sum( [item 2 belief] of turtles with [ (belief != [0 0 0])]) / population let disagreement sum( [abs(item 2 belief - aveB2)] of turtles with [ (belief != [0 0 0])]) / (population * aveB2) report disagreement end to-report disagreement-w-initial-event let disagreement-0 abs(item 0 belief - item 0 the-event) / 254 let disagreement-1 abs(item 1 belief - item 1 the-event) / 254 let disagreement-2 abs(item 2 belief - item 2 the-event) / 254 report (disagreement-0 + disagreement-1 + disagreement-2) / 3 end to-report ave-disagreement-w-initial-event report mean([disagreement-w-initial-event] of turtles) end to-report disagreement-between-2 [t1-belief t2-belief] let disagreement-0 abs(item 0 t1-belief - item 0 t2-belief) / 254 let disagreement-1 abs(item 1 t1-belief - item 1 t2-belief) / 254 let disagreement-2 abs(item 2 t1-belief - item 2 t2-belief) / 254 report (disagreement-0 + disagreement-1 + disagreement-2) / 3 end
There are 6 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Belief Consolidation.png | preview | Preview for 'Belief Consolidation' | over 12 years ago, by Jacob Kelter | Download |
Design_Proposal_v1.docx | word | An updated design proposal | over 12 years ago, by Jacob Kelter | Download |
Jacob Kelter - Poster Slam Slides.pptx | powerpoint | Poster Slam Slides | over 12 years ago, by Jacob Kelter | Download |
Jacob Kelter Final Report.pdf | Final Report for the Model | over 12 years ago, by Jacob Kelter | Download | |
JacobKelter_June3.docx | word | Progress Report for June 3rd | over 12 years ago, by Jacob Kelter | Download |
JacobKelter_May13.docx | word | Progress Report for May 13th | over 12 years ago, by Jacob Kelter | Download |
JacobKelter_May20.docx | word | Progress Report for May 20th | over 12 years ago, by Jacob Kelter | Download |
JacobKelter_May27.docx | word | Progress Report for May 27th | over 12 years ago, by Jacob Kelter | Download |
Poster Session Poster.pages | My poster for the final poster session | about 12 years ago, by Jacob Kelter | Download |
This model does not have any ancestors.
This model does not have any descendants.
Jeff Kahn
Looks good.
I enjoy this model.
Posted over 12 years ago
Uri Wilensky
network setup
I would suggest that when you use the preferential attachment initialization that you include an acceptance of the link from the neighbor, so as to limit nodes from having too many links. Alternatively, u can use a simpler model and just cap the maximum degree of a node.
Posted over 12 years ago