/Game-Theory-and-Python

Game Theory and Python, a workshop investigating repeated games using the prisoner's dilemma

Primary LanguageJupyter NotebookMIT LicenseMIT

Game-Theory-and-Python

https://travis-ci.org/Nikoleta-v3/Game-Theory-and-Python.svg?branch=master https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square

This is a repository created to run a workshop on Game Theory using the programming language Python and more specifically an open source software called the Axelrod Python library.

The topics being covered in this workshop are the following:

  1. An introduction to Game theory and the iterated prisoner's dilemma
  2. Creating matches and tournaments using the Axelrod library
  3. Writing strategies and contributing to the Axelrod library
  4. Playing against strategies of the iterated prisoner's dilemma

Installing Python

There are various distributions of Python. I recommend using Anaconda which comes packaged with a variety of tools, such as Jupyter Notebooks.

This tutorial is written in Jupyter Notebooks.

Virtual Environment

This repository comes with an environment.yml file. The environment.yml file will allow you to create an Anaconda environment. To do that use the terminal or an anaconda prompt and after you have navigated to the repository just type:

$ conda env create -f environment.yml

The environment can be activated by typing:

$ conda activate game-python

and notebooks can also run in it. To do that you will have to select (from within a running notebook) Kernel and under Change Kernel select the environment game-python.

Contributions

All contributions are welcome! This may include communicating ideas for new sections, letting us know about bugs, and code contributions.

Events

This tutorial has been used in the following events:

Have you used this tutorial in an event you hosted or participated? Please do let me know by either contacting me or feel free to open a pr adding your event to this list.

License

The code in this repository, including all code samples in the notebooks listed above, is released under the MIT license.