/tomcat-planrec

Code for the plan recognition and planning effort in ToMCAT

Primary LanguageC++MIT LicenseMIT

tomcat-planrec

Requirements

Code for the plan recognition and planning effort in ToMCAT.

To build, do the following:

mkdir -p build
cd build
cmake ..
make -j

After building, you can run tests with the following command (assuming you are in the build directory).

ctest

If you want more verbose output (e.g. if you want to show the outputs from your cout << ... << endl statements), run:

ctest -V

Running the MCTS HTN Planner

After building, you can run:

./apps/planners/MCTS_planner

This will run the planner on default settings, which are the same as test_MCTS_planner ran by the ctest command.

The default domain and problem definitions are at domains/transport_domain.hddl and domains/transport_problem.hddl. The default score function is "delivery_one" defined in domains/score_functions.h.

Run with the help flag,

./apps/planners/MCTS_planner -h

To see what options are available including how to run the planner with different domain and problem definitions and score functions. Score functions must be predefined in domains/score_functions.h.

Running the MCTS HTN Plan Recognizer

After building, you can run:

./apps/planrec/MCTS_planrec -g

This will run the planner on default settings. The -g flag has the plan recognizer generate a png file containing a visual of the inferred plan structure. By default the file name will be __<problem_head>__.png.

The default domain and problem definitions are at domains/transport_domain.hddl and domains/transport_problem.hddl. The default score function is "delivery_one" defined in domains/score_functions.h. The default observation set is "delivery_sample" with a sample size of 2 (i.e., the first two actions).

Run with the help flag,

./apps/planrec/MCTS_planrec -h

To see what options are available including how to run the plan recognizer with different domain and problem definitions and score functions. Score functions must be predefined in domains/score_functions.h. The script domains/pr_samples.h provides a convenient way to provide artificial observation sets.

Acknowledgments

The C++ implementation of the PyHOP planning algorithm borrows from PCfVW/Simple-HTN-Planner.