pip install margingame
This package is mainly for just one class, Initialise(...)
.
You can:
- Pass in non-default parameters for a custom game.
- Get attributes, notably payoff matrices as Pandas dataframes.
- Use the method to calculate the Nash equilibria.
See the code, notably Initialise.py, for more info.
- In a .ipynb file, run the code `from margingame.notebook.visualise import visualise`.
- Install any missing packages flagged by an error if there are any (this is due to a bug).
- Run `visualise()`.
- You can click the left margin of the output cell to expand/truncate it.
- Changing the domains of the payoff matrices is achieved by passing the relevant arguments into `visualise`.
- It's slow, I know.
- Run the code `from margingame.Initialise import Initialise'.
- Create your game with `Game = Initialise(...)', specifying any non-default parameters desired.
- Calculate the nash equlibria via support enumeration via `Game.calculate_equilibria_support_enum()`.