Hi Nicholas,
we are working on a Python interface that would make this possible but
it is not something that will be ready for release soon. If you don't
mind implementing some of the missing details yourself, you could
probably start from the current prototype of that interface:
https://github.com/FlorianPommerening/downward/pull/3/files
You would need to expose most of the functionality you need because the
classes currently only expose the most basic functionality (have a look
at how get_operator_name is exposed for an example). Getting the task in
there is also still somewhat unwieldy because the rest of the code is
not completely prepared for this. The nanobind.md file in the pull
request should explain how to set this up.
Cheers
Florian
On 24/9/25 12:00, 'Nicholas Rossetti' via Fast Downward wrote:
> Hello,
>
> I’m experimenting with classical planning in Python, and I’d like to use
> Fast Downward’s heuristics (h_ff, lm-cut, lm-count, etc.) outside the
> default search loop.
>
> My workflow would be:
>
> 1.
>
> Start from a state.
>
> 2.
>
> Generate all applicable actions.
>
> 3.
>
> For each successor state, compute a heuristic value (h_ff, landmark
> heuristics, etc.).
>
> I know I can run Fast Downward with --heuristic "h=ff()" --search
> "greedy(h)", but that gives me a full plan, not heuristic values I can
> query from Python.
>
> *My questions:*
>
> *
>
> Is there an existing Python binding or API to compute h_ff or
> landmark heuristics on arbitrary states, once the domain/problem has
> been parsed?
>
> *
>
> If not, has anyone already extended Fast Downward to expose this
> functionality?
>
> Any advice, references, or existing tools for doing this would be
> greatly appreciated!
>
> Thanks a lot,
>
> Nicholas Rossetti
>
>
>
>
> Informativa sulla Privacy:
https://www.unibs.it/it/node/1452 <https://
>
www.unibs.it/it/node/1452>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Fast Downward" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
fast-downwar...@googlegroups.com <mailto:
fast-
>
downward+u...@googlegroups.com>.
> To view this discussion visit
https://groups.google.com/d/msgid/fast-
> downward/a3043022-5f6e-4127-8a49-1d4f3b477b99n%
40googlegroups.com
> <
https://groups.google.com/d/msgid/fast-downward/
> a3043022-5f6e-4127-8a49-1d4f3b477b99n%
40googlegroups.com?
> utm_medium=email&utm_source=footer>.