Axelrod's model of Cultural Diversity This implements a version of Axelrod's simple model of how cultures maintain diversity, despite presures on agents (e.g., interpreted as villages) to become more alike when they interact with each other. See Axelrod's chapter 7 book, The Complexity of Cooperation, (Princeton Univ Press, 1996). An allignment and replication of this model, in which the ktour algorithm was used, is described in ``Alligning Simulation Models: A Case Study and Results,'' Axtell, Robert, Axelrod, Robert, Epstein, Joshua, and Cohen, Michael. SFI Working Paper 95-07-065. (This also appeared in volume 1 of The Journal of Computational and Mathematical Organization Theory. The key parameters: worldSize size of world (i.e., length of sides of square world). settable only at the start. numFeatures number of features each agent has values for, e.g., for religion, language, etc. settable only at the start. numTraits number of possible values for each feature. settable only at the start. Each step (ie click of the top level clock) we do one of two ways of activity agents, depending on the value of actMethod Mechanism --------- --------- axelrod pick worldSize^2 agents to be activated pick them uniform randomly, with replacement. ktour knight's tour, as done by Axtell etal, i.e. shuffle the list of agents, and activate each one in that (now random) order, once per step. When an agent is activated, the basic mechanism is: - it picks one of its NEWS neighbors at random. - the probability that the two agents actually interact is set to numFeaturesInCommon / numFeatures. - when they interact, a feature is picked at random, and the value of that feature for the agent is set to the value it has for the other. Note if they happen to be the same on that feature, no change will occur. The sim continues until there are no possible changes left, i.e, each agent is either completely the same or completely different from its neighbors. There is 2D display of the agents in the world, as well as of the differences between neighbors. By default, one sees only the differences between the agents, with grey-scale varying from white for completely different neighbors, to black for identical neighbors. This display can also show the values of single features in the agents by setting the drawAgents variable to values in [1,numFeatures]. Different colors are shown for each trait value at the selected feature. Note: For the display of agents, only works for 15 numTraits max. 0 grey 8 some green 1 red 9 some other green 2 light green 10 3 dark blue 11 4 light blue 12 5 magenta 13 6 yellow 14 7 dark orange 15 There are also display graphs. One graph shows numberInteractions - number of times / t that an agent is able to interact with another (note there may be no change). numberChanges - actual number of feature changes / t numberPossibleChanges - number of edges (agent pairs) that would allow a change (i.e., the agent's have at least one feature but not all features in common). When the number of possible change-interactions is 0, it stops. Another graph shows the number of regions and zones vs time. A region is defined as a contiguous set of cells (agents) who have the exact same culture, i.e., have the same traits for all features. (see p156 of The Complexity Of Cooperation.) A zone is a continguous set of cells that have at least one feature in common with their neighbors (see p 164). You can also probe agents, and see what their feature values are with time, etc., by pressing MB3 (usually the right button) with the mouse over the agent to be probed. The probe shows the instance variables (state) of the agent, including an arbitrary ID value, its traits in binary and ascii, its x,y location and the region and zone numbers it is in. (These numbers have no particular meaning, they are just assigned in order as the number of regions and zones are counted.) Notes: 0. numAgents currently has no effect, as the world is completely filled. 1. It would be nice to have a display of the traits of of all agents in a rectangular grid, as shown in an example in Axelrod's paper. This could be used as an alternative to colors, or it could be printed in the terminal window by pressing a button. 2. It might be nice to display zones and regions, maybe as shades of gray. Ack: This is based on an early version written at SFI (by Nelson Minar and/or Manor Askenazi). Examples: These assume you have a copy of the axelcult program in your working directory. If you do not, you can always run the shared version by replacing "./axelcult" in the examples below with: /users/rlr/SwarmStuff/CSCS-Demos/Axelcult/axelcult To avoid typing all that over and over, remember you can use the arrows in the keypad area of your keyboard to "recall" command you have entered and then change/add to them before re-entering them. (See the intro-To-Unix web page off the CSCS main lab documentation page for more information about command re-entry and other useful tricks.) To run with worldSize=30, numFeatures=10, numTraits=15, and all other parameters at defaults: ./axelcult -DworldSize=30 -Dnf=10 -Dnt=15 After you run it, there will be a file report which contains the initial parameter values, any changes you made, and lines of output data. You can have it write to files of different names, e.g. ./axelcult -DRFN=output -DRN=00 will write to a file output.00 (The RNF is report file name, the RN is report file name suffix). To get a list of all run-time settable parameters and their aliases: ./axelcult -Dh ======================================================================= Updates: July, 1999; July 2000;