Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.Node#

class pygambit.gambit.Node#

A node in a Game.

Methods

append_move(player[, actions])

Add a move to a terminal node, at the Infoset infoset.

copy_tree(node)

Copies the subtree rooted at this node to node.

delete_parent()

Deletes the parent node of this node, and all subtrees rooted in the parent other than the one containing this node.

delete_tree()

Deletes the entire subtree rooted at this node.

insert_move(player[, actions])

Insert a move at a node, at the Infoset infoset.

is_successor_of(node)

Returns whether this node is a successor of node.

move_tree(node)

Moves the subtree rooted at this node to node.

Attributes

children

The set of children of this node.

game

Gets the Game to which the node belongs.

infoset

The information set to which this node belongs.

is_subgame_root

Returns whether the node is the root of a proper subgame.

is_terminal

Returns whether this is a terminal node of the game.

label

The text label associated with the node.

next_sibling

The node which is immediately after this one in its parent's children.

outcome

Returns the outcome attached to the node.

parent

The parent of this node.

player

The player who makes the decision at this node.

prior_action

The action which leads to this node.

prior_sibling

The node which is immediately before this one in its parent's children.