Simulating Evolutionary Games: A Python-Based Introduction
AbstractThis 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.
Download InfoIf you experience problems downloading a file, check if you have the proper application to view it first. In case of further problems read the IDEAS help page. Note that these files are not on the IDEAS site. Please be patient as the files may be large.
Bibliographic InfoArticle provided by Journal of Artificial Societies and Social Simulation in its journal Journal of Artificial Societies and Social Simulation.
Volume (Year): 11 (2008)
Issue (Month): 3 ()
Contact details of provider:
Agent-Based Simulation; Python; Prisoner's Dilemma;
You can help add them by filling out this form.
CitEc Project, subscribe to its RSS feed for this item.
- 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 5.
- Alan G. Isaac, 2009. "The ABM Template Models -- A Reformulation with Reference Implementations," Working Papers 2009-19, American University, Department of Economics.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Nigel Gilbert).
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 references are entirely missing, you can add them using this form.
If the full references list an item that is present in RePEc, but the system did not link 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 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.