Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.Game.copy_tree#

Game.copy_tree(src: Node | str, dest: Node | str) None#

Copy the subtree rooted at ‘src’ to ‘dest’.

Parameters:
  • src (Node or str) – The root of the source subtree to copy

  • dest (Node or str) – The destination subtree to copy to. dest must be a terminal node.

Raises:
  • MismatchError – If src or dest is not a member of the same game as this node.

  • UndefinedOperationError – If dest is not a terminal node.