pygambit.gambit.Game.get_infosets#
- Game.get_infosets(player: str) list[History]#
Returns a snapshot of the information sets belonging to the personal player player: the decisions at which that player chooses an action.
One representative member’s History is returned per information set, in the order the information sets are encountered in the pre-order depth first traversal of the game tree. This is a materialized snapshot, not a live view: it reflects the game’s state at the moment of the call, and does not change if the game is subsequently mutated.
- Parameters:
player (str) – The label of the personal player whose information sets to return.
- Returns:
list of History – The History of one representative member per information set belonging to player.
.. versionadded:: 17.0.0
- Raises:
UndefinedOperationError – If the game does not have a tree representation.
KeyError – If no player in the game has label player; the chance player has no label reachable this way – use get_events for its events.
ValueError – If player is an empty string or all whitespace.
