so A-star adds + heuristics() to
% Dijkstra
while not frontier.empty():
current = frontier.get()
if current == goal:
break
for next in graph.neighbors(current):
new_cost = cost_so_far[current] + graph.cost(current, next)
if next not in cost_so_far or new_cost < cost_so_far[next]:
cost_so_far[next] = new_cost
priority = new_cost
frontier.put(next, priority)
came_from[next] = current
So Dijkstra adds the priority to breadth-first
%Breadth-first
while not frontier.empty():
current = frontier.get()
if current == goal:
break
for next in graph.neighbors(current):
if next not in came_from:
frontier.put(next)
came_from[next] = current
So with first-come, first put strategy. That would mean to take the first from the openSet in line 1314, not the element with the element with the lowest score.