a_star #21

Merged
s464961 merged 15 commits from a_star into master 2022-04-27 19:50:51 +02:00
Showing only changes of commit 019b3c86be - Show all commits

View File

@ -45,11 +45,16 @@ class Node:
return hash(self.state) return hash(self.state)
def child_node(action: Action) -> Node: def expand(node: Node) -> List[Node]:
pass return [child_node(node=node, action=action) for action in actions(node.state)]
def actions(state: State) -> List[str]: def child_node(node: Node, action: Action) -> Node:
next_state = result(state=node.state, action=action)
return Node(state=next_state, parent=node, action=action)
def actions(state: State) -> List[Action]:
pass pass