1 min readJul 3, 2018
Hi, I had a quick question (or 2) regarding the code here.
# Child is already in the open list
for open_node in open_list:
if child == open_node and child.g > open_node.g:
continue
In this snippet, i wanted to know that what exactly is the point of
child.g > open_node.g?
Also. Shouldn’t child.g = child.parent.g + 1 do the trick instead of child.g = current_node.g + 1