Complexity of Cooperation Web Site

Landscape_Theory.readme


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.
READ THIS FILE FIRST!!

Readme file v1.0, 1/3/92

This is the file "Landscape_Theory.readme" on the distribution disk for the "Alliance_Sim" family of programs, which implement Robert Axelrod's Landscape Theory. This file and the other contents of the distribution disk were prepared by Scott Bennett in December, 1991, and updated in May, 1992.

The computer code used to implement Landscape Theory was written on an Apple Macintosh IIx computer using Symantec Corporation's THINK Pascal, v3.0 and 4.0.

We suggest that if you have not already done so that you read the main article outlining the theory behind Landscape Theory, "A Landscape Theory of Aggregation," published in the British Journal of Political Science, April 93. which is contained in Microsoft Word format in the file "LANDSCAPE.BJPS.DOC" inside the "Papers" folder on this disk.

This disk contains the Alliance_Sim and Propensity_Maker programs which are used to run the Landscape Theory simulation, a Word 4 document with styles to aid in formatting Alliance_Sim output, complete program documentation, the relevant papers (to date) which develop Landscape Theory, the data used in the tests of Landscape Theory presented in those papers, and Pascal source code for the Alliance_Sim and Propensity_Maker programs.

This work was supported by the National Science Foundation under grants SES 8808459 and SES 9106371.

Contents of this file:

This file is divided into several sections:

1. Overview

2. Disk Contents

3. Requirements for running Alliance_Sim on your machine

4. How to run Alliance_Sim on your computer

5. About the Authors

1. Overview

Running the programs used to generate the results found in the papers on Landscape Theory requires several steps. The program "Alliance_Sim" takes as input a propensity file, which contains in it data on the relevant actors, their sizes, and their pairwise propensities. The name Alliance_Sim stands for Alliance Simulation, originating from the development of the international alliances case. Alliance_Sim processes this file, creates the energy landscape, and prints out the results in an output file. Alliance_Sim v3.13 is the current version as of 12/10/91, and remains current as of this date.

The propensity file can be created by hand, and it was in the business alliances case, but the program "Propensity_Maker" can be used to process a raw data file consisting of country attributes to produce a propensity file. This method was used for the 1985 and WW2 examples.

Every run of Alliance_Sim generates a unique sequential number to differentiate that run from others that have been performed. These numbers are incremented by 1 with each run, and are stored in the run number file. Alliance_Sim also records important summary information about each run in a file in the history file, information such as the date, time, and number of the run, along with the summary comment lines entered by the user in the input file.

2. Disk Contents

Folder File Description

Main Folder

Landscape_Theory.readme This file.

Alliance_Sim v3.13 Main program, v3.13 of Alliance_Sim, used to run the Pre-WW2, 1985, and business alliance examples presented in the papers.

Sim_Run_Number_File Sample Run_Number file which numbers all simulation runs you perform (see Alliance_Sim documentation for full details).

Sim_History_File Sample History file which keeps track of important information about all simulation runs you perform (see Alliance_Sim documentation for full details).

Alliance_Sim_Style.doc Word 4 styles helpful in formatting Alliance_Sim output files (see Alliance_Sim documentation for full details).

Alliance_Sim Documentation

Alliance_Sim.12/10/91.v3.13.doc Complete main program documentation.

Propensity_Maker.10/12/91.doc Complete documentation on all versions of Propensity_Maker, raw data processing programs.

Papers

Landscape.BJPS.doc Main Landscape Theory paper submitted to the American Political Science Review.

Landscape.JEBO.doc Landscape Theory paper applied to the business alliances case, submitted to the Journal of Economic and Business Organization.

THINK Pascal Source Code

Alliance_Sim_Type_Unit Source code, part 1, of Alliance_Sim.

Alliance_Sim_Calc_Unit Source code, part 2, of Alliance_Sim.

Alliance_Sim_Output_Unit Source code, part 3, of Alliance_Sim.

Alliance_Sim_Main_Unit Source code, part 4, of Alliance_Sim.

Propensity_Maker_v3.32 Source code, Propensity_Maker v3.32.

Propensity_Maker_v3.12 Source code, Propensity_Maker v3.11.

Business Alliances Test

A_Sim.Unix.9firm.prop Propensity file for UNIX business alliance case (there is no raw data file).

A_Sim.Unix.9firm.out Output file from UNIX business alliance case run.

Post-German Reunification Test

Prop_Maker_v3.11 Propensity_Maker program, v3.11, application used to create propensity files from 1985 data files.

A_Sim.1985.post-unify.Raw Raw data for 1985 Alliance_Sim run.

A_Sim.1985.post-unify.Prop Propensity file for 1985 run.

A_Sim.1985.post-unify.Out Output file from 1985 run.

Pre-WW2 Tests

Prop_Maker_v3.32 Propensity_Maker program, v3.32 application used to create propensity files from Pre-WW2 data files.

A_Sim.1936.Raw Raw data for 1936 Alliance_Sim run.

A_Sim.1936.Prop Propensity file for 1936 run.

A_Sim.1936.Out Output file from 1936 run.

A_Sim.1937.Raw Raw data for 1937 Alliance_Sim run.

A_Sim.1937.Prop Propensity file for 1937 run.

A_Sim.1937.Out Output file from 1937 run.

A_Sim.1938.Raw Raw data for 1938 Alliance_Sim run.

A_Sim.1938.Prop Propensity file for 1938 run.

A_Sim.1938.Out Output file from 1938 run.

