我有一些草稿,但没有一个起作用。
curr_node = start
cost = 0
visited = []
while curr_node != end:
if curr_node not in visited:
visited.append(curr_node)
small, cost = find_small(heuristic, curr_node, edge, cost)
curr_node = small
visited.append(curr_node)
return visited, cost
1条答案
按热度按时间ttcibm8c1#