diff --git a/2016/day24.py b/2016/day24.py index 3ca7fa3..87d6464 100644 --- a/2016/day24.py +++ b/2016/day24.py @@ -30,12 +30,10 @@ def a_star(grid, start, goal): already seen is valid so long as h(n) is admissible. """ - frontier = [] + frontier = [(0, start)] seen = set() cost_to = {start: 0} # this is g(n) - heapq.heappush(frontier, (0, start)) - while frontier: _priority, (x, y) = heapq.heappop(frontier)