Nashpy

Nashpy: A Python library for the computation of Nash equilibria - Published in JOSS (2018)

https://github.com/drvinceknight/nashpy

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

algorithm computer-science equilibria game mathematics nash python
Last synced: 4 months ago · JSON representation ·

Repository

A python library for 2 player games.

Basic Info
Statistics
  • Stars: 362
  • Watchers: 10
  • Forks: 70
  • Open Issues: 27
  • Releases: 41
Topics
algorithm computer-science equilibria game mathematics nash python
Created about 9 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

DOI DOI

Join the Game Theory Discord server to chat -- direct invite link.

Nashpy: a python library for 2 player games.

Nashpy is:

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

Mathematician at Cardiff University. Interests include education, stochastic processes and game theory.

JOSS Publication

Nashpy: A Python library for the computation of Nash equilibria
Published
October 10, 2018
Volume 3, Issue 30, Page 904
Authors
Vincent Knight ORCID
Cardiff University, School of Mathematics, UK
James Campbell ORCID
Cardiff University, School of Mathematics, UK
Editor
Lorena A Barba ORCID
Tags
mathematics economics computer science game theory equilbrium

Citation (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:

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.164954.svg)](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

All Time
  • Total Commits: 296
  • Total Committers: 18
  • Avg Commits per committer: 16.444
  • Development Distribution Score (DDS): 0.095
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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.

  • Versions: 40
  • Dependent Packages: 2
  • Dependent Repositories: 38
  • Downloads: 5,418 Last month
Rankings
Dependent repos count: 2.4%
Stargazers count: 3.7%
Average: 5.0%
Forks count: 5.4%
Downloads: 5.9%
Dependent packages count: 7.4%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.18: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 7.3%
Stargazers count: 14.6%
Forks count: 14.7%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.18: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 7.3%
Stargazers count: 14.6%
Forks count: 14.7%
Maintainers (1)
Last synced: 4 months ago
alpine-edge: py3-nashpy-doc

A library for the computation of Nash equilibria in two player games (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.4%
Dependent packages count: 14.7%
Maintainers (1)
Last synced: 4 months ago
alpine-edge: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 11.7%
Dependent packages count: 14.6%
Stargazers count: 16.0%
Forks count: 16.1%
Maintainers (1)
Last synced: 4 months ago
alpine-edge: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 11.8%
Dependent packages count: 14.1%
Forks count: 16.6%
Stargazers count: 16.7%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.16: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 11.1%
Forks count: 11.7%
Average: 12.5%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.17: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 13.5%
Average: 13.7%
Forks count: 14.0%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: nashpy

A library with algorithms on 2 player games. PyPI: [https://pypi.org/project/nashpy](https://pypi.org/project/nashpy)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 21.5%
Forks count: 23.6%
Average: 32.6%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced: 4 months ago
alpine-v3.20: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.22: py3-nashpy-doc

A library for the computation of Nash equilibria in two player games (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.19: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Last synced: 4 months ago
alpine-v3.20: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.21: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.21: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.22: py3-nashpy-pyc

Precompiled Python bytecode for py3-nashpy

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.22: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.21: py3-nashpy-doc

A library for the computation of Nash equilibria in two player games (documentation)

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.19: py3-nashpy

A library for the computation of Nash equilibria in two player games

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/prose.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi