Calc_heuristic_distance function

Sorry if it is a stupid question but I have difficulty about how to use some of the functions given in the base class.

If I understood correctly
self.calc_heuristic_distance(node_current.list_paths[-1][-1]) gives the heuristic distance from current node to the goal node
and
self.calc_heuristic_distance(node_current.list_paths[-1][0]) gives the heuristic distance between start node and current node

Am I right? The usage of list_paths is confusing me a little

Hi, not exactly.
The (Priority)Node class has list_paths as its attribute, which is all of the paths (list of states) from start to that node. Let’s say the node is on the third level (or, equivalently, contains three primitives), it then has the following values in its list_paths.
list_paths[0] = [state1 of primitive1, …, state 6 of primitive 1]

list_paths[2] = [state2 of primitive 3, …, state 6 of primitive 3]
(remember that each primitive has 6 states, and upon concatenation their first state is discarded to avoid duplication with the last state of the previous primitive)

Therefore, node_current.list_paths[-1][-1] returns the last state of the last primitive, and node_current.list_paths[0][0] returns the first state of the first primitive (start position).

Additionally, the calc_heuristic_distance function calculates the heuristic cost to the goal. You can easily compute the cost from start to current node by referring to the source code of this function.