nip.utils.malt_forest.forest.MaltNode

nip.utils.malt_forest.forest.MaltNode#

class nip.utils.malt_forest.forest.MaltNode(env_state: NestedArrayDict, node_hash: int, parent: MaltNode | MaltTree | None = None)[source]#

A node in a MALT tree.

Parameters:
  • env_state (NestedArrayDict) – The state of the environment at this node, which contains all relevant information about the rollout at this timestep.

  • node_hash (int) – The hash of the node, which is used to identify the node in the tree and forest.

  • parent (MaltNode | MaltTree, optional) – The parent node of this node. If not provided, the parent is set to None.

Methods Summary

__init__(env_state, node_hash[, parent])

add_child(child)

Add a child to this node.

Methods

__init__(env_state: NestedArrayDict, node_hash: int, parent: MaltNode | MaltTree | None = None)[source]#
add_child(child: MaltNode)[source]#

Add a child to this node.

Parameters:

child (MaltNode) – The child node to add.