All Projects → drvinceknight → Nashpy

drvinceknight / Nashpy

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nashpy

Data Science Masters
Self-study plan to achieve mastery in data science
Stars: ✭ 179 (+9.15%)
Mutual labels:  algorithm, computer-science, mathematics
C Plus Plus
Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
Stars: ✭ 17,151 (+10357.93%)
Mutual labels:  algorithm, computer-science, mathematics
Learn Something Every Day
📝 A compilation of everything that I learn; Computer Science, Software Development, Engineering, Math, and Coding in General. Read the rendered results here ->
Stars: ✭ 362 (+120.73%)
Mutual labels:  algorithm, computer-science, mathematics
Funmath
☔️ Implementations of mathematical functions, formulas and concepts
Stars: ✭ 93 (-43.29%)
Mutual labels:  algorithm, mathematics
Snake
Artificial intelligence for the Snake game.
Stars: ✭ 1,241 (+656.71%)
Mutual labels:  algorithm, game
C
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
Stars: ✭ 11,897 (+7154.27%)
Mutual labels:  computer-science, mathematics
Math Advanced Data Structures And Algorithms
Math, Advanced Data Structures & Algorithms - Please check before use
Stars: ✭ 40 (-75.61%)
Mutual labels:  algorithm, mathematics
Leetcode
LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)
Stars: ✭ 45,650 (+27735.37%)
Mutual labels:  algorithm, computer-science
Algorithms
A collection of algorithms and data structures
Stars: ✭ 11,553 (+6944.51%)
Mutual labels:  algorithm, mathematics
Swarmz
A free, header-only C++ swarming (flocking) library for real-time applications
Stars: ✭ 108 (-34.15%)
Mutual labels:  algorithm, game
Data structure and algorithms library
A collection of classical algorithms and data-structures implementation in C++ for coding interview and competitive programming
Stars: ✭ 133 (-18.9%)
Mutual labels:  algorithm, mathematics
Algorithms Cheatsheet Resources
🤓All the geeky stuffs you need to know at one place!
Stars: ✭ 60 (-63.41%)
Mutual labels:  algorithm, computer-science
Dll hook Rs
Rust code to show how hooking in rust with a dll works.
Stars: ✭ 57 (-65.24%)
Mutual labels:  computer-science, game
Sortingalgorithm.hayateshiki
Hayate-Shiki is an improved merge sort algorithm with the goal of "faster than quick sort".
Stars: ✭ 84 (-48.78%)
Mutual labels:  algorithm, computer-science
Algo Explorer
Android app for learning algorithms in Computer Science
Stars: ✭ 49 (-70.12%)
Mutual labels:  algorithm, computer-science
Javascript
A repository for All algorithms implemented in Javascript (for educational purposes only)
Stars: ✭ 16,117 (+9727.44%)
Mutual labels:  algorithm, mathematics
Thealgorithms
Algorithms repository.
Stars: ✭ 122 (-25.61%)
Mutual labels:  algorithm, computer-science
Awesome Machine Learning Deep Learning Mathematics
A curated list of mathematics documents ,Concepts, Study Materials , Algorithms and Codes available across the internet for machine learning and deep learning
Stars: ✭ 138 (-15.85%)
Mutual labels:  algorithm, mathematics
Analysissummary
Vorlesung Analysis für Informatiker WS16/17 an der TUM
Stars: ✭ 10 (-93.9%)
Mutual labels:  computer-science, mathematics
Constant Vigilance
Learn this if you want to be a software engineer. Constant vigilance means being continually aware of areas that need improvement. For me, I am constantly searching for valuable resources to ensure I am able to solve any problem that comes my way.
Stars: ✭ 30 (-81.71%)
Mutual labels:  algorithm, computer-science

DOI Join the chat at https://gitter.im/Nashpy/Lobby DOI

Nashpy: a python library for the computation of equilibria of 2 player strategic games.

This library implements the following algorithms for Nash equilibria on 2 player games:

  • Support enumeration
  • Best response polytope vertex enumeration
  • Lemke Howson algorithm

Nashpy has a simple set of Python dependencies: it only requires numpy and scipy so is straightforward to install on all operating systems.

Installation

By design Nashpy is easy to install: the easiest way to install is from pypi:

$ python -m pip install nashpy

Usage

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])

Documentation

Full documentation is available here: http://nashpy.readthedocs.io/

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

To install a development version of this library:

$ python setup.py develop

To run the full test suite (install pytest: pip install pytest) and run:

$ pytest .

All contributions are welcome, although this is meant to be a simple library, for more detailed game theoretic contribution please see gambit.

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/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].