Skip to content

Commit 198113c

Browse files
committed
fix: graphs/greedy_best_first typo
#8764
1 parent cfbbfd9 commit 198113c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: graphs/greedy_best_first.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def calculate_heuristic(self) -> float:
5858
The heuristic here is the Manhattan Distance
5959
Could elaborate to offer more than one choice
6060
"""
61-
dy = abs(self.pos_x - self.goal_x)
62-
dx = abs(self.pos_y - self.goal_y)
61+
dx = abs(self.pos_x - self.goal_x)
62+
dy = abs(self.pos_y - self.goal_y)
6363
return dx + dy
6464

6565
def __lt__(self, other) -> bool:

0 commit comments

Comments
 (0)