Base Game¶
A collection of base game classes.
- Classes:
ExtensiveFormGame
NormalFormGame
- class imperfecto.games.game.ExtensiveFormGame(players)[source]¶
Bases:
abc.ABC
Abstract class for extensive form games.
In an extensive form game, players have some private information, and are unsure about the true state of the world.
Note
ExtensiveFormGame
subclass must have class-level attributeactions
, andn_players
.- actions¶
The actions of the game (class-level attribute).
- Type
enum.EnumMeta
- actions: enum.EnumMeta¶
- property players: Sequence[imperfecto.algos.player.Player]¶
The players of the game.
- abstract get_active_player(history)[source]¶
Get the active player of the game at the current decision point.
- abstract get_payoffs(history)[source]¶
Return the payoff for each player at the current node.
Note
history must be a terminal node.
- abstract get_infostate(history)[source]¶
Return the infostate (i.e. the information set) of the game.
- class imperfecto.games.game.NormalFormGame(players)[source]¶
Bases:
imperfecto.games.game.ExtensiveFormGame
,abc.ABC
N-player normal form game.
This class of game is a special form of extensive-form games. A normal form game involves every player making simultaneous moves. Thus, they are unsure about each other’s move.