PDDL Action Tab
The plugin introduces a new tab in the state editor of RAFCON. It’s called the PDDL Action Tab, and it’s symbol is a small calculator.
The tabs gives the possibility to annotate a state with a PDDL action, and so to make it usable for the plugin.
Table of contents generated with markdown-toc
Tab Fields
The tab consists of several fields, describing the state’s semantic in pddl. This section explains these fields in detail.
Description
The description field is a text field. It has documentation purposes, and should contain a description and hints for the pddl action. It is not used by the plugin.
PDDL
The action in pddl syntax should be pasted or written (not recomended) into this code editor field. Information about, what aspects of pddl are supported by the plugin can be found in the section PDDL Support. When generating a domain while processing a task, this field is copy pasted one by one. It’s also parsed during the “Auto Complete” process. So only valid PDDL code, as well as PDDL comments are allowed here.
Example
;That is my move action
(:action move
:parameters (?form ?to - Location ?subject - Vehicle)
:precondition (at ?from ?subject)
:effect (and (not (at ?from ?subject)) (at ?to ?subject))
)
Predicates
The predicates text field should be filled with all different predicates, the action in the ‘PDDL’ field uses. Due to the fact, that all predicates in the Action are applied, the parameter types have to be added. This field is the foundation of the predicates section in the auto generated domain file. For the plugins point of view, no type hierarchy is defined yet. Therefore the list should not only contain all predicates with different names, but also predicates with the same name, and different types (It’s also not a good idea to merge predicates by hand, because the type hierarchy may change in the future.).
Example
According to the example above (the PDDL action) the predicates field would
contain one predicate:
(at ?from - Location ?subject - Vehicle)
Another, imaginary example is:
(at ?a - Location ?b - Vehicle)
(at ?a - Location ?c - Cargo)
(in ?c - Cargo ?b - Vehicle)
Types
The types text field should contain all types, which are used in the action in the ‘PDDL’ field. The types must be separated by spaces or commas. This field is used to decide which types, the types section in the auto generated domain file will contain.
Example
According to the example above (the PDDL action) the Types field would look like this:
Location, Vehicle
Requirements
This checkboxes represent requirements on pddl planners. For example, if an action uses types (all actions in the plugin do that), the planner requirement would be ‘:typing’. All requirements, the action in the ‘PDDL’ field has, should be ticked here.
Buttons
The PDDL Action tab comes with a few buttons. These are described in this section.
Auto Complete
The auto complete button is located between the ‘PDDL’ and the ‘Predicates’ field. As it’s title indicates, it tries to auto complete the predicates, types and requirements fields, and applies all changes. First to mention: It tries. Currently no bugs are known, and usually it finds all predicates, types and requirements needed, but there is NO warranty. Secondly: It’s auto complete. Therefore it will just add input to the fields, but not override them.
Apply
The apply button is located in the footer of the action tab. The plugin stores all information of the pddl action in the “Semantic Data” tab of vanilla RAFCON. so the apply buttons purpose is, transmit the entered data from the PDDL Action Tab into the semantic data tab.
Important: Hitting the apply button will not store the pddl data persistent. It is just persistent when saving the state machine. If the state was saved but the apply button wasn’t clicked, the pddl action tab is also not saved.
Enable Auto Apply
If auto apply is enabled, all changes are automatically applied. Usually enabeling is recomended, but due to some performance issues,it should be disabled when writing a (long) description or coding in the PDDL field.