mlpy.search.Node¶
-
class
mlpy.search.
Node
(state, parent=None, action=None, cost=0)[source]¶ Bases:
object
The 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
depth
The depth of the node. g
The path cost. parent
The node’s parent. state
The state associated the node. Methods
expand
(task)Expands a node’s neighbors.