|
1 | 1 |
|
2 | | -# Aries Planning Engine |
| 2 | +# Aries Planning Engine (APE) |
3 | 3 |
|
4 | | -WIP: this in an ongoing effort to reimplement the Aries solver planning capabilities for PDDL. |
| 4 | +Disclaimer this in an ongoing effort to reimplement the Aries solver planning capabilities for PDDL and different functionalities have different maturity levels. |
| 5 | +In particular, elements marked as WIP are not feature complete and should not be relied upon. |
5 | 6 |
|
| 7 | +The CLI tool currently proposes the following functionalities: |
6 | 8 |
|
| 9 | + - `parse`: parsing of PDDL problem files |
| 10 | + - `parse-domain`: parsing of lone PDDL domain file |
| 11 | + - `validate` (WIP): validate a PDDL plan |
| 12 | + - `plan-optimization` (WIP): optimize a given PDDL plans, specifying the target metrics and allowed relaxations |
| 13 | + - `dom-repair`: Propose fixes of a broken PDDL domain so that a target plan is valid. |
7 | 14 |
|
| 15 | + ## Installation |
| 16 | + |
| 17 | +The usage section assumes that you have the `ape` executable on your path. It can be installed globally from the latest version in the git repository (but requires a [rust toolchain](https://rust-lang.org/tools/install/)). |
8 | 18 |
|
9 | | -## Domain repair |
| 19 | +```sh |
| 20 | +# Install |
| 21 | +cargo install --bin ape --git https://github.com/plaans/aries aries-plan-engine |
| 22 | +``` |
| 23 | + |
| 24 | +To install from a locally checked-out version of aries: |
10 | 25 |
|
| 26 | +```sh |
| 27 | +# Install `ape` globally, assuming that you are in the same directory as this file (planning/engine/). |
| 28 | +cargo install --bin ape --path . |
| 29 | +``` |
11 | 30 |
|
| 31 | +For development, you can simply replace the `ape` command by `cargo run [--release] --bin ape --` which will compile `ape` and then run it with the arguments provided after the finals `--`. |
| 32 | +Omitting the `--release` flag will produce non-optimized builds that would be substantially faster to compile (but much slower for execution.) |
| 33 | + |
| 34 | +## Usage |
12 | 35 |
|
13 | 36 | ```sh |
14 | | -# Domain repair options. |
15 | | -cargo run --bin aries-plan-engine -- dom-repair --help |
16 | | -# Attempts to find fix to the (autmoatically infered) domain for this plan |
17 | | -cargo run --bin aries-plan-engine -- dom-repair planning/problems/pddl/tests/gripper.plan |
| 37 | +# List available commands |
| 38 | +ape --help |
| 39 | + |
| 40 | +# Print help for a particular command (here `validate`) |
| 41 | +ape validate --help |
18 | 42 | ``` |
| 43 | + |
| 44 | + |
| 45 | +## Naming conventions for PDDL problems and domains |
| 46 | + |
| 47 | +Ape relies on naming conventions to find the domain associated to a problem files (which avoids having to specify it manually on the command line). |
| 48 | + |
| 49 | +Given a problem file, `ape` would consider candidate domain files in the same or parent directory, with a set of possible name depending on the problem filename: |
| 50 | + |
| 51 | +- `*.pddl` -> `domain.pddl` |
| 52 | +- `XXXXX.YY.pb.pddl` -> `XXXXX.dom.pddl` |
| 53 | +- `XXXXX.pb.pddl` -> `XXXXX-domain.pddl` |
| 54 | +- `instance-NN.pddl` -> `domain-NN.pddl` |
| 55 | + |
| 56 | +These are implemented in the [find_domain_of](https://github.com/plaans/aries/blob/master/planning/planx/src/pddl/find_file.rs) function, which may serve as a reference. |
| 57 | + |
| 58 | +This can be used on the command line with the `find-domain` command, that will print the domain file on the standard output. |
| 59 | +This can be useful when integration with other tools, e.g., |
| 60 | +```sh |
| 61 | +my-planner --domain `ape find-domain ${PROBLEM_FILE}` --problem ${PROBLEM_FILE} |
| 62 | +``` |
| 63 | +It is notably used in the [`zed-pddl`](https://github.com/arbimo/zed-pddl) extension for Zed. |
| 64 | + |
| 65 | +Note that at this point, the discovery is purely based on the filenames, with no attempt to validate that the domain name matches the one declared in the problem. |
0 commit comments