A_Sim.1939.Raw Raw data for 1939 Alliance_Sim run.

A_Sim.1939.Prop Propensity file for 1939 run.

A_Sim.1939.Out Output file from 1939 run.

3. Requirements to run Alliance_Sim on your machine

You will need a Macintosh with 3300 free K of memory. The program code has been optimized for a 68881 coprocessor.

On a Macintosh IIx, a run of the compiled application for 16 actors takes about 25 minutes. Running the program within the THINK Pascal debugging environment takes about one and a half hours. On a Macintosh Quadra 700, a run of the compiled application for 16 actors takes about 5 minutes.

The program is quite sensitive to improper input files. If you type in the wrong filename as input, the program will kick you back out to the finder. Bad input within the input file will crash the program and possibly the machine as well. The input specifications are laid out in the documentation, but we recommend that to run any of your own examples you duplicate one of the existing data files and make changes to it as needed rather than starting from scratch.

4. How to run Alliance_Sim on your computer

1. Copy the contents of the disk to a folder on your hard disk. The easiest way to do this is to just drag the icon for the 3 1/2 inch disk onto the hard drive desktop. This will create a folder on the hard disk and copy all of the files from the floppy into it. If you want to run the program from the floppy instead, just unlock the disk.

2. If you want to (optional), change the integer in the run number file to a number to designate the first of your tests. Example: if you change the number to 100, the first test you run will be labeled run number 101.

3. If you want to (optional), modify this history file and take out the sample history messages contained in it.

4. If you will be running Propensity_Maker on a raw data file, you should check in the raw data file: 1) the comment lines, which you should change or add on to reflect your modifications; 2) the path to the run number and history files. If you will be running the Alliance_Sim program from the same folder as that where the run number and history file reside (recommended), then this path should be correct, containing just the name of those files. The raw data file must be saved as TEXT ONLY.

5. If you are running Propensity_Maker on a raw data file, make sure that you use the right version of the program. v3.12 is appropriate for the 1985 case or your modifications of it, which has data on the EEC. v3.32 is appropriate for the Pre-WW2 cases, which have democracy coded.

6. To run Propensity_Maker, the Prop_Maker program and the raw data file must be in the same folder. Double click on Prop_Maker, and the program will prompt you for an input file name (the raw data file) and output file name (this will be the propensity file). The program will then create and save the propensity file in the same folder as whatever file name you typed. As Propensity_Maker runs, some output (the propensity * size matrix) will scroll by on the screen. When the program ends, this output will disappear. Don't worry, it's all saved in the propensity file.

7. If you will be running Alliance_Sim on a propensity file which you create or change, you should check the following in the propensity file: 1) the comment lines, which you should change or add on to reflect your modifications; 2) the path to the run number and history files. If you will be running the Alliance_Sim program from the same folder as that where the run number and history file reside (recommended), then this path should be correct, containing just the name of those files. The propensity file must be saved as TEXT ONLY.

8. To run Alliance_Sim, the Alliance_Sim program and the propensity file must be in the same folder. Double click on Alliance_Sim, and the program will prompt you for an input file name (the propensity file) and output file name (this will be the output file). The program will then create and save the program output in the same folder as whatever output file name you typed. The output is a flat text file which can be opened in Word or another word processor. As Alliance_Sim runs, some output will scroll by on the screen. When the program ends, this output will disappear. Don't worry, it's all in the output file.

9. To make formatting of the program output easier, the file "Alliance_Sim_Styles.doc" contains several styles for Microsoft Word which you can apply to sections of the output file to make them readable. The use of these styles is described at length in the Alliance_Sim documentation.

5. Using the Pascal Source Code:

Alliance_Sim consists of four units. If you plan on compiling the code in THINK Pascal yourself, the proper build order for them, from top to bottom, is: Alliance_Sim_Type_Unit, Alliance_Sim_Calc_Unit, Alliance_Sim_Output_Unit, Alliance_Sim_Main_Unit. You will have to put them in separate segments to get around THINK Pascal's 32K per segment memory limit. The sections of the program as divided into the units is as follows:

Alliance_Sim_Type_Unit: Type declarations, and common top-level procedures used by other parts of the program further along.

Alliance_Sim_Calc_Unit: The main Landscape calculations - frustration and energy - are here.

Alliance_Sim_Output_Unit: Output of information to file and screen.

Alliance_Sim_Main_Unit: Main program loop, and program input section.

Two versions of the Propensity_Maker raw data processing program are included. v3.12 is appropriate for the 1985 case, while v3.32 is appropriate for the Pre-WW2 cases. Details in the differences between the two versions are given in the Propensity_Maker documentation.

The code for the two versions of Propensity_Maker are stand alone and can be compiled individually.

6. About the Authors:

The Landscape Theory of Aggregation was developed by Professor Robert Axelrod of the Political Science department and the Institute for Public Policy Studies at the University of Michigan. The Pascal computer code implementing programs for testing Landscape Theory was written by Scott Bennett of the Political Science Department.

Robert Axelrod

409 Lorch Hall, University of Michigan, Ann Arbor, MI 48109-1220

E-mail, "Robert_Axelrod@umichum" or "Robert_Axelrod@um.cc.umich.edu"

Scott Bennett, c/o Robert Axelrod

409 Lorch Hall, University of Michigan, Ann Arbor, MI 48109-1220

E-mail, "Scott_Bennett@umichum" or "Scott_Bennett@um.cc.umich.edu"


Back to Chapter 4
Back to Chapter 5
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.