Skip to main content

Find Nash Equilibria of Multiplayer Games

Project description

This module contains functionality for finding Nash Equilibria of multi-player (more than 2 player) games.
Because the number of possibilities that need to be checked explodes as the number of players increases,
it reallyonly works for games with a relatively small number of players.

In order to find the Nash Equilibrium for a game, first feed in the payoff profile of the game as a numpy
tensor. There is one dimension for each player, with the length along that dimension being the number of
possible actions for that player, plus one more dimension with a length equal to the number of players.

Once that is created, one can ask if a given strategy profile is a Nash Equilibrim, search for Nash Equilibria with
a given support, or try to find all Nash Equilibria. You can also check to see if a strategy is dominated by
some other strategey or by a linear combination of two strategies.

This module uses the awesome power of Sympy to solve systems of equations. Sympy will even find general solutions
such as a player plays action 0 with probability 0, action 1 with probability p,
and action 2 with probability 1 - p.

This package is intended more for students of game theory than for the practical value of finding Nash Equilibria,
I'm not at all sure they have any practical value. One observation you will make after playing around with this
is that for some multiplayer games, once some players have decided on a course of action it doesn't matter
what the other players do.

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

pymnash-0.7.3.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

pymnash-0.7.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file pymnash-0.7.3.tar.gz.

File metadata

  • Download URL: pymnash-0.7.3.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pymnash-0.7.3.tar.gz
Algorithm Hash digest
SHA256 087affc10209974048cfce20e73a974e4c80e3cd51d749a7cdad2d32793f17f3
MD5 59dbdcd66d1e4c8c9e4f6624888ea0a0
BLAKE2b-256 2f0e86a7985a998737a9ed520bf14e86a2baefa3e1d45549dd5dc00279f8d4a2

See more details on using hashes here.

File details

Details for the file pymnash-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: pymnash-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pymnash-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cf90e92281e129c5291be101e81fad56d68af087136c1a2ee0218ffda30939f1
MD5 b98d36a5fb8bd4cfad87c0c54db3b31d
BLAKE2b-256 ea6691cbe8dd3e70be186327f46e7cf04edeb949dcb20015482ae31741525a20

See more details on using hashes here.

Supported by

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