Nashpy
Nashpy: A Python library for the computation of Nash equilibria - Published in JOSS (2018)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
2 of 18 committers (11.1%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
A python library for 2 player games.
Basic Info
- Host: GitHub
- Owner: drvinceknight
- License: mit
- Language: Python
- Default Branch: main
- Homepage: http://nashpy.readthedocs.io
- Size: 3.36 MB
Statistics
- Stars: 362
- Watchers: 10
- Forks: 70
- Open Issues: 27
- Releases: 41
Topics
Metadata Files
README.md
Join the Game Theory Discord server to chat -- direct invite link.
Nashpy: a python library for 2 player games.
Nashpy is:
- An excellently documented library:
- The Nashpy game theory text book aims to be a course text on the background theory.
- The contributor documentation aims to be a text on research software development and help first time open source software contributions.
- A state of the art developed code base which aims to use the best of available tools to ensure the code is correct, readable and robust.
- Feature rich, the following are implemented:
- Support enumeration How to docs 🐍 - Theory docs 📘
- Vertex enumeration How to docs 🐍 - Theory docs 📘
- Lemke-Howson algorithm How to docs 🐍 - Theory docs 📘
- Fictitious play How to docs 🐍 - Theory docs 📘
- Stochastic fictitious play How to docs 🐍 - Theory docs 📘
- Replicator dynamics How to docs 🐍 - Theory docs 📘
- Replicator-mutation dynamics How to docs 🐍 - Theory docs 📘
- Asymmetric replicator dynamics How to docs 🐍 - Theory docs 📘
- Moran processes How to docs 🐍
- Generate games from repeated games How to docs 🐍 - Theory docs 📘
- Moran processes on interaction graphs How to docs 🐍
- Moran processes on replication graphs How to docs 🐍
Documentation
Full documentation is available here: http://nashpy.readthedocs.io/
Installation
bash
$ python -m pip install nashpy
To install Nashpy on Fedora, use:
sh
$ dnf install python3-nashpy
Usage
Create bi matrix games by passing two 2 dimensional arrays/lists:
```python
import nashpy as nash A = [[1, 2], [3, 0]] B = [[0, 2], [3, 1]] game = nash.Game(A, B) for eq in game.support_enumeration(): ... print(eq) (array([1., 0.]), array([0., 1.])) (array([0., 1.]), array([1., 0.])) (array([0.5, 0.5]), array([0.5, 0.5])) game[[0, 1], [1, 0]] array([3, 3])
```
Other game theoretic software
- Gambit is a library with a python api and support for more algorithms and more than 2 player games.
- Game theory explorer a web interface to gambit useful for teaching.
- Axelrod a research library aimed at the study of the Iterated Prisoners dilemma
Development
Clone the repository and create a virtual environment:
```bash $ git clone https://github.com/drvinceknight/nashpy.git $ cd nashpy $ python -m venv env
```
Activate the virtual environment and install tox:
```bash $ source env/bin/activate $ python -m pip install tox
```
Make modifications.
To run the tests:
```bash $ python -m tox
```
To build the documentation. First install the software which also installs the documentation build requirements.
bash
$ python -m pip install flit
$ python -m flit install --symlink
Then:
bash
$ cd docs
$ make html
Full contribution documentation is available at https://nashpy.readthedocs.io/en/latest/contributing/index.html
Pull requests are welcome.
Code of conduct
In the interest of fostering an open and welcoming environment, all contributors, maintainers and users are expected to abide by the Python code of conduct: https://www.python.org/psf/codeofconduct/
Owner
- Name: Vince Knight
- Login: drvinceknight
- Kind: user
- Location: Cardiff, UK
- Company: Cardiff University, School of Mathematics
- Website: https://fosstodon.org/@vinceknight
- Repositories: 266
- Profile: https://github.com/drvinceknight
Mathematician at Cardiff University. Interests include education, stochastic processes and game theory.
JOSS Publication
Nashpy: A Python library for the computation of Nash equilibria
Authors
Tags
mathematics economics computer science game theory equilbriumCitation (CITATION.md)
Please use the following to cite the latest version of the Nashpy library::
```
@misc{nashpyproject,
author = {{ {The Nashpy project developers} }},
title = {Nashpy: <RELEASE TITLE>},
month = <MONTH>,
year = <YEAR>,
doi = {<DOI INFORMATION>},
url = {http://dx.doi.org/10.5281/zenodo.<DOI NUMBER>}
}
```
To check the details (RELEASE TITLE, DOI INFORMATION and DOI NUMBER) please view
the Zenodo page for the project. Click on the badge/link below:
[](https://doi.org/10.5281/zenodo.164954)
GitHub Events
Total
- Watch event: 26
- Push event: 1
- Pull request event: 1
- Fork event: 3
- Create event: 1
Last Year
- Watch event: 26
- Push event: 1
- Pull request event: 1
- Fork event: 3
- Create event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Vince Knight | v****t@g****m | 268 |
| katiemcgoldrick | 7****k | 4 |
| Michalis Panayides | P****M@c****k | 4 |
| Yujie Wang | 8****k | 3 |
| Amarjit Singh Gaba | a****a@g****m | 2 |
| tokheim | a****o@g****m | 2 |
| Iztok Fister Jr | i****k@i****u | 2 |
| Alexander Konovalov | a****v | 1 |
| Emiel Steegh | 3****h | 1 |
| James Campbell | j****l@t****k | 1 |
| Nikoleta Glynatsi | g****i@e****e | 1 |
| Philippe Rivière | f****l@r****t | 1 |
| Ria Baldevia | 3****a | 1 |
| Robert Szeto | r****o@h****k | 1 |
| Sandeep Shenoy | 1****y | 1 |
| arwheel | 1****l | 1 |
| newaijj | 3****j | 1 |
| volume-on-max | 1****x | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 32
- Total pull requests: 95
- Average time to close issues: 9 months
- Average time to close pull requests: 13 days
- Total issue authors: 12
- Total pull request authors: 17
- Average comments per issue: 0.97
- Average comments per pull request: 0.31
- Merged pull requests: 86
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 5 minutes
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- drvinceknight (21)
- lk-kit (1)
- COMoER (1)
- lolokoko28 (1)
- B0RIS15 (1)
- dudeymopster (1)
- MichalisPanayides (1)
- devdell (1)
- bradley-code-again (1)
- louisabraham (1)
- eliphatfs (1)
- asinghgaba (1)
Pull Request Authors
- drvinceknight (71)
- L30bigdick (6)
- firefly-cpp (2)
- emielsteegh (2)
- robert-szeto (2)
- sandeepvshenoy (2)
- tokheim (2)
- GeorgeBPaul (2)
- foolil101 (2)
- MichalisPanayides (2)
- asinghgaba (1)
- arwheel (1)
- katiemcgoldrick (1)
- Nikoleta-v3 (1)
- volume-on-max (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 19
-
Total downloads:
- pypi 5,418 last-month
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 38
(may contain duplicates) - Total versions: 76
- Total maintainers: 2
pypi.org: nashpy
A library with algorithms on 2 player games.
- Homepage: https://github.com/drvinceknight/Nashpy
- Documentation: https://nashpy.readthedocs.io/
- License: MIT License
-
Latest release: 0.0.41
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.37-r1
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.37-r1
published over 2 years ago
Rankings
Maintainers (1)
alpine-edge: py3-nashpy-doc
A library for the computation of Nash equilibria in two player games (documentation)
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-edge: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-edge: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.16: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.32-r0
published over 3 years ago
Rankings
Maintainers (1)
alpine-v3.17: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.35-r0
published about 3 years ago
Rankings
Maintainers (1)
conda-forge.org: nashpy
A library with algorithms on 2 player games. PyPI: [https://pypi.org/project/nashpy](https://pypi.org/project/nashpy)
- Homepage: https://vknight.org
- License: MIT
-
Latest release: 0.0.35
published over 3 years ago
Rankings
alpine-v3.20: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r1
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.22: py3-nashpy-doc
A library for the computation of Nash equilibria in two player games (documentation)
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.40-r1
published about 2 years ago
alpine-v3.20: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r1
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.22: py3-nashpy-pyc
Precompiled Python bytecode for py3-nashpy
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.22: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-nashpy-doc
A library for the computation of Nash equilibria in two player games (documentation)
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.41-r2
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-nashpy
A library for the computation of Nash equilibria in two player games
- Homepage: https://github.com/drvinceknight/Nashpy
- License: MIT
-
Latest release: 0.0.40-r1
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v2 composite
- actions/setup-node v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
