AI-Planning / cloud-solver

Repository that lets you run an automated planner as a service on heroku.
26 stars 7 forks source link

"when" in goal definition #10

Closed veronica320 closed 1 year ago

veronica320 commented 1 year ago

Hi authors,

Thanks for developing this awesome tool!

I'm having a problem with using conditional effects ("when") in goals. For example, if the goal looks something like:

(:goal
      when (on-site ?c ?s)
          (material-used ?c)
)

(example from PDDL wiki) The solver will output the following error:

/tmp/solver_planning_domains_tmp_45SvykwwuU24p/problem.pddl: syntax error in line XX, 'WHEN':
'define' expected

I'm using (:requirements :strips :typing :conditional-effects) in the domain file, however, it still looks like "when" is undefined. Is "when" not allowed in the goal definition?

Thanks for any help!

haz commented 1 year ago

Thanks for your interest, @veronica320 !

So a few things here...

  1. This project is mostly defunct, since there's a new (much shinier) project about to replace it over [here]. So fixes to issues aren't likely at this stage :P
  2. Conditional effects in the goal aren't really supported by any planner. An (implies ...) might be, but I'd say it's rare. Instead, you should have a special goal-achieved action with the conditions you need, and have it add a (goal) fluent with your goal being simply (:goal (goal))
  3. Open questions like this are usually answered pretty quickly over on the planning slack channel. You can find us over [here].