To improve the task execution efficiency of contingent plans, this project implements a method named CoCG, which Combined the Contingent planning and Graph-based planning methods.
This project mainly includes the following parts:
cocg_pddl_parser
: used to parse PDDL-format files. Based on PDDL 2.1, two tokensunknown
andoneof
are added to support the conventional syntax in contingent planning (such as Contingent-FF).cocg_ast
: After the parsing of the above PDDL format file is completed, the corresponding data structure will be established, which mainly includes the following parts:node
: the most basic element, single node in the abstract syntax tree, predicate is its leaf node, and the others are branch nodes.tree
: a collection ofnode
, used to represent compound statements such asoneof
,unknown
action
: each template action after parsing the PDDL domain file, and can also represent the primitive action after instantiation.param
: the actual parameters and param types inaction
plan_item
: a single action node planned by the Contingent planner.plan
: The entire plan tree generated by Contingent planner.
cocg_core
: Implementation of CoCG core algorithms. Contains the following parts:cocg_domain_reader, cocg_domain_expert
: Read and store information in domain files.cocg_problem_expert
: Store various states in the second-stage planning process.cont_plan_sovler_base
: All contingent planners should inherit from this base class.cocg_graphplan
: Implementation of optimization algorithm based on graph-based planning.cocg_core
: CoCG’s core overall process algorithm.
cocg_cff_plan_solver
: Built-in implementation of the Contingent-FF planner, which completes the interaction with CoCG by inheriting thecont_plan_sovler_base
class.cocg_tests
: Some test cases, and the integration ofContingent-FF + CoCG
.
mkdir build
cd build
cmake..
make
- Use the default case
cd build/cocg
./cff_cocg_test
- Specify external cases
cd build/cocg
./cff_cocg <domain_file> <problem_file>