Skip to content

Configuring the PDDL planner

Jan Dolejší edited this page Oct 25, 2021 · 14 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, use the PDDL: Overview Page or invoke the PDDL: Select planner command (using Ctrl+Shift+P) and follow the instructions.

The relevant configuration will be stored in following settings:

  • pddl.planners (array of planner configurations)
  • pddl.selectedPlanner (currently active planner - also displayed in the status bar)
  • pddlPlanner.epsilonTimeStep (optional epsilon time step value defaulted to 0.001)

The entries in the pddl.planners list may have following properties:

  • title: e.g. "POPF"
  • canConfigure: true (if end-user should be offered the option to re-configure the planner
  • path: executable/script path (for locally executing services this could be the location of the service executable)
  • url: planning service URL e.g. http://localhost:8080/solve
  • syntax: e.g. "$(planner) -o $(domain) -f $(problem) $(options)",

Note that the service does not need to be registered - it is offered by the extension.

If you are interested to build your own service, implement the interface documented here: 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.

The default PDDL solver is It is now built-into the extension and there is no need to configure it.


The LPG Planner is available among the out-of-the-box supported planners since November 2020. That means its command-line options are also presented in the drop down, while invoking the planner and the output plans are parsed and visualized:

LPG Planner Support

It is recommended to use the -noout argument to avoid the creation of plan files on disk.


Pddl4j supports both parsing of propositional PDDL and planning. To use PDDL: Select planner command, and select Create new planner configuration and then the pddl4j built-in option.

PDDL4J Planner Support

Done. Nothing else needs to be configured. You are ready to call the planner from the UI.

It is also possible to use the javaagent option, but it needs to be added to VS Code using the Command kind of planner and entering command such as into the path element:

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

And the command line options (using the syntax element):

    $(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 selecting it from the types of out-of-the-box supported planners.

The default command line options (pddl.planners > [] > syntax 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
***cost***: number
***States evaluated***: number
time: (some-instantaneous-action-name args)
time: (some-durative-action-name args) [duration]
time: (some-durative-action-name args) [D:<duration>; C:<actionCost>]
; some other output that separates plans in the output

Where *** are any non-numeric characters. Alternatively to cost, the word metric will also be detected.

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.