This project contains a GTF solver for qualitative numeric planning (QNP) and
FONDcodes; the
benchmark inputs are under domains.
-
codes/src/preOutput_plus: preprocessing wrapper. It converts QNP input to FOND$^+$ PDDL when needed, then runs the translator and preprocessor. -
codes/src/qnp2pddl.pyandcodes/src/genFONDInput_plus.py: QNP parser and QNP-to-PDDL conversion. -
codes/src/translate: modified Fast Downward translator with FOND$^+$ fairness support. -
codes/src/preprocess: Fast Downward-style preprocessor. It readsoutput.sasand writesoutput. -
codes/src/search: modified PRP/Fast Downward search code.search/downwardis the built solver binary.search/fond_pluscontains the generating, testing and forbidding loop. -
codes/src/numeric: numeric FF-based reducer used by the3FNmode. -
codes/src/renderPolicy.py: optional Graphviz rendering for dumped policy graphs. -
domains/QNP: QNP instances and their PDDL translations. -
domains/FONDX: FOND$^+$ PDDL instances.
- Linux or another Unix-like environment with
bash. python3.makeand a C++ compiler with C++11 support.- Optional for
3FN:flex,bison, and a working build ofcodes/src/numeric/ff. - Optional for policy rendering: Graphviz command line tools and the Python
graphvizpackage.
From the project root:
cd codes/src
./build_allbuild_all builds src/preprocess/preprocess and src/search/downward.
For 3FN, also build the numeric FF:
cd codes/src/numeric
make -f makefileSet PROBLEM_PATH to a directory containing one of the following:
- FOND
$^+$ PDDL:domain.pddlandproblem.pddl. - QNP: exactly one
.qnpfile.
The QNP text format used by qnp2pddl.py is:
- problem name,
- feature declaration line:
N name type ..., where type0is Boolean and type1is numeric, - initial feature values,
- goal feature values,
- number of actions, followed by each action name, its precondition line, and its effect line.
Use the wrapper script codes/GTF. It selects the solver preset, resolves
--working_src_path to codes/src, checks that the planner binary exists, and
then forwards the request to src/search/downward.
cd codes
./GTF 3FF ../domains/FONDX/BlocksColumns-Adv/p3-1-1Examples:
./GTF BFF ../domains/FONDX/BlocksColumns-Adv/p3-1-1
./GTF 3FF ../domains/FONDX/BlocksColumns-Adv/p3-1-1 --show-policy 0
./GTF 3FN ../domains/QNP/BlocksColumns/InQNP/p4-1-3 --num-solutions 2Extra options are appended after the wrapper defaults. For simple scalar options, pass the option again to override the default value.
The preprocessing and search pipeline writes intermediate and result files into
PROBLEM_PATH, including:
domain.pddlandproblem.pddlwhen a.qnpinstance is translated.output.sas,output, andelapsed.timefrom translation/preprocessing.result.info,policy.out, andpolicy.faspfrom search.action.ind,state.ind,graph.out,pstate.ind, andpgraph.outwhen graph dumping is enabled.qnp_num/andredundant_actionswhen3FNruns the numeric reducer.S_*,NT, orNT_*when saving all solutions or non-terminating debug policies is enabled.
These products are ignored by .gitignore; the repository should keep source
code and benchmark inputs, not local run outputs or binaries.
Enable graph dumping in the solver command:
--dump-graph 1Then render a policy graph:
python3 src/renderPolicy.py --main_path "$PROBLEM_PATH"Useful flags are --p for compact partial-state graphs, --nt for
non-terminating edges, and --ntc for compact non-terminating edges.
This repository is distributed under the GNU General Public License v3.0; see
LICENSE. Third-party components keep their original copyright and license
notices in the source files.