From a1212899b99ec0e85b5ee93577b0dfdd8d64b7a1 Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Sat, 24 Dec 2016 10:58:14 -0800 Subject: [PATCH] Update day24.py --- 2016/day24.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -- 2.51.2