Parser For gambit And lrs Nash Equilibria#

class sage.game_theory.parser.Parser(raw_string)[source]#

Bases: object

A class for parsing the outputs of different algorithms called in other software packages.

Two parsers are included, one for the 'lrs' algorithm and another for the 'LCP' algorithm.

format_gambit(gambit_game)[source]#

Parses the output of gambit so as to return vectors corresponding to equilibria obtained using the LCP algorithm.

format_lrs(legacy_format=False)[source]#

Parses the output of lrs so as to return vectors corresponding to equilibria.