Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Timed initial literals on the cheap?

10 views
Skip to first unread message

David Epstein

unread,
Nov 14, 2022, 3:50:24 AM11/14/22
to Fast Downward
Hi,

Is it possible via PDDL or by changing FD's code in some minor way to produce a very simple version of timed initial literals? FD already tracks plan length (depth) and cost, so perhaps these could be used to trigger the change in state rather than time? For example, let's say that John's initial state is "not tired" but that after any three actions, he will be tired. Or, alternatively, when plan cost is 30 or more, he will be tired. I'm assuming this is much more difficult than it sounds, but figured it was worth asking. 

-david

Malte Helmert

unread,
Nov 14, 2022, 4:51:55 AM11/14/22
to fast-d...@googlegroups.com, David Epstein
Hi David,

no, there is no easy way because this doesn't play nicely with duplicate
elimination, which is important for performance.

With timed initial literals of this kind, it could be the case that you
have to reach a certain state, say, at cost 10 in order to solve the
problem. If Fast Downward finds a way to reach it more cheaply, it will
not consider paths at the higher cost.

Best,
Malte
> --
> 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-downwar...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fast-downward/CAK0sU7EDWbWGMV5RZSHf7njvZ8f_%3DAROmz4O4PVnh5A4FPsuFw%40mail.gmail.com <https://groups.google.com/d/msgid/fast-downward/CAK0sU7EDWbWGMV5RZSHf7njvZ8f_%3DAROmz4O4PVnh5A4FPsuFw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Florian Pommerening

unread,
Nov 14, 2022, 4:52:08 AM11/14/22
to fast-d...@googlegroups.com
Hi David,

I don't think this is possible in PDDL, you'd have to modify the source
code. Successors are generated in StateRegistry::get_successor_state()
and you could modify this function to handle timed initial literals
similar to how axioms are handled. The tricky bit is how to access the g
values or plan length at this time. You could use a PerStateInformation
class to store them but that will introduce a cyclic dependency
(PerStateInformation depends on StateRegistry because it uses the IDs
created by the registry to index the information). If you are sure that
you will only create successors of registered states, you can probably
make this work but it would be a bit of a hack.

Cheers
Florian

On 14.11.22 17:50, David Epstein wrote:

David Epstein

unread,
Nov 14, 2022, 5:11:07 AM11/14/22
to fast-d...@googlegroups.com
Thank you Malte & Florian. The agents in my simulation can anticipate each others' plans. I was hoping each agent would leverage that information through timed initial literals in their own plans. While some planners have implemented this feature, there doesn't seem to be a temporal planner (or any other planner?) with the large, active community that FD enjoys. I'll look for a way to encode anticipated actions into costs. Is there any way in PDDL for the same action to have different costs depending on its step in the plan? E.,g. (walk ?agent forest) in step 6 costs ten times as much as in any other step?

-david 

To unsubscribe from this group and stop receiving emails from it, send an email to fast-downwar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fast-downward/961750c5-9a8a-4b76-c73e-291f4994a5c3%40unibas.ch.

Patrik Haslum

unread,
Nov 14, 2022, 9:57:51 AM11/14/22
to fast-d...@googlegroups.com
A few suggestions:

1. You can count actions (just like you count other things) in PDDL; whether or not this is practical will depend on how many counters you need, and how far they need to go. Add a predicate (current-step ?n - count), add to every action two parameters, say ?step and ?next, precondition (current-step ?step), (plus-one ?step ?next), and effect (not (current-step ?step)) and (current-step ?next); add objects s0, s1, ..., up to however many steps you want to count; add (current-step s0) and (plus-one s0 s1), (plus-one s1 s2), ... to the initial state. (If you want to count high, you can use a binary counter instead.)

To make a certain effect happen when the counter reaches X, you can add a conditional effect to every action: (when (current-step sX-1) <effect at X>).

