IDEAS home Printed from https://ideas.repec.org/a/jas/jasssj/2008-8-2.html
   My bibliography  Save this article

Simulating Evolutionary Games: A Python-Based Introduction

Author

Abstract

This paper is an introduction to agent-based simulation using the Python programming language. The core objective of the paper is to enable students, teachers, and researchers immediately to begin social-science simulation projects in a general purpose programming language. This objective is facilitated by design features of the Python programming language, which we very briefly discuss. The paper has a 'tutorial' component, in that it is enablement-focused and therefore strongly application-oriented. As our illustrative application, we choose a classic agent-based simulation model: the evolutionary iterated prisoner's dilemma. We show how to simulate the iterated prisoner's dilemma with code that is simple and readable yet flexible and easily extensible. Despite the simplicity of the code, it constitutes a useful and easily extended simulation toolkit. We offer three examples of this extensibility: we explore the classic result that topology matters for evolutionary outcomes, we show how player type evolution is affected by payoff cardinality, and we show that strategy evaluation procedures can affect strategy persistence. Social science students and instructors should find that this paper provides adequate background to immediately begin their own simulation projects. Social science researchers will additionally be able to compare the simplicity, readability, and extensibility of the Python code with comparable simulations in other languages.

Suggested Citation

  • Alan G. Isaac, 2008. "Simulating Evolutionary Games: A Python-Based Introduction," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 11(3), pages 1-8.
  • Handle: RePEc:jas:jasssj:2008-8-2
    as

    Download full text from publisher

    File URL: http://jasss.soc.surrey.ac.uk/11/3/8/8.pdf
    Download Restriction: no

    References listed on IDEAS

    as
    1. van Bragt, David & van Kemenade, Cees & la Poutre, Han, 2001. "The Influence of Evolutionary Selection Schemes on the Iterated Prisoner's Dilemma," Computational Economics, Springer;Society for Computational Economics, vol. 17(2-3), pages 253-263, June.
    2. Michael D. Cohen & Rick L. Riolo & Robert Axelrod, 1999. "The Emergence of Social Organization in the Prisoner's Dilemma: How Context-Preservation and Other Factors Promote Cooperation," Working Papers 99-01-002, Santa Fe Institute.
    3. Hodgson, Geoffrey M. & Knudsen, Thorbjorn, 2006. "Why we need a generalized Darwinism, and why generalized Darwinism is not enough," Journal of Economic Behavior & Organization, Elsevier, vol. 61(1), pages 1-19, September.
    4. David McFadzean & Deron Stewart & Leigh Tesfatsion, 2000. "A Computational Laboratory for Evolutionary Trade Networks," Computational Economics 0004004, EconWPA.
    5. Tackseung Jun & Rajiv Sethi, 2007. "Neighborhood structure and the evolution of cooperation," Journal of Evolutionary Economics, Springer, vol. 17(5), pages 623-646, October.
    6. László Gulyás & Tamás Kozsik & John B. Corliss, 1999. "The Multi-Agent Modelling Language and the Model Design Interface," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 2(3), pages 1-8.
    7. Miles Parker, 2001. "What is Ascape and Why Should You Care?," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 4(1), pages 1-5.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Alan G. Isaac, 2011. "The ABM Template Models: A Reformulation with Reference Implementations," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 14(2), pages 1-5.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jas:jasssj:2008-8-2. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Flaminio Squazzoni). General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.