nashpy
A library with algorithms on 2 player games.
Decision gist · record as of 2026-08-14
Yes, if you work with two-player game theory. Nashpy has low install friction, permissive licensing, no known vulnerabilities, and comprehensive algorithm coverage with good documentation. The aging maintenance status (281 days since last release) is a minor concern for a stable library but worth monitoring if you need active development or bug fixes.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with a pure-Python wheel and four standard scientific dependencies (numpy, scipy, networkx, deprecated).
- Last release was 281 days ago; the repository is active but aging.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute Nashpy freely in commercial and private projects with minimal restrictions.
last release 2025-11-06 (281 days) · last repo commit 2025-11-13 · 378 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,603,610 downloads/mo, #2,562 on PyPI
Alternatives
Verify before relying
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)- Whether the library scales efficiently to larger game matrices or more complex strategy spaces.
- Performance characteristics of different equilibrium-finding algorithms on realistic game sizes.
- Whether Moran process and replicator dynamics implementations are suitable for research-grade analysis.
What it is and what it does
Nashpy is a Python library for analyzing two-player strategic games. It implements a range of algorithms to find Nash equilibria—the stable strategy profiles where neither player can improve by unilaterally changing their strategy—and to simulate evolutionary dynamics like fictitious play and replicator dynamics. The library is built on numpy, scipy, and networkx, making it suitable for both teaching game theory and conducting research.
You define a game by providing two payoff matrices (one for each player), then call methods to compute equilibria or run simulations. The library includes support enumeration, vertex enumeration, the Lemke-Howson algorithm, fictitious play variants, replicator dynamics with and without mutation, Moran processes on interaction and replication graphs, and introspection dynamics. It is well-documented with both theory and how-to guides.
Use it for
- Teaching game theory: use the documented algorithms and examples to illustrate Nash equilibria and strategic reasoning.
- Computing equilibria in two-player games: solve for mixed and pure strategy equilibria in bimatrix games.
- Simulating evolutionary game dynamics: model population-level strategy evolution using replicator dynamics or Moran processes.
- Analyzing repeated games: generate and analyze games derived from repeated interactions.
- Research in game-theoretic modeling: implement custom game-theoretic analyses with built-in algorithm support.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with two-player game theory.
Nashpy has low install friction, permissive licensing, no known vulnerabilities, and comprehensive algorithm coverage with good documentation. The aging maintenance status (281 days since last release) is a minor concern for a stable library but worth monitoring if you need active development or bug fixes.
Install
nashpy on PyPI
Before you install
Low install friction with a pure-Python wheel and four standard scientific dependencies (numpy, scipy, networkx, deprecated). Last release was 281 days ago; the repository is active but aging.
Requires Python 3.10 or later.
License in practice
MIT license (permissive) means you can use, modify, and distribute Nashpy freely in commercial and private projects with minimal restrictions.
Quickstart
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)
Verify before relying
- Whether the library scales efficiently to larger game matrices or more complex strategy spaces.
- Performance characteristics of different equilibrium-finding algorithms on realistic game sizes.
- Whether Moran process and replicator dynamics implementations are suitable for research-grade analysis.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpyscipynetworkxdeprecated |
| Maintenance | Aging 281 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,603,610 / month, #2,562 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT License |
Evidence: nashpy-0.0.43-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “nash equilibrium solver”
- nashpyNashpy computes Nash equilibria and simulates strategic interactions…
- canteraCantera is a suite of tools for chemical kinetics, thermodynamics,…
- chemicalsRetrieves and calculates chemical properties and constants for over…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also open-spiel · glicko2 · trueskill · quantecon · chess · ale-py · pymunk · kaggle-environments · openskill