Nashpy is:
Full documentation is available here: http://nashpy.readthedocs.io/
$ python -m pip install nashpy
To install Nashpy on Fedora, use:
$ dnf install python3-nashpy
Create bi matrix games by passing two 2 dimensional arrays/lists:
>>> 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])
Clone the repository and create a virtual environment:
$ git clone https://github.com/drvinceknight/nashpy.git
$ cd nashpy
$ python -m venv env
Activate the virtual environment and install tox
:
$ source env/bin/activate
$ python -m pip install tox
Make modifications.
To run the tests:
$ python -m tox
To build the documentation. First install the software which also installs the documentation build requirements.
$ python -m pip install flit
$ python -m flit install --symlink
Then:
$ cd docs
$ make html
Full contribution documentation is available at https://nashpy.readthedocs.io/en/latest/contributing/index.html
Pull requests are welcome.
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/