Skip to main content

Python/JAX-based numerical solvers for dynamic/differential game equilibria

Project description

PYDGENS: Python/JAX Differential Game Equilibria Numerical Solvers

PYDGENS logo

PYDGENS provides numerical solvers for approximating equilibrium solutions in multi-player, general-sum dynamic and differential games. The package currently focuses on linear-quadratic feedback Nash games, iterative linear-quadratic methods for nonlinear games, and augmented-Lagrangian workflows for constrained games.

PYDGENS is a pre-1.0 release. The package is ready for early adopters, but the public API may continue to evolve as the modeling frontend, examples, and solver interfaces mature.

Installation

pip install pydgens

PYDGENS requires Python 3.12 or newer.

Solvers

PYDGENS currently supports three main solver paths:

  • LQ: linear-quadratic, unconstrained games solved for feedback Nash strategies
  • iLQ: nonlinear, unconstrained games solved for local feedback Nash strategies
  • AL: constrained nonlinear games solved with an augmented-Lagrangian workflow for local open-loop trajectories

Examples

Run a minimal linear-quadratic tug-of-war game solved with the LQ solver:

python src/pydgens/examples/tug_o_war.py

Run a nonlinear two-player unicycle game solved with the iterative LQ solver:

python src/pydgens/examples/unicycle.py

Run a constrained two-player integrator game solved with the augmented-Lagrangian solver:

python src/pydgens/examples/constrained_integrators.py

More examples live in src/pydgens/examples/.

Documentation

Documentation is available at https://mit-ll.github.io/pydgens/.

Development

For development from a local clone:

pip install -e .[full]

Contributors can also use uv for a reproducible environment:

uv sync --extra dev
source .venv/bin/activate

Testing

Quick tests:

pytest tests/ -v -s -m "not slow"

Slow and benchmark-oriented tests:

pytest tests/ -v -m "slow" --benchmark-columns='mean, min, max, stddev, rounds'

Disclaimer

DISTRIBUTION STATEMENT A. Approved for public release. Distribution is unlimited.

This material is based upon work supported by the Under Secretary of War for Research and Engineering under Air Force Contract No. FA8702-15-D-0001 or FA8702-25-D-B002. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Under Secretary of War for Research and Engineering.

© 2026 Massachusetts Institute of Technology.

Subject to FAR52.227-11 Patent Rights - Ownership by the contractor (May 2014)

SPDX-License-Identifier: MIT

The software/firmware is provided to you on an As-Is basis.

Delivered to the U.S. Government with Unlimited Rights, as defined in DFARS Part 252.227-7013 or 7014 (Feb 2014). Notwithstanding any copyright notice, U.S. Government rights in this work are defined by DFARS 252.227-7013 or DFARS 252.227-7014 as detailed above. Use of this work other than as specifically authorized by the U.S. Government may violate any copyrights that exist in this work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydgens-0.6.1.tar.gz (206.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydgens-0.6.1-py3-none-any.whl (145.9 kB view details)

Uploaded Python 3

File details

Details for the file pydgens-0.6.1.tar.gz.

File metadata

  • Download URL: pydgens-0.6.1.tar.gz
  • Upload date:
  • Size: 206.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydgens-0.6.1.tar.gz
Algorithm Hash digest
SHA256 ee694a749ea32e6e6294bf5d5423b041eab9f2e7b06bb85dd14e8c03f5c08a91
MD5 ab6ae9877d1294e4c31ce2f43a28f59d
BLAKE2b-256 68a8e8b332ad30b3af0e3ed7bdb3ac27dde3794654145cc997643650c08373a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydgens-0.6.1.tar.gz:

Publisher: publish.yml on mit-ll/pydgens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydgens-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: pydgens-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 145.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pydgens-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd649fcdaa5ed4ef49e80f853fdb0522b16c20fcae23f75b7e7545c40a48eb33
MD5 ca66283da09ca7f3a7a8c04de42bb19e
BLAKE2b-256 8884c4285533d4a6d6638adb7dd9fd96464f94fabc3beb3243bc78c6388fe920

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydgens-0.6.1-py3-none-any.whl:

Publisher: publish.yml on mit-ll/pydgens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page