Common Lisp Package: MICMAC.GAME-THEORY

Game theory.

README:

FUNCTION

Public

FIND-NASH-EQUILIBRIUM (PAYOFF &KEY (N-ITERATIONS 100))

Find a Nash equilibrium and for a zero-sum game represented by PAYOFF matrix (a 2d matrix or a nested list). PAYOFF is from the point of view of the row player: the player who choses column wants to minimize, the row player wants to maximize. The first value returned is a vector of unnormalized probabilities assigned to each action of the row player, the second value is the same for the column player and the third is the expected payoff of the row player in the nash equilibrium represented by the oddment vectors.

Private

EXTREMUM (VECTOR PRED &KEY (START 0) (END (LENGTH VECTOR)))

Find the first extreme value of the [START,END) subsequence of VECTOR and return it along with its index. The extremum is what would be the first element of VECTOR sorted by SORT with PRED.

Undocumented

LIST-TO-2D-MATRIX (LIST)