pygambit.gambit.Game.append_infoset#

Game.append_infoset(nodes: Selector | GroupedSelector, infoset: Selector) None#

Add a move at terminal nodes, joining the information set that the node identified by infoset belongs to.

nodes is a Selector (an H-built expression, evaluated against this game and treated as a flat set of nodes) or a GroupedSelector (an H-built .by(…) expression, whose groups are pooled together – every resolved node joins the same infoset regardless of grouping).

infoset is a Selector that must resolve to exactly one node; that node must belong to a personal player and must not be terminal – the information set it currently belongs to is the one joined.

Changed in version 17.0.0: nodes is now a Selector or GroupedSelector, and infoset is now a Selector identifying a node by the information set it belongs to, rather than a Node or str reference to an Infoset/Event directly. Joining an existing chance event is no longer supported here.

Parameters:
  • nodes (Selector or GroupedSelector) – The nonempty set of terminal nodes at which to add the move.

  • infoset (Selector) – A Selector resolving to a single node of the personal player’s information set to join.

Raises:
  • TypeError – If nodes is not a Selector or GroupedSelector, or infoset is not a Selector.

  • UndefinedOperationError – If any element in nodes is not a terminal node, or infoset resolves to a terminal node or to a chance node.

  • ValueError – If nodes has duplicated elements, or is empty; or if infoset does not resolve to exactly one node.