{"id":23229491,"url":"https://github.com/nikoleta-v3/game-theory-and-python","last_synced_at":"2025-08-19T15:31:16.632Z","repository":{"id":43642492,"uuid":"82167113","full_name":"Nikoleta-v3/Game-Theory-and-Python","owner":"Nikoleta-v3","description":"Game Theory and Python, a workshop investigating repeated games using the prisoner's dilemma","archived":false,"fork":false,"pushed_at":"2025-07-24T02:22:57.000Z","size":175,"stargazers_count":188,"open_issues_count":2,"forks_count":66,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-24T04:30:02.368Z","etag":null,"topics":["axelrod-python-library","game-theory","ipd","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nikoleta-v3.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.txt","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-16T10:08:47.000Z","updated_at":"2025-07-24T02:23:02.000Z","dependencies_parsed_at":"2025-07-24T03:18:51.323Z","dependency_job_id":"28fc4cfb-8736-4e7c-bba9-ec04ff21da93","html_url":"https://github.com/Nikoleta-v3/Game-Theory-and-Python","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Nikoleta-v3/Game-Theory-and-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikoleta-v3%2FGame-Theory-and-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikoleta-v3%2FGame-Theory-and-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikoleta-v3%2FGame-Theory-and-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikoleta-v3%2FGame-Theory-and-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nikoleta-v3","download_url":"https://codeload.github.com/Nikoleta-v3/Game-Theory-and-Python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikoleta-v3%2FGame-Theory-and-Python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271176204,"owners_count":24712348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axelrod-python-library","game-theory","ipd","python"],"created_at":"2024-12-19T01:18:15.744Z","updated_at":"2025-08-19T15:31:16.368Z","avatar_url":"https://github.com/Nikoleta-v3.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"Game-Theory-and-Python\n----------------------\n\n.. image:: https://jose.theoj.org/papers/10.21105/jose.00078/status.svg\n   :target: https://doi.org/10.21105/jose.00078\n\n.. image:: https://img.shields.io/github/license/Naereen/StrapDown.js.svg\n   :target: https://github.com/Nikoleta-v3/Game-Theory-and-Python/master/LICENSE\n\n.. image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n    :target: http://makeapullrequest.com\n\n.. image:: https://img.shields.io/github/workflow/status/Nikoleta-v3/Game-Theory-and-Python/ci\n\n\nThis is a repository created to run a workshop on Game Theory using\nthe programming language `Python \u003chttps://www.python.org/\u003e`_ and more specifically\nan open-source software called the `Axelrod Python library \u003chttps://github.com/Axelrod-Python/Axelrod\u003e`_.\n\nThe topics being covered in this workshop are the following:\n\n1. `An introduction to game theory and the Iterated Prisoner's Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb\u003e`_\n2. `Creating matches and tournaments using Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb\u003e`_\n3. `Writing strategies and contributing to Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb\u003e`_\n4. `Playing against strategies of the Iterated Prisoner's Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb\u003e`_\n\nInstalling Python\n-----------------\n\nThere are various distributions of Python. I recommend using `Anaconda \u003cwww.continuum.io/downloads\u003e`_\nwhich comes packaged with a variety of tools, such as Jupyter Notebooks.\n\nThis tutorial is written in `Jupyter Notebooks \u003chttp://jupyter.org/\u003e`_.\n\nVirtual Environment\n-------------------\n\nThis repository comes with an `environment.yml` file. The `environment.yml` file\nwill allow you to create an Anaconda environment. To do that use the terminal or\nan anaconda prompt and after you have navigated to the repository just type::\n\n$ conda env create -f environment.yml\n\n\nThe environment can be activated by typing::\n\n$ conda activate game-python\n\n\nand notebooks can also run in it. To do that you will have to select (from within\na running notebook) `Kernel` and under `Change Kernel` select the environment\n`game-python`.\n\nUsage\n-----\n\nThe tutorial :code:`Game Theory and Python` can be used in a workshop environment or\nthrough independent learning.\n\n**Workshop:** The material have been designed for a 2 hours workshop.\n\nSuggested timetable:\n\n- 0:00 - 0:15 Installation (guidelines are given above)\n- 0:15 - 0:30 `An introduction to game theory and the Iterated Prisoner's\n  Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb\u003e`_\n- 0:30 - 0:55 `Creating matches and\n  tournaments using Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb\u003e`_\n- 0:55 - 1:20 `Writing strategies and contributing to Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb\u003e`_\n- 1:20 - 1:50 `Playing against strategies of the Iterated Prisoner's Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb\u003e`_\n- 1:50 - 2:00 Closing remarks and wrapping up\n\nIn a workshop\nenvironment we suggest that the instructor has familiarized themselves with the\nwritten parts of the tutorial beforehand. For each notebook it is advised that\nthe instructor gives a mini presentation to the topic followed by them typing\nout/running the material while the participants follow in their own machines.\nThe instructor should encourage the participants to try the exercises of each\nnotebook alone or with other participants. Before moving to the next notebook\nthe instructor should encourage a discussion amongst everyone regarding the\nresults of the exercises each had and their interpretation.\n\n**Independent Learning:** An independent learner should aim to spend 2 hour on the material.\n\nSuggested timetable:\n\n- 0:00 - 0:15 Installation (guidelines are given above)\n- 0:15 - 0:30 `An introduction to game theory and the Iterated Prisoner's\n  Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb\u003e`_\n- 0:30 - 1:00 `Creating matches and\n  tournaments using Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb\u003e`_\n- 1:00 - 1:30 `Writing strategies and contributing to Axelrod-Python \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb\u003e`_\n- 1:30 - 2:00 `Playing against strategies of the Iterated Prisoner's Dilemma \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb\u003e`_\n\nIf the tutorial is being followed by an\nindividual learner, we suggest that the learner reads the written parts of\neach notebook followed by running the tutorial and completing the exercises.\nThe individual should take some time to reflect on the results of each\nnotebook and their interpretation.\n\nContributions\n-------------\n\nAll contributions are welcome! This may include communicating ideas for new sections,\nletting us know about bugs, and code contributions.\n\nEvents\n------\n\nThis tutorial has been used in the following events:\n\n- `PyCon Namibia 2017 \u003chttps://na.pycon.org/pycon-namibia-2017/\u003e`_\n\nHave you used this tutorial in an event you hosted or participated? Please do let\nme know by either contacting `me \u003chttps://nikoleta-v3.github.io/\u003e`_ or feel free to\nopen a `pr` adding your event to this list.\n\nLicense\n-------\n\nThe code in this repository, including all code samples in the notebooks listed above,\nis released under the `MIT license \u003chttps://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/LICENSE.txt\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoleta-v3%2Fgame-theory-and-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikoleta-v3%2Fgame-theory-and-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoleta-v3%2Fgame-theory-and-python/lists"}