Skip to content

Code to calculate PSNE and Dominant Strategies for a n-player game (very weakly)

Notifications You must be signed in to change notification settings

psahithireddy/GameTheory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

PSNE, Dominant Strategies

Run

  • python3 13.py

About

Given a n-Player Game the code lists all Pure Strategy Nash Equilibria and all Very Weakly Dominant Strategies for each player.

Input Format

The input is a n-Player Game with the payoffs listed in the NFG Format (as described in the Gambit Project).

  • First line contains the number of players n.
  • The second line contains n space-separated numbers, the i th number corresponding to the number of strategies available to the i th player. (S i)
  • The third line contains the list of payoffs in the NFG Format.

Output Format

  • First line should contain the number of PSNE. (n psne )
  • Followed by n psne lines, the i th line containing n space-separated numbers corresponding to the equilibrium strategies for each player respectively.
  • Next, you should output n lines, with the i th line listing the number of very weakly dominant strategies for the i th player followed by the dominant strategies.

Sample

Input 1

2

2 2

-2 -2 -2 -10 -10 -2 -5 -5

Output 1

2

1 1

2 2

1 2

1 2

About

Code to calculate PSNE and Dominant Strategies for a n-player game (very weakly)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages