Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a new heuristic? #109

Open
Matteio opened this issue Aug 3, 2023 · 2 comments
Open

How to add a new heuristic? #109

Matteio opened this issue Aug 3, 2023 · 2 comments
Labels

Comments

@Matteio
Copy link

Matteio commented Aug 3, 2023

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.

@pellierd
Copy link
Owner

pellierd commented Aug 5, 2023

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.

@Matteio
Copy link
Author

Matteio commented Aug 5, 2023

Thank you! @pellierd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants