Skip to content

Configuring the PDDL planner

Jan Dolejší edited this page Jul 11, 2019 · 6 revisions

PDDL Planners

End users can configure the PDDL extension to use their own PDDL planner. There are two shapes of planners supported:

  • planner executables
  • planning service

To configure a planner, invoke the PDDL: Configure PDDL planner command (using Ctrl+Shift+P) and follow the instructions.

For planner executables, the relevant configuration will be stored in following settings:

  • pddlPlanner.executableOrService (mandatory settings pointing to the executable/command)
  • pddlPlanner.executableOptions (optional specification of command line arguments)
  • pddlPlanner.epsilonTimeStep (optional epsilon time step value defaulted to 0.001)

For planner service, specify the url into the pddlPlanner.executableOrService setting e.g. http://solver.planning.domains/solve. If you are interested to build your own service, implement the interface documented here: http://solver.planning.domains/. When implementing/hosting your own planning service, please expose it at a /solve to be recognized. The extension also supports a /request endpoint, which follows a asynchronous RESTful API, but that is not documented at this point. Let me know if there is interest.

Recommended configuration for commonly used PDDL planners

First, see the list of commonly used planners in the PDDL Reference.

Solver.planning.domains

The default PDDL solver is http://solver.planning.domains/solve. To use it again, simply set the URL into pddlPlanner.executableOrService setting again.

PDDL4J

Pddl4j supports both parsing of propositional PDDL and (simple) planning. To use it as a parser, use following command (as pddlPlanner.executableOrService):

    java -javaagent:d:/tools/pddl4j/pddl4j-3.5.0.jar -server -Xms2048m -Xmx2048m fr.uga.pddl4j.planners.hsp.HSP

and command line options (pddlPlanner.executableOptions):

    $(planner) $(options) -o $(domain) -f $(problem)

where -o and -f are the switches expected by the planner.

POPF Planner

The POPF planner can be configured easily by pasting in the executable name (pddlPlanner.executableOrService setting):

    popf.exe

This is assuming you have the location of the executable included into your %path% environment variable. Otherwise simply specify the full path.

... and use the default command line options (pddlPlanner.executableOptions setting):

    $(planner) $(options) $(domain) $(problem)

Configuring a custom planner

If you have a planner executable and want to use it with this VS Code extension, ensure its output adheres to this format:

    ; some other output that is not part of the plan
    time: (some-instantaneous-action-name)
    time: (some-durative-action-name) [duration]
    ; some other output that separates plans in the output

The planner may output multiple plans. They need to be separated in the output by a line that does not parse as a plan.

Working directory

The planner executable runs in the context of the directory, where the domain and problems are located. Therefore if the planner generates additional files (e.g. log files), they are easy to find.

You can’t perform that action at this time.