The following code in LandmarkCountHeuristic::compute_heuristic is wrong:
if (!use_preferred_operators || h == 0) { // no (need for) helpful actions,
return
return h;
}
The intent of the "h == 0" test is to skip computing preferred operators if
we're already at the goal, but in domains with zero-cost operators, h == 0
doesn't imply that we're at the goal.
One way to fix this would be to test if we're at the goal; maybe a cleaner way
would be to adapt the following code so that it works whether or not h == 0.
Any takers?
|