IDEAS home Printed from https://ideas.repec.org/a/jas/jasssj/2008-8-2.html

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: https://www.jasss.org/11/3/8/8.pdf
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. 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.
    2. McFadzean, David & Stewart, Deron & Tesfatsion, Leigh, 2000. "A Computational Laboratory for Evolutionary Trade Network," ISU General Staff Papers 200008010700001051, Iowa State University, Department of Economics.
    3. 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.
    4. 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.
    5. Tackseung Jun & Rajiv Sethi, 2008. "Neighborhood structure and the evolution of cooperation," Journal of Evolutionary Economics, Springer, vol. 18(1), pages 103-103, February.
    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. 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.
    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. Vinícius Ferraz & Thomas Pitz, 2024. "Analyzing the Impact of Strategic Behavior in an Evolutionary Learning Model Using a Genetic Algorithm," Computational Economics, Springer;Society for Computational Economics, vol. 63(2), pages 437-475, February.
    2. 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.
    3. Sebastian Krapohl & Václav Ocelík & Dawid M. Walentek, 2021. "The instability of globalization: applying evolutionary game theory to global trade cooperation," Public Choice, Springer, vol. 188(1), pages 31-51, July.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Cynthia Nikolai & Gregory Madey, 2009. "Tools of the Trade: A Survey of Various Agent Based Modeling Platforms," Journal of Artificial Societies and Social Simulation, Journal of Artificial Societies and Social Simulation, vol. 12(2), pages 1-2.
    2. Tackseung Jun & Rajiv Sethi, 2009. "Reciprocity in evolving social networks," Journal of Evolutionary Economics, Springer, vol. 19(3), pages 379-396, June.
    3. Givanni Bonfani & Marco Villani, 2013. "Exaptation in innovation processes: theory and models," Chapters, in: Anna Grandori (ed.), Handbook of Economic Organization, chapter 10, Edward Elgar Publishing.
    4. Slowak, André P., 2009. "Market fields structure & dynamics in industrial automation," FZID Discussion Papers 02-2009, University of Hohenheim, Center for Research on Innovation and Services (FZID).
    5. Spagano, Salvatore, 2021. "Generalized Darwinism: An Auxiliary Hypothesis," MPRA Paper 108829, University Library of Munich, Germany.
    6. Sylvie Geisendorf, 2009. "The economic concept of evolution: self-organization or Universal Darwinism?," Journal of Economic Methodology, Taylor & Francis Journals, vol. 16(4), pages 377-391.
    7. Bauer, Johannes M., 2014. "Platforms, systems competition, and innovation: Reassessing the foundations of communications policy," Telecommunications Policy, Elsevier, vol. 38(8), pages 662-673.
    8. Marletto, Gerardo, 2011. "Structure, agency and change in the car regime. A review of the literature," European Transport \ Trasporti Europei, ISTIEE, Institute for the Study of Transport within the European Economic Integration, issue 47, pages 71-88.
    9. George Liagouras, 2016. "From Heterodox Political Economy to Generalized Darwinism," Review of Radical Political Economics, Union for Radical Political Economics, vol. 48(3), pages 467-484, September.
    10. Muñoz, Félix-Fernando & Encinar, María-Isabel & Cañibano, Carolina, 2011. "On the role of intentionality in evolutionary economic change," Structural Change and Economic Dynamics, Elsevier, vol. 22(3), pages 193-203, September.
    11. Mark Pingle and Leigh Tesfatsion, 2001. "Unemployment Insurance and the Evolution of Worker-Employer\n Cooperation: Experiments with Real and Artificial Agents," Computing in Economics and Finance 2001 279, Society for Computational Economics.
    12. J. W. Stoelhorst, 2010. "The firm as a Darwin machine: How Generalized Darwinism can further the development of an evolutionary theory of economic growth," Papers on Economics and Evolution 2010-19, Philipps University Marburg, Department of Geography.
    13. Ríos-Núñez, Sandra M. & Coq-Huelva, Daniel & García-Trujillo, Roberto, 2013. "The Spanish livestock model: A coevolutionary analysis," Ecological Economics, Elsevier, vol. 93(C), pages 342-350.
    14. Geoffrey Hodgson & Thorbjørn Knudsen, 2006. "The nature and units of social selection," Journal of Evolutionary Economics, Springer, vol. 16(5), pages 477-489, December.
    15. Mario Coccia, 2019. "Technological Parasitism," Papers 1901.09073, arXiv.org.
    16. Stephan, Michael, 2013. "Theorien der Industrieevolution," Discussion Papers on Strategy and Innovation 13-03, Philipps-University Marburg, Department of Technology and Innovation Management (TIM).
    17. J. Barkley Rosser & Marina V. Rosser, 2017. "Complexity and institutional evolution," Evolutionary and Institutional Economics Review, Springer, vol. 14(2), pages 415-430, December.
    18. Sutee Anantsuksomsri & Nij Tontisirin, 2016. "A spatial agent-based model of a congestion game: evolutionary game theory in space," The Annals of Regional Science, Springer;Western Regional Science Association, vol. 57(2), pages 371-391, November.
    19. Cristiano Antonelli, 2011. "The Economic Complexity of Technological Change: Knowledge Interaction and Path Dependence," Chapters, in: Cristiano Antonelli (ed.), Handbook on the Economic Complexity of Technological Change, chapter 1, Edward Elgar Publishing.
    20. Su, Tong-Yaa, 2016. "Competition between Firms in Economic Evolution: Its Characteristics and Differences to the Biological Sphere," MPRA Paper 72756, University Library of Munich, Germany.

    More about this item

    Keywords

    ;
    ;
    ;

    Statistics

    Access and download statistics

    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.

    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 bibliographic 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.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Francesco Renzini (email available below). General contact details of provider: .

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

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.