This is the PP-LPG solver for APP adapted to include dead-end (i.e., traps) reasoning:
Before running the solvers, make sure that:
tools/
:
validate
binary, from the VAL project.trapper
binary form the trapper-lapkt repo, presented at ICAPS16 paper Traps, Invariants, and Dead-Ends. lpg
preference-based planner binary. This is a modified version of the original LPG planner that leaves the final state of the solution plan in file endstate.txt
and the solution plan is always written a file called soln
(instead of using the domain name and .SOL
extension).emptyplan.tmp
(its used is hard-coded in the solver).
touch emptyplan.tmp
.
To compile the online solver, get into src/
, update the paths in def.h
if needed, and then run:
$ cd src/
$ make online
This will build the pp-online
online solver and the various pp-<solver>
offline solvers.
To run the online solvers, get into the problem folder and run:
$ /path/to/src/pp-online <obj_file> <init_file> <predicate_file> <action_file> <graph_file> <seed> <planner_type>
where <planner_type>
could be one of the following:
lmcut_trap
: uses trapper with LM-cut.lmcut_no_trap
: uses LM-cut without trapper.dfs_trap
: uses trapper with DFS+.dfs_no_trap
: uses DFS+ without trapper.lpg
: uses LPG without trapperWhen using trap reasoning, the tool used to extract dead-ends/traps is trapper
, available in the trapper-lapkt repo.
Running trapper as follows:
$ tools/trapper --domain domain.pddl --problem pfile-trap.pddl --search dfs+_trap --candidates a2 --goals 1 --plan soln.tmp
For example, this will run the online solver using on the complex example using the LPG planner with no traps (which will fail) and the DFS+ planner with trap reasoning (which will succeed):
$ cd examples/complex
$ ../../src/pp-online obj.pddl init.pddl predicates.pddl acts.pddl graph.txt 123 lpg
$ ../../src/pp-online obj.pddl init.pddl predicates.pddl acts.pddl graph.txt 123 dsf_trap
To compile the offline solver, get into src/
, update the paths in def.h
if needed, and then run:
$ cd src/
$ make offline
This will build the varios pp-<solver>
offline solvers:
pp-lpg
: uses preference-based LPG without trapper. This is basically the original APP solver from the AIJ16 paper. Not integrated with trapper or LAPKT; so no reasoning on traps.pp-dfs_no_trap
: uses DFS+ from LAPKT but without trapper.pp-dfs_trap
: uses trapper with DFS+ from LAPKT.pp-lmcut_no_trap
: uses LM-cut from LAPKT but without trapper.pp-lmcut_trap
: uses trapper with LM-cut from LAPKT.NOTE: when a local planning step is performed to "close" the policy, LPG is used, as it is a preference-based planner. However, LPG is not integrated with trapper, so those planning episodes do not use any dead-end reasoning. So, in all the above cases, LPG is used in some transitions.
To run the offline solvers, get into the problem folder and run:
$ cd /path/to/problem
$ /path/to/src/pp-<planner_type> <obj_file> <init_file> <predicate_file> <action_file> <graph_file> <seed>
For example, to run the LPG offline solver (as per AIJ16) on the complex example:
$ cd examples/complex
$ ../../src/pp-lpg obj.pddl init.pddl predicates.pddl acts.pddl graph.txt 123