a_star #21
@ -145,3 +145,7 @@ def h(state: State, goal: Tuple[int, int]) -> int:
|
|||||||
def f(current_node: Node, goal: Tuple[int, int]) -> int:
|
def f(current_node: Node, goal: Tuple[int, int]) -> int:
|
||||||
"""f(n) = g(n) + h(n), g stands for current cost, h for heuristics"""
|
"""f(n) = g(n) + h(n), g stands for current cost, h for heuristics"""
|
||||||
return current_node.cost + h(state=current_node.state, goal=goal)
|
return current_node.cost + h(state=current_node.state, goal=goal)
|
||||||
|
|
||||||
|
|
||||||
|
def a_star(state: State, grid: List[List[str]], goals: List[Tuple[int, int]]) -> List[str]:
|
||||||
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user