A-Lounsbury / pysimultaneous

A class for handling simultaneous games with any number of players
0 stars 0 forks source link

Decide whether to store the players' payoffs in one payoff matrix or have one payoff matrix for each player #4

Open A-Lounsbury opened 5 months ago

A-Lounsbury commented 5 months ago

Decide whether to store all players’ payoffs together, or have a numPlayers-long list of lists of matrices, one list of matrices for each player. File pysimultanous.py is currently the former. The latter would rid us of the need for linked lists because each entry in each matrix would be a single payoff, but I don't know how beneficial that would be.

It is sort of the case that the main reason I wonder if the latter would be beneficial is that that's how nashpy does it.

A-Lounsbury commented 5 months ago

I emailed Vince Knight, creator of nashpy and axelrod, asking what the benefit of separate payoffs was. His response was

The main benefit from a mathematical point of view is that the linear algebra works better.

For example: linear algebraic calculation of expected utilities.

The bi-matrix notation is a way of showing both utility functions at once.