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: https://www.jasss.org/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. 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. 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.
    4. Tackseung Jun & Rajiv Sethi, 2008. "Neighborhood structure and the evolution of cooperation," Journal of Evolutionary Economics, Springer, vol. 18(1), pages 103-103, February.
    5. 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.
    6. 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.
    7. 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.
    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.
    2. 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.
    3. 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.

    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. Tackseung Jun & Rajiv Sethi, 2009. "Reciprocity in evolving social networks," Journal of Evolutionary Economics, Springer, vol. 19(3), pages 379-396, June.
    2. 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.
    3. Spagano, Salvatore, 2021. "Generalized Darwinism: An Auxiliary Hypothesis," MPRA Paper 108829, University Library of Munich, Germany.
    4. 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.
    5. 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.
    6. 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.
    7. 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.
    8. Stephan, Michael, 2013. "Theorien der Industrieevolution," Discussion Papers on Strategy and Innovation 13-03, Philipps-University Marburg, Department of Technology and Innovation Management (TIM).
    9. Guido Buenstorf, 2008. "Comparative Industrial Evolution and the Quest for an Evolutionary Theory of Market Dynamics," Chapters, in: Hardy Hanappi & Wolfram Elsner (ed.), Advances in Evolutionary Institutional Economics, chapter 3, pages 59-78, Edward Elgar Publishing.
    10. J. Barkley Rosser & Marina V. Rosser, 2017. "Complexity and institutional evolution," Evolutionary and Institutional Economics Review, Springer, vol. 14(2), pages 415-430, December.
    11. Thomas Grebel, 2011. "Innovation and Health," Books, Edward Elgar Publishing, number 14375.
    12. Bilancini, Ennio & Boncinelli, Leonardo, 2009. "The co-evolution of cooperation and defection under local interaction and endogenous network formation," Journal of Economic Behavior & Organization, Elsevier, vol. 70(1-2), pages 186-195, May.
    13. Jan Schnellenbach, 2015. "Does classical liberalism imply an evolutionary approach to policy-making?," Journal of Bioeconomics, Springer, vol. 17(1), pages 53-70, April.
    14. Eduardo Fernández-Huerga & Ana Pardo & Ana Salvador, 2023. "Compatibility and complementarity between institutional and post-Keynesian economics: a literature review with a particular focus on methodology," Economia Politica: Journal of Analytical and Institutional Economics, Springer;Fondazione Edison, vol. 40(2), pages 413-443, July.
    15. A. Madureira & F. Hartog & N. Baken, 2016. "A holonic framework to understand and apply information processes in evolutionary economics: survey and proposal," Netnomics, Springer, vol. 17(2), pages 157-190, September.
    16. Agnes Festre & Eric Nasica, 2009. "Schumpeter on money, banking and finance: an institutionalist perspective," The European Journal of the History of Economic Thought, Taylor & Francis Journals, vol. 16(2), pages 325-356.
    17. M.G. Zimmermann, V. M. Eguiluz, 2001. "Evolution of Cooperative Networks and the Emergence of Leadership," Computing in Economics and Finance 2001 171, Society for Computational Economics.
    18. Alp Eren Yurtseven & Mehmet Teoman Pamukçu, 2022. "Innovation patterns in firms and intra-industry heterogeneity empirical evidence from Turkey," Evolutionary and Institutional Economics Review, Springer, vol. 19(2), pages 645-679, September.
    19. Boyer, Tristan & Jonard, Nicolas, 2014. "Imitation and efficient contagion," Journal of Economic Behavior & Organization, Elsevier, vol. 100(C), pages 20-32.
    20. George E. Halkos & Kyriaki D. Tsilika, 2016. "Trading Structures for Regional Economies in CAS Software," Computational Economics, Springer;Society for Computational Economics, vol. 48(3), pages 523-533, October.

    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.