The counter will limit the length of plans that are possible but if you only want to trigger an effect when the counter reaches X, you can stop counting after X: set (plus-one sX sX), so that actions can still be taken, and the counter stays at the final value (PDDL's add-before-delete semantics should make that work, for sequential plans).

You could use the counter also to make action costs depend on which step of the plan they're at.

You can, in theory, do the same for counting cost (each action will increment the counter by a value corresponding to its cost), but that's most likely not going to be practical.

2. If you know that your TILs are always going to disable actions/goals (e.g., John is "not tired" may be a precondition of some actions, but it's negation is not a precondition of any action, and not a goal), then the case that Malte mentioned doesn't arise, so you could (perhaps) modify FD's successor generation to check accumulated cost and trigger scheduled effects when it reaches corresponding values.

3. Temporal planners that support TILs: I'd suggest trying LPG-td, and maybe crikey/colin/popf. They may not be as user friendly as FD, but you can sometimes make them work by trying different problem formulations. (I have a vague memory of one of these - crikey maybe? - segfaulting on problems with TILs, but working when the TILs were compiled away using durative actions.)

cheers,
/P@trik

________________________________________
From: fast-d...@googlegroups.com <fast-d...@googlegroups.com> on behalf of David Epstein <davi...@umich.edu>
Sent: Monday, 14 November 2022 9:10 PM
To: fast-d...@googlegroups.com
Subject: Re: [Fast Downward] Timed initial literals on the cheap?

Thank you Malte & Florian. The agents in my simulation can anticipate each others' plans. I was hoping each agent would leverage that information through timed initial literals in their own plans. While some planners have implemented this feature, there doesn't seem to be a temporal planner (or any other planner?) with the large, active community that FD enjoys. I'll look for a way to encode anticipated actions into costs. Is there any way in PDDL for the same action to have different costs depending on its step in the plan? E.,g. (walk ?agent forest) in step 6 costs ten times as much as in any other step?

-david

> an email to fast-downwar...@googlegroups.com<mailto:fast-downward%2Bunsu...@googlegroups.com>
> <mailto:fast-downwar...@googlegroups.com<mailto:fast-downward%2Bunsu...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fast-downward/CAK0sU7EDWbWGMV5RZSHf7njvZ8f_%3DAROmz4O4PVnh5A4FPsuFw%40mail.gmail.com<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ffast-downward%2FCAK0sU7EDWbWGMV5RZSHf7njvZ8f_%253DAROmz4O4PVnh5A4FPsuFw%2540mail.gmail.com&data=05%7C01%7Cpatrik.haslum%40anu.edu.au%7C30c37011301943052a9108dac6288d30%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C638040174725791952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2P9Cmlcp73OWrzzm0nEAPiokHD8Ss7dQMB3cKWE7Rro%3D&reserved=0> <https://groups.google.com/d/msgid/fast-downward/CAK0sU7EDWbWGMV5RZSHf7njvZ8f_%3DAROmz4O4PVnh5A4FPsuFw%40mail.gmail.com?utm_medium=email&utm_source=footer<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ffast-downward%2FCAK0sU7EDWbWGMV5RZSHf7njvZ8f_%253DAROmz4O4PVnh5A4FPsuFw%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cpatrik.haslum%40anu.edu.au%7C30c37011301943052a9108dac6288d30%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C638040174725791952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BgRf4jGyTswtpEdiBPTmnk7aCbpgPPkJwQCs%2B1F%2FRUw%3D&reserved=0>>.

--
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%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/fast-downward/961750c5-9a8a-4b76-c73e-291f4994a5c3%40unibas.ch<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ffast-downward%2F961750c5-9a8a-4b76-c73e-291f4994a5c3%2540unibas.ch&data=05%7C01%7Cpatrik.haslum%40anu.edu.au%7C30c37011301943052a9108dac6288d30%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C638040174725791952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=azHVAIaijLkl1Qy7rEujanXLW1PJS7%2BTOg6k1wkU76w%3D&reserved=0>.

--
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-downwar...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/fast-downward/CAK0sU7HkNknaQH%2B2A6EkshVNL_%2Brs3Z7JrhO0WNN2NzvgbkC0g%40mail.gmail.com<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ffast-downward%2FCAK0sU7HkNknaQH%252B2A6EkshVNL_%252Brs3Z7JrhO0WNN2NzvgbkC0g%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cpatrik.haslum%40anu.edu.au%7C30c37011301943052a9108dac6288d30%7Ce37d725cab5c46249ae5f0533e486437%7C0%7C0%7C638040174725791952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UkDP4qjvbLzcimn5eupNPlzwJiSZnCQ66UDUtd2oaF4%3D&reserved=0>.

David Epstein

unread,
Nov 14, 2022, 11:15:23 AM11/14/22
to fast-d...@googlegroups.com
Patrik, your description was very helpful. Thank you! I'll see how far I can go with FD. 

To unsubscribe from this group and stop receiving emails from it, send an email to fast-downwar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fast-downward/SY6P282MB347636DD5CE3040C56A39224D5059%40SY6P282MB3476.AUSP282.PROD.OUTLOOK.COM.
Reply all
Reply to author
Forward
0 new messages