CoopSim - A Computer Simulation of the Evolution of Cooperation. User's Manual

 Eckhart Arnold Contents

5 First Steps - A guided tour through CoopSim

5.1 Starting a predefined simulation

After successfully starting CoopSim you should see an application Window like this:

In the beginning the screen is empty, of course. You will notice four notebook pages named: Tournament, Ecological Simulation, Simplex Diagram and User Defined Strategies. The purpose of these pages will be explained later. First, we will just start the simulation Simple Example. This simulation is preselected when the program starts up (you can see which simulation is active and which simulations are available in the Simulation menu), so it is just enough to click the Continue Simulation button to start the simulation. This is the button with the blue arrow pointing to the right. It is the second button from the left in the button row under the menu. After a short time of calculating the result of the tournament should appear on the Tournament page:

The tournament page displays the following information:

1. The strategies that took part in the tournament.

2. Then ranking of the strategies.

3. The outcome of each single match of a pair of strategies as well as the first and last 50 moves of the players, where 0 indicates a defection and a 1 a cooperative move.

4. The ranking of the strategies in the ecological simulation after a certain number of generations.

You can scroll the contents of the text window using the slider on the right side in order to see all the information. As you can see from the tournament log, the simulation Simple Example is a tournament of three strategies only: GRIM, TITFORTAT and RANDOM. Among these three strategies GRIM emerges as the clear winner.

Now, let us have a look at the other notebook pages. Select the page Ecological Simulation in order to view the graph of the ecological simulation. The graph shows the population dynamics of the strategies in the tournament, assuming that the fitness of a strategy is determined by its score in the tournament. It should look like this:

If you wonder how the development is going to continue after the 50th generation (you probably don't when the graph is as simple as in this case, but sometimes it takes more generations until a clear result crystalizes out), you can click on the blue arrow button again to let the simulation continue. You can do this as often as you like. (To go back to the first 50 generations, just restart the simulation from the Simulation menu.)

Now suppose you would like to save the graph (maybe, because you are just about to write a paper on cooperation in the reiterated prisoner's dilemma, for which some graphical illustrations might be useful). You can do so by selecting Save Page As from the Edit menu or by clicking the Save Page button in the toolbar (somewhere in the middle, not to be confused with the Save button which saves the whole setup of simulations!). A dialog box will appear where you can the select a directory and enter a filename for the graph:

This does not only work with the Ecological Simulation page but with all other pages as well. So, whenever you want to save some content you are seeing on the screen, just select Save Page As in the Edit menu and you will be prompted to save the content of the currently selected page. Alternatively, you can select Copy Page in the Edit menu (or click the Copy Page button in the toolbar) to copy the content of the selected page to the clipboard. You can then easily insert the content into another application, say a word processor, by pressing Crtl-V within this application.

Apart from the graph of the ecological simulation, which usually starts with a uniformly distributed population, you may also want to know how the three strategies fare in the ecological simulation when they are given different population shares in the beginning. For three strategies the population dynamics can be visualized as a simplex diagram. (If there are more than three strategies in the simulation then the three strongest strategies are depicted.) On a simplex diagram each point within the simplex represents a certain population distribution. The visualization of the population dynamics looks very similar to a vector field in physics. But, bear in mind that population dynamics is a discrete process, while vector fields in physics are usually continuous. (For a more comprehensive explanation of simplex diagrams, look into the literature on evolutionary game theory, as for example Maynard-Smith's “Evolution and the Theory of Games”). If you select the Simplex Diagram page you should see a picture like this:

The arrows indicate the direction of the “field” (i.e. the direction the population drifts to at a certain point). The length of the arrows indicates the strength of the drift. Big arrows mean a strong drift while small arrows indicate an only slow population drift.