Hi Junkyu,
this is expected behavior. Consistent heuristics do not require
reopening because the g value at the time a node is first expanded is
guaranteed to be minimal.
I think the confusion here is about what exactly is meant by
"reopening". The code block you mention is entered whenever we reach a
state on a path that is cheaper than the cheapest path to that state we
have seen previously. But this is only "reopening" *if a node with that
state has already previously been closed*.
Example:
I have states s0 (initial), s1, s2 and transitions s0 -> s1 with cost 1,
s0 -> s2 with cost 3 and s1 -> s2 with cost 1.
Initially, we expand the initial node with state s0 and generate nodes
for the two successors: to s1 with g value 1, and to s2 with g value 3.
Expanding this node closes it, the other two nodes are open.
Next, we expand the node for s1 and see that there is already a node for
the successor s2. We also see that we now have a cheaper path (g value
2) than previously. So we enter the code block you mention above, update
the g value for the node (reusing it for this new, cheaper path), and
push it to the open list again with its new priority. This is not
reopening because the node we're updating wasn't closed.
Does this help?
Best,
Malte