Complexity of Cooperation Web Site

Tipping.doc


Note: The source code for the programs is in HTML format. To get a plain ASCII text copy of the code, you can either save the page as "text" (and strip off the extraneous text in the header and footer) or save as "source" or "HTML" and extract the text between the <pre> and </pre> tags.
Robert Axelrod, Dec. 22, 1995

Documentation of Schelling Tipping Model

These are notes on Axelrod's version of Schelling's Tipping Model. They were written for the Pascal program, but also apply to the Basic program.

VERSION 1.

Differences from Schelling's published model:

1. Individuals is activated in the same order over and over (actor 1, actor 2,..actor N, actor 1...) Since the first k actors are all the same color and the rest are the other color, this is like one of Schelling's method "let the dimes move first, and then the pennies" (p 148m). But persumably Schelling didn't move specific dines in the same order each time.

2. A discontent individual moves to a random empty location, rather than the nearest empty location that meets his/her demands.

Representation.

The map is represented as vector of 64 locations. The occupant of each location is given as a number, and 0 means the cell. empty.,

The color of each actor is 0 for white, and 1 for black. The actors with low numbers are white, and the actors with high numbers are black. (For example, with N=40 actors, and proportion_white =0.50, actors 1-20 are white, and 21-40 are black).

The location of each actor is a number from 1 to 64. (Note that this is redundant information, since the occupant of each location is also recorded. The redundancy is convenient.)

An event is an activation of an actor, chosen at random (with replacement). An event will result in no change if the activated actor is content. The number of events in a run is event_max.

The immediate neighbors of a given cell in the map is given by neigh_loc(L, j) where L is the cell's location, and j is the neighbor number. j=1 is the neighbor to the northwest, j=2 is the neighbor to the north, etc. For example, cell 64 is in the southwest corner, and neigh_loc(64,2) = 56 since cell 56 is directly north of cell 64. If the neighbor is off the board, the value of neigh_loc(L,j) is 0. For example, neigh_loc(1,2)=0 since the cell north of the northwest corner is off the board.

The random_seed is given as a constant so that a run can be repeated.

Dynamics.

An actor is activated in order (actor 1, actor 2,..actor N, actor 1...).

If the actor is not content, it moves to a random empty location. An actor is content if more than 1/3 of its neighbors are the same color.

Input.

See constants in the source code.

Output

The event number is followed by the map, showing which agent occupies each cell. The colors can be inferred from the actor number (see color above).

VERSION 2. Same as version 1, except:

Representation

The random seed can be specified or calculated from the system clock. If the constant old_random_seed is not 0, then its value is used as the random seed. This is useful for repeating a run (e.g. to report at different intervals). If it is 0, then a new random seed is caculated from the system clock.

Output

More labels are provided.

Along side the map showing where each agent is, there is a map showing the "color" at each location.

Reports are made only periodically, as controlled by constants events_per_report and number_of_reports.


Back to Appendix B
Back to Complexity of Cooperation Home Page

University of Michigan Center for the Study of Complex Systems
Contact cscs@umich.edu.
Revised November 4, 1996.