pygambit.gambit.Game.get_events#

Game.get_events() list[History]#

Returns a snapshot of the chance player’s events: the points of exogenous randomness, each with a probability distribution over its actions.

One representative member’s History is returned per event, in the order the events 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.

Returns:

  • list of History – The History of one representative member per event.

  • .. versionadded:: 17.0.0

Raises:

UndefinedOperationError – If the game does not have a tree representation.