pygambit.gambit.Game.insert_infoset#

Game.insert_infoset(node: Selector, infoset: Selector) None#

Insert a move in the information set or event that the node identified by infoset belongs to, prior to the node identified by node. The node becomes the first child of the newly-inserted node.

node and infoset are each a Selector (an H-built expression, evaluated against this game) that must resolve to exactly one node.

Changed in version 17.0.0: node is now a Selector; a Node or str is no longer accepted directly – build one with H.

Changed in version 17.0.0: infoset is now a Selector identifying a node by the information set or event it belongs to, rather than a Node or str reference to an Infoset/Event directly.

Raises:
  • TypeError – If node or infoset is not a Selector.

  • ValueError – If node or infoset does not resolve to exactly one node, or if the node identified by infoset belongs to no information set or event (it is terminal).