PROG1
def aStarAlgo(start_node, stop_node): open_set = set([start_node]) closed_set = set() g = {} parents = {} g[start_node] = 0 parents[start_node] = start_node while len(open_set) > 0: n = None for v in open_set: if n is None or g[v] + heuristic(v) < g[n] + heuristic(n): n = v if n == stop_node or Graph_nodes[n] is None: pass else: for (m, weight) in get_neighbors(n): if m not in open_set and m not in closed_set: open_set.add(m) ...