pygambit.gambit.Game.get_minimal_subgame#
- Game.get_minimal_subgame(history: Selector) History#
Returns the History of the root of the smallest subgame containing the information set or event that the node identified by history belongs to.
history is a Selector (an H-built expression, evaluated against this game) that must resolve to exactly one node.
Added in version 16.7.0.
Changed in version 17.0.0: Renamed from minimal_subgame. history (formerly infoset) is now a Selector; a Node or str is no longer accepted directly – build one with H. Returns the History of the subgame’s root, instead of a Subgame object.
- Parameters:
history (Selector) – A Selector resolving to a single node belonging to the information set or event to query.
- Returns:
The History of the root of the smallest subgame containing the information set or event that history belongs to.
- Return type:
- Raises:
TypeError – If history is not a Selector.
UndefinedOperationError – If the game does not have a tree representation.
ValueError – If history does not resolve to exactly one node, or belongs to no information set or event (it is terminal).
