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 oter 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.2.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

pymnash-0.7.2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymnash-0.7.2.tar.gz
  • Upload date:
  • Size: 12.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.2.tar.gz
Algorithm Hash digest
SHA256 2c5fbb515ff333859f44a476c421ccab76b563a8050e988b578bcf28457d8667
MD5 5e415b0d1738a300e8ff7a1df43cbbb6
BLAKE2b-256 eaec01c550349bf489d0e5636f6c295001749082f534002f517d9f1acb122c80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymnash-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08d0ca385b9efe2d7051460a00e064b1ff153ac9b46b00468cff6d8d6411d7ac
MD5 53bbc59f9919a1f7e1fde69812bf03cc
BLAKE2b-256 a736f0b1b6fe65843020fcf303447d830a0bedf9040ba033b037251be7100f85

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