mlpy.search.Node¶
-
class
mlpy.search.Node(state, parent=None, action=None, cost=0)[source]¶ Bases:
objectThe node class.
The node within the graph that is being built while searching for the optimal path
Parameters: state : int or tuple[int]
The state.
parent : Node
The parent node.
action : str
The action performed in the state.
cost : float
The path cost to the state.
Attributes
depthThe depth of the node. gThe path cost. parentThe node’s parent. stateThe state associated the node. Methods
expand(task)Expands a node’s neighbors.