PDDLtoGraph is a simple program for visualising PDDL files as relatedness and causal graphs, written in python. It also determines the diameter and the radius of the graph.
Make sure the following program and packages are installed:
- python3
- pip3
- networkx
- pygraphviz
- pydot
sudo apt install python3
sudo apt install python3-pip
pip3 install networkx
pip3 install pygraphviz
pip3 install pydot
Pyperplan is used for grounding, but is already included inside the repository.
The programm can be started by running ptg.py. It has requires two arguments; a PDDL domain file and a PDDL problem description.
python3 ptg.py DOMAIN PROBLEM
Optional arguments can also be invoked:
-h, --help
: shows the help message-l, --loglevel
: pyperplan log level- available levels are:
{debug,info,warning,error}
- available levels are:
-g, --graphtype
: choose between the graph types- available types are:
{relatedness,causal,rel_simple}
relatedness
: factored problemrel_simple
: lifted problem. Only works with new grounding
- available types are:
--grounding
: select wich grounding method is chosenoriginal
: pyperplans original groundingnew
: slightly modified version, without pruning
-d, --diameter
: toggle the drawing of diameter length path- available options are:
{true, false}
- available options are:
You can try it out with the two provided example files to create a relatedness graph on an elevator problem task.
python3 ptg.py -g relatedness -d false example/domain.pddl example/f2p1.pddl