On 25.07.25 13:04, 'Nicholas Rossetti' via Fast Downward wrote:
> Hi everyone,
> Thanks to Florian, Gabriele, and Mate for their replies.
> I managed to get the grounded actions for my code without any problems.
> I was wondering, is it possible to also get all the possible predicates?
> That way, I could have a bitmap to quickly control the applicable
actions.
No, that's not how the planner organizes the information.
Also, what you describe suggests that you want to loop over the possible
actions to determine which ones are applicable. The more efficient
algorithms for checking applicable actions work differently, with some
kind of query structure that has a best-case performance that scales
with the number of applicable actions, not the number of all actions. On
some benchmarks, there are hundreds of thousands of actions, of which
only a very small fraction is applicable on average.
If you want to find out more, look for
task_utils/successor_generator.{cc,h} in the Fast Downward C++ code.
You can find some background in Section 5.3 of this paper:
https://ai.dmi.unibas.ch/papers/helmert-jair06.pdf
Best,
Malte
> Best regards
>
> Il giorno giovedì 12 giugno 2025 alle 11:31:26 UTC+2 Malte Helmert ha
> scritto:
>
> Hi Nicholas,
>
> if you don't want the finite-domain variables that Florian mentioned,
> you can disable invariant synthesis in the translator, in which case
> the
> resulting grounded task will only use binary state variables that
> correspond to the original grounded atoms of the PDDL task:
>
> ./fast-downward.py --translate DOMAIN.pddl PROBLEM.pddl
> --translate-options --invariant-generation-max-candidates 0
>
> Best,
> Malte
>
> On 11.06.25 11:37, Gabriele Röger wrote:
> > Hi Nicholas,
> >
> > adding to this:
> >
> > On 10.06.25 17:52, Florian Pommerening wrote:
> >> If you are calling it from a Python process, you could also
> import the
> >> translator module and call the function yourself (rather than
> starting
> >> a subprocess and parsing the result). The relevant code for that
> is here:
> >>
https://github.com/aibasel/downward/blob/main/src/translate/
> translate.py#L702 <
https://github.com/aibasel/downward/blob/main/
> src/translate/translate.py#L702>
> >> In particular:
> >> task = pddl_parser.open(...)
> >> normalize.normalize(task)
> >> sas_task = pddl_to_sas(task)
> >
> > There is an internal intermediate internal format for the
> grounded task
> > before the transformation to SAS+. You can get it with:
> >
> > task = pddl_parser.open(...)
> > normalize.normalize(task) # it depends on the task whether this
> step is
> > necessary
> > _, atoms, actions, goals, axioms, _ = instantiate.explore(task)
> >
> > The resulting actions will be of class PropositionalAction
> > (
https://github.com/aibasel/downward/blob/main/src/translate/
> pddl/actions.py#L110 <
https://github.com/aibasel/downward/blob/main/
> src/translate/pddl/actions.py#L110>).
> >
> > As an alternative to using Fast Downward directly, you can also
> have a
> > look at the unified planning library
> > (
https://unified-planning.readthedocs.io/en/latest/ <https://
>
unified-planning.readthedocs.io/en/latest/>).
> > It can also parse PDDL and ground tasks (using the Fast Downward
> > grounder as one of several options).
>
>
>
>
>
>
> downward/cde0965f-73a9-4c3b-befe-087b1fb0d0e2n%
40googlegroups.com
> <
https://groups.google.com/d/msgid/fast-downward/cde0965f-73a9-4c3b-
> befe-087b1fb0d0e2n%
40googlegroups.com?utm_medium=email&utm_source=footer>.