-
Notifications
You must be signed in to change notification settings - Fork 23
Configuring the PDDL planner
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.
First, see the list of commonly used planners in the PDDL Reference.
The default PDDL solver is http://solver.planning.domains/solve. It is now built-into the extension and there is no need to configure it. However, saving its URL into pddlPlanner.executableOrService
also work.
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:
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.
The POPF planner can be configured easily by selecting it from the types of out-of-the-box supported planners. Alternatively, pasting in the executable name to the pddlPlanner.executableOrService
setting also works:
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)
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.
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.