pddl4j icon indicating copy to clipboard operation
pddl4j copied to clipboard

How to add a new heuristic?

Open Matteio opened this issue 1 year ago • 2 comments

Hi, I am working with pddl4j on a planning problem, and the goal is to create a new ad hoc heuristic for the problem at hand. On the documentation I saw there is a guide on how to create the planner, I wanted to ask you if there was a guide on how to add a new heuristic, thanks.

Matteio avatar Aug 03 '23 14:08 Matteio

Hi,

If you want to develop your own heuristic you can use the interface Heuristic and its subclasses. For a state based heuristic used instead StateHeuristic and its abstract subclass AbstractStateHeuristic. You just have to implement the method estimate(State) that returns a estimation of the distance to the goal from the state in parameter.

pellierd avatar Aug 05 '23 10:08 pellierd

Thank you! @pellierd

Matteio avatar Aug 05 '23 13:08 Matteio