From 544c5276d582f2de94c422a1c128cb15e7647dfc Mon Sep 17 00:00:00 2001 From: korzepadawid Date: Tue, 12 Apr 2022 00:05:47 +0200 Subject: [PATCH] feat: added a_star method --- algorithms/a_star.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/algorithms/a_star.py b/algorithms/a_star.py index 0d3ba5f..c657c1e 100644 --- a/algorithms/a_star.py +++ b/algorithms/a_star.py @@ -145,3 +145,7 @@ def h(state: State, 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""" 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 []