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. 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. 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.
    6. 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.
    7. Tackseung Jun & Rajiv Sethi, 2008. "Neighborhood structure and the evolution of cooperation," Journal of Evolutionary Economics, Springer, vol. 18(1), pages 103-103, February.
    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. 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.
    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. 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. 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. 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).
    4. Spagano, Salvatore, 2021. "Generalized Darwinism: An Auxiliary Hypothesis," MPRA Paper 108829, University Library of Munich, Germany.
    5. Bauer, Johannes M., 2014. "Platforms, systems competition, and innovation: Reassessing the foundations of communications policy," Telecommunications Policy, Elsevier, vol. 38(8), pages 662-673.
    6. 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.
    7. 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.
    8. 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.
    9. 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.
    10. 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.
    11. Stephan, Michael, 2013. "Theorien der Industrieevolution," Discussion Papers on Strategy and Innovation 13-03, Philipps-University Marburg, Department of Technology and Innovation Management (TIM).
    12. 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.
    13. J. Barkley Rosser & Marina V. Rosser, 2017. "Complexity and institutional evolution," Evolutionary and Institutional Economics Review, Springer, vol. 14(2), pages 415-430, December.
    14. 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.
    15. Nooteboom Bart, 2014. "In What Sense do Firms Evolve?," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 234(2-3), pages 185-209, April.
    16. Boyer, Tristan & Jonard, Nicolas, 2014. "Imitation and efficient contagion," Journal of Economic Behavior & Organization, Elsevier, vol. 100(C), pages 20-32.
    17. Ludo Waltman & Nees Eck & Rommert Dekker & Uzay Kaymak, 2013. "An Evolutionary Model of Price Competition Among Spatially Distributed Firms," Computational Economics, Springer;Society for Computational Economics, vol. 42(4), pages 373-391, December.
    18. Hokky Situngkir & Yun Hariadi & Rio Siagian & Sidik Permana & Catur Budi Santoso, 2004. "Sociological Strategies In Indonesian Mining Site: The Prisoner Dilemma Approach," Game Theory and Information 0405005, University Library of Munich, Germany.
    19. Thomas Grebel, 2011. "Innovation and Health," Books, Edward Elgar Publishing, number 14375.
    20. Martin Henning & Maureen McKelvey, 2020. "Knowledge, entrepreneurship and regional transformation: contributing to the Schumpeterian and evolutionary perspective on the relationships between them," Small Business Economics, Springer, vol. 54(2), pages 495-501, February.

    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.