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


1 Introduction
2 Aknowledgements
3 License
4 Installation
5 First Steps - A guided tour through CoopSim
6 Comprehensive Overview
7 Advanced Topics
    7.1 Technical notes on the dynamical model
    7.2 Programming user strategies
        7.2.1 Preface
        7.2.2 The Strategy class
    7.3 Defining user setups
8 Further Reading

7.2 Programming user strategies

7.2.1 Preface

There are two ways of adding user strategies to CoopSim: Either by entering them on the User Defined Strategies page when the application is running or by writing them directly to the Strategies.py module of the program code. Since CoopSim is open source software and thus comes with the complete source code you can easily do so. Except for experimenting, the latter method of adding your own strategies directly to the program code is probably the better one, because entering strategies on the User Defined Strategies page is more error prone and can quickly get frustrating. Also, changing the module Strategies.py can be done with a real python editor with syntax highlighting, class browser and other comforts. On the other hand, you should only change Strategies.py if you really know what you are doing, or otherwise CoopSim might not run any more.

t g+ f @