Axelrod model
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
THE MODEL
It is an agent-based simulation of the Axelrod model for cultural diffusion. The simulation allows to explore the evolution of a system on the basis of the cultural characteristics of the agents that compose it. The dynamics of the model is based on two main mechanisms: (1) the agents tend to interact with other agents who have similar cultural characteristics and (2) during the interaction, the agents influence each other in order to become more similar. This dynamic sometimes leads to cultural homogeneity in which all agents have the same cultural characteristics, but at other times it makes culturally distinct regions develop. The model allows to study to what extent the probability of these two results depends on the parameters of the model: - the number of agents in the population - F, the number of cultural characteristics considered - q, the number of values that each characteristic can assume (also called cultural traits) - r, the radius of interaction
THE RULES
Each agent occupies a single cell of a square grid. The culture of an agent is described by a vector of F integer variables called "features". Each of these features can assume q different values (called "traits") between 0 and q-1. Initially, the characteristics of each agent have random traits. At each tick of the model, agents update their cultural value via an asynchronous random update. This means that the program creates a list in which all agents are included in a random order and the list is parsed until all agents are chosen. When an agent's turn comes, one of its neighbors (i.e. one of the agents within the set radius) is randomly selected. Between the agent and his neighbor, the cultural overlap is then calculated as the percentage of characteristics with equal traits. For example, between an agent described by the vector [8,2,3,3,0] and its neighbor described by the vector [6,3,7,3,0], the cultural overlap will be 2/5, that is 40%. Then, with probability equal to the overlap, the two agents interact. An interaction consists in randomly selecting one of the features on which the two agents differ and in modifying the feature of the agent considered with that of the neighbor with whom it interacts. Note that, if the overlap is equal to 0, the interaction is not possible and the respective agents are not influenced. Similarly, if the overlap is equal to 1, there is no interaction because the values of all the traits are already equal between the two agents. This procedure continues until there are active agents on the grid, that is that there are agents that have at least one neighbor with neither zero nor total overlap.
USE OF THE SIMULATION
The user can choose the size of the population (via "world-size"), the number of cultural characteristics considered (F), the number of cultural traits (q) and the range of interaction (radius). When the radius is equal to 1, the neighborhood of each agent consists of the 4 agents immediately above, below, right and left (following the Von Neumann topology). Pressing 'Setup' the user initializes the system with the selected parameters. “Go Once” or “Go Forever” make the simulation start. The simulation allows the user to follow the changes in the culture of the agents based on the color they take on. In addition, a graph reports the number of different cultures at each tick of the simulation. At the end of the simulation, through “Report Networks” it is possible to obtain the number of cultural regions in the population (regions with adjacent agents of the same culture) and the number of agents in the largest region.
QUESTIONING THE SIMULATION
The dynamics of the simulation lead to the formation of one or more cultural regions, which we can define as a set of adjacent agents with the same culture (same traits for all cultural characteristics). Does the occurrence of this phenomenon seem reasonable to you? What rules of how the simulation works allow you to tell? Sometimes the simulation leads to the achievement of situations of cultural homogeneity, but other times it causes culturally distinct regions to develop. How do you explain this last phenomenon? Do you see a contradiction between this polarization phenomenon and the basic rules of the model? It may happen that as the simulation progresses, two cultural regions are formed that differ from each other only for one characteristic. In this case, you can often notice that the biggest region "eats" the smallest. How do you explain this kind of evolution? By varying the number of cultural characteristics F and keeping the other parameters constant, you should observe that the probability of obtaining a single cultural region increases. Why does this happen? By increasing the number of traits and keeping the other parameters constant, you should observe that the probability of obtaining more distinct cultural regions increases. Why does this happen? By increasing the range of interaction, always keeping the other parameters constant, you are more likely to observe the formation of a single cultural region. Why does this happen? The last parameter that can be changed is the number of agents, using the world-size slider. What happens by changing it? What behaviors do you observe? How do you explain them?
For each of the above questions, can you think of one or more social situations that mirror/remember/exemplify the simulated phenomena?
THE TAKE-HOME MESSAGE OF THE MODEL
Following Axelrod himself, "the most important lesson of the social influence model is that intuition is not a good guide to predicting what a model will produce, although it has a very simple dynamic". The model of social influence is indeed very simple. Its mechanism can be summed up in a single sentence: with probability equal to cultural similarity, a randomly chosen agent will adopt one of the cultural characteristics of a randomly chosen neighbor. That's all. Yet it is very difficult to predict how the number of stable cultural regions varies as a function of the four parameters of the model. Two of the results are intuitively obvious, but two are not. The two intuitive results are that the number of stable regions: - it increases with the number of traits that each cultural characteristic can assume - decreases with the range of interaction. The two counterintuitive results are that the number of stable regions: - decreases as the number of cultural characteristics increases - decreases in large territories.
The model also shows that simple rules of convergence can give rise to counterintuitive and unexpected aggregate phenomena including the formation of several distinct cultural regions and phenomena of cultural prevarication, despite the absence of preferences in the model.
REFERENCES
This model was developed by Robert Axelrod. The 1997 paper in which the author presents the model is:
Axelrod, R. 1997. "The dissemination of culture - A model with local convergence and global polarization." Journal of Conflict Resolution 41: 203-226.
ThIS NetLogo simulation has been adapted for educational purposes by Eleonora Barelli (eleonora.barelli2@unibo.it) starting from the code of Arezky H. Rodríguez (arezky@gmail.com).
© 2021 by Eleonora Barelli (eleonora.barelli2@unibo.it)
Comments and Questions
;; Axelrod's Model for Cultural Evolution is an agent-based model described by ;; Robert Axelrod in his paper: ;; Axelrod, R. 1997. “The dissemination of culture - A model with local convergence and global polarization.” ;; Journal of Conflict Resolution 41:203-226. ;; ;; ;; 2021 Eleonora Barelli (eleonora.barelli2@unibo.it) ;; ;; -------------------------------------------------- ;; ;;;;;;;;;;;;;;;;; ;;; VARIABLES ;;; ;;;;;;;;;;;;;;;;; globals [ time ;; time number_of_agents ;; number of all agents in the society (obtained as world-size^2) cult_max ;; number associated to the culture with maximum traits for each feature [q-1, q-1, q-1, …, q-1] number_of_active_agents ;; number of agents which have at least one neighbor with overlap in ]0,F[ number_of_cultures ;; number of cultures in the society at a certain time number_of_cultural_regions ;; number of cultural regions simply connected component-size ;; number of agents explored so far in the current component giant-component-size ;; number of agents in the giant component ] turtles-own [ culture ;; culture of an agent explored? ;; if the agent is already explored (or not) when determining number of cultural regions ] ;;;;;;;;;;;;;;;;;;;;;;;; ;;; SETUP PROCEDURES ;;; ;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; General setup settings: clear plots, create the grid ;; to setup clear-all clear-all-plots resize-world 0 (world-size - 1) 0 (world-size - 1) ;; defining the size of the society set number_of_agents (world-size * world-size) ;; there will be as many agents as the patches (not yet created) set-patch-size 360 / world-size ;; setting patch size for good looking ask patches [set pcolor 34] ;; setting color of patches set giant-component-size 0 ;; initializing the number of agents in the biggest cultural domain set number_of_cultural_regions 0 ;; initializing the number of the cultural regions setup-turtles ;; creating the agents, locating them and setting their cultural values randomly reset-ticks set time 0 end ;; ;; Agent settings: create agents, position them in the grid ;; to setup-turtles set-default-shape turtles "person" create-turtles number_of_agents [ ;; creating the agents set size 0.9 while [any? other turtles-here] [ move-to one-of patches ] ;; setting agents' location: only one agent at each patch ] setup-culture-max ;; assigning a value to the culture with maximum traits value setup-agent-culture ;; setting agents culture count-cultures ;; counting the amount of different cultures at time = 0 do-plots ;; plotting for visualization end ;; ;; Assigning a value to the culture with maximum traits values ;; to setup-culture-max set cult_max (q ^ F - 1) end ;; ;; Assigning a random culture to each agent ;; to setup-agent-culture ask turtles [ ;; all agents, in a random order, are asked to set culture [] ;; set their own variable “culture” to an empty list, then, repeat F [ ;; F (number of cultural features) times, set culture lput random q culture ;; add at the end of the list a random value in [0, q-1]. ] ;; Once the list is filled, setup-agent-culture-color ;; set a color for the agent according to its culture ] end ;; ;; Setting the color to the agent according to its culture ;; to setup-agent-culture-color ;setting agent culture in base q let i 1 let suma 0 repeat F [ set suma suma + item (i - 1) culture * q ^ (F - i) set i i + 1 ] let Cult_base_q suma ;setting the corresponding color to the turtle according to the culture_base_q value. a range of blue is selected set color (9.9 * Cult_base_q / Cult_max) + 100 end ;;;;;;;;;;;;;;;;;;;;;; ;;; MAIN PROCEDURE ;;; ;;;;;;;;;;;;;;;;;;;;;; ;; ;; Execute all the procedures in their order until there are active agents ;; to go clear-links ask turtles [setup-agent-culture-color] ;; asking agents to setup their color tick set time time + 1 set number_of_active_agents 0 ask turtles [cultural-interaction] ;; asking agents to interact locally in asyncronous-random updating count-cultures ;; counting the amount of different cultures do-plots ;; plotting for visualization if number_of_active_agents = 0 [stop] ;; stopping when there are no active agents (when each agent ;; has full or null overlap with each of its neighbors end ;;;;;;;;;;;;;;;;;;;;;;;; ;;; LOCAL PROCEDURES ;;; ;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; agents look for a neighbor to interact with ;; to cultural-interaction ; count the neighbors within the given radius that have a number of common traits in ]0, F[ let number_of_possible_neighbors count other turtles in-radius radius with [(0 < overlap_between self myself ) and (overlap_between self myself < F)] ; if there is one or more such neighbors, if number_of_possible_neighbors > 0 [ ; increase of 1 the number of active agents and set number_of_active_agents number_of_active_agents + 1 ; select a neighbor within the radius let neighbor_turtle one-of other turtles in-radius radius ; and make it interact with the target agent let target_turtle self culturally_interacting target_turtle neighbor_turtle ] end ;; ;; reporting overlap between two agents (range from 0 to F) ;; to-report overlap_between [target_turtle neighbor_turtle] let suma 0 ;; Initialize to 0 a temporarily variable suma, then (foreach [culture] of target_turtle [culture] of neighbor_turtle ;; for each element of the cultures of target and neighbor, [ [a b] -> if a = b [ set suma suma + 1] ] ;; compare the traits and, if they are equal, add 1 to suma ) report suma end ;; ;; interaction between a target agent and its selected neighbor ;; to culturally_interacting [target_turtle neighbor_turtle] let overlap overlap_between target_turtle neighbor_turtle ;; Calculate the overlap between target and neighbor. if (0 < overlap and overlap < F ) [ ;; If the overlap is in ]0, F[, let prob_interaction (overlap / F) ;; call overlap/F the probability of interaction, then, if random-float 1.0 < prob_interaction [ ;; according to this probability, let trait random F ;; select randomly a cultural feature to inspect let trait_selected? false while [not trait_selected?] [ ifelse (item trait [culture] of target_turtle = item trait [culture] of neighbor_turtle) ;; if that cultural feature has the same trait for both agents [ set trait ((trait + 1) mod F) ;; pass to the adjacent cultural feature ] [ set trait_selected? true ;; otherwise ] ] let new_cultural_value (item trait [culture] of neighbor_turtle) ;; save the trait for that cultural feature of the neighbor set culture replace-item trait culture new_cultural_value ;; and replace the original cultural feature in the target agent with the neighbor’s trait setup-agent-culture-color ;; update the target agent's color according to the new culture ] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; COMPONENT EXPLORATION ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Find all agents reachable from this node (it is a recursive procedure) ;; to explore ;; turtle procedure if explored? [ stop ] set explored? true set component-size component-size + 1 ask link-neighbors [ explore ] end ;; ;; an agent creates a link with all its neighbors with the same culture ;; to creates-links-with-same-cultural-neighbors-in-neighborhood-of-radio-radius let neighborhood other turtles in-radius radius ask neighborhood [ if overlap_between self myself = F ;; if they have the same cultures [ let color_for_the_link color create-link-with myself [set color color_for_the_link] ;; create a link ] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; GLOBAL EXPLORATION ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; count the number of different cultures in the system ;; to count-cultures let list_of_cultures [] ;; Initialize an empty list to contain the different cultures ask turtles [ ;; All agents, in random order, are asked to set list_of_cultures lput culture list_of_cultures ;; add their vector of culture to the list of cultures. ] set list_of_cultures remove-duplicates list_of_cultures ;; Remove the duplicates from the resulting list set number_of_cultures length list_of_cultures ;; The number of different cultures is the length of the list end ;; ;; counting the number of agents in the biggest cultural region ;; to count-turtles-on-biggest-region ; first it is linked all agents of the same culture (each agent looks for a neighbor which is in its neighborhood (agent inside in radius) ask turtles [ creates-links-with-same-cultural-neighbors-in-neighborhood-of-radio-radius ] find-all-components ;; exploring each connected network finding and counting agents of the same culture end ;; ;; finding all the connected components in the network and their sizes ;; to find-all-components set number_of_cultural_regions 0 ;; Initialize to 0 the number of cultural regions ask turtles [ set explored? false] ;; All the agents, until all get explored, are asked to loop [ let starting_turtle one-of turtles with [ not explored? ] ;; find a starting agent that has not been yet explored if starting_turtle = nobody [ stop ] ;; (if no agents are left, the loop stops) set component-size 0 ;; Initialize to 0 the component size ask starting_turtle [ ;; Ask the starting agent to explore ;; Count its similar neighbors (recursive procedure ;; in which the component-size counter is updated) set number_of_cultural_regions number_of_cultural_regions + 1 ;; Once the explore procedure ends, increase the number of cultural regions ] if component-size > giant-component-size [ ;; If the component explored is bigger than the giant component, set giant-component-size component-size ;; call its dimension the giant-component-size ] ] end ;;;;;;;;;;;;;; ;;; GRAPHS ;;; ;;;;;;;;;;;;;; to do-plots ;setting the plot of Cultures set-current-plot "Graph" set-current-plot-pen "Number of cultures" plotxy time (number_of_cultures / q ^ F) end
There is only one version of this model, created almost 4 years ago by Eleonora Barelli.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Axelrod model.png | preview | Preview for 'Axelrod model' | almost 4 years ago, by Eleonora Barelli | Download |
This model does not have any ancestors.
This model does not have any descendants.