vscode-pddl icon indicating copy to clipboard operation
vscode-pddl copied to clipboard

Adding HDDL Syntax

Open bhomaidan1990 opened this issue 3 years ago • 7 comments

Thank you for the great extension, I do like to ask if it is possible to add the HDDL , Additions syntax to the extension so it can support Hierarchical Domain Description Language.

  • Example:
:hierarchy
:method-preconditions

(:method method_name
  :parameters (?param1 ?param2 ?param3 ?param4 ?param5 ?param6)
  :task (task_name ?param1 ?param2)
  :precondition 
  (and
    (atom1 ?param1 ?param2)
    (atom2 ?param3 ?param4)
  )
  :ordered-subtasks 
  (and
    (sub_task_name ?param1 ?param2 ?param3)
    (sub_task_name2 ?param1 ?param5 ?param6)
  )
)

bhomaidan1990 avatar Mar 17 '21 04:03 bhomaidan1990

It should be quite possible. I guess VAL does not support it, does it? I always wanted to learn that : ) Is there tooling? Practices? Are the files generally named *.hddl? Or also *.pddl? Planners that I could get to test compatibility?

jan-dolejsi avatar Mar 17 '21 14:03 jan-dolejsi

Thanks for your rapid reply, "I guess VAL does not support it, does it?"

  • Honestly I'm not sure about that since I'm not familiar with VAL yet

"Is there tooling? Practices? Are the files generally named *.hddl? Or also *.pddl? Planners that I could get to test compatibility?"

  • the extension is .hddl, I'm using the PFD, and TFD planners from PDDL4J library devel branch, and here are some good examples.
  • Note that in order to build this branch you have to run ./gradlew clean build -PnoTest since some tests fail.
  • To use the planner after building the library:
  • java -javaagent:build/libs/pddl4j-3.8.3.jar -server -Xms2048m -Xmx2048m fr.uga.pddl4j.planners.htn.stn.tfd.TFDPlanner -d domain.hddl -p problem.hddl

bhomaidan1990 avatar Mar 17 '21 15:03 bhomaidan1990

any progess on this?

lesire avatar Oct 06 '21 09:10 lesire

Good news is that the file extension is different from .pddl. That makes it a lot easier. I would suggest we create a separate extension, which adds the .hddl syntax, and which leverages the PDDL extension to invoke planners and shows the plan etc... as usual. That is assuming the plan is represented the same way as from other non-hierarchical planners.

That arrangement would also avoid the VAL integration problem. And if pddl4j was configured as a PDDL parser, it should also provide parsing for .hddl.

It is a few days of work.

jan-dolejsi avatar Jan 25 '22 10:01 jan-dolejsi

@jan-dolejsi Is it possible please to extend the supported extensions to .hddl also, so we can benefit from the PDDL syntax correction? thanks in advance.

bhomaidan1990 avatar Apr 21 '22 11:04 bhomaidan1990

@bhomaidan1990 besides HDDL support missing, does the extension support HTN planners?

victorpaleologue avatar Jun 17 '22 12:06 victorpaleologue

@bhomaidan1990 besides HDDL support missing, does the extension support HTN planners?

As it supports PDDL4J which includes HTN planners I think that it supports HTN planning using TFD or PFD planners, but to be sure @jan-dolejsi can confirm that.

bhomaidan1990 avatar Jun 18 '22 05:06 bhomaidan1990