pddl4j icon indicating copy to clipboard operation
pddl4j copied to clipboard

Update testPlan with version 4.0.0

Open clergetm opened this issue 1 year ago • 0 comments

Before

The previous version was using the version 3.8.3 of pddl with four different loops.

Replaced by

  1. The tag VERSION is now to 4.0.0
  2. The loops are replaced by the function run_benchmarks

Various variables

  • XM: java memory allocation.
  • COMMANDTIMEOUT: the timeout applied to the process.

Planner variables

These variables are the same as the command line syntax to launch the HSP Planner

Name Description Default
statespace set the planner HSP
heuristic set the heuristic of the planner MAX
logLevel set the level of trace INFO
timeout set the time out of the planner in second 600
weight set the weight of the heuristic 1.0
domain_name set the name of the domain file. This name is common for each benchmark domain
problem_name set the name of the problem file.
complete_path set the complete path to find the pddl files From pddl4j/ folder.

Directory variables

We can find the pddl files in this type of path: src/test/resources/benchmarks/pddl/ipc1998/gripper/strips. So we are loop throught 3 types of folder:

  1. The ipc folders (ipc1998, ipc2000, ... , ipc2014) represented by the array ipc_folders.
  2. The benchmarks folder (blocks, ... , logistics) represented by the array benchmarks.
  3. The type of pddl files (strips, strips-hand-coded ...) represented by the array benchmark_types.

Iteration variables

Name Description Default
index_folder iterator to navigate between folders 0
index_file iterator to navigate between files 1

Functions

configuration()

The configuration function is used to create folder in which the output text files created by the solveHSP function will be placed in. If the folder already exists (from a previous run), it will be deleted).

run_benchmarks()

Run all benchmarks and solve all pddl problems using HSP planner.

  • Here the run_benchmarks will iterate through:
    1. src/test/resources/benchmarks/pddl/ipc2000/blocks/strips-typed
    2. src/test/resources/benchmarks/pddl/ipc2002/depots/strips-automatic
    3. src/test/resources/benchmarks/pddl/ipc1998/gripper/strips
    4. src/test/resources/benchmarks/pddl/ipc1998/logistics/strips-round1
  • Use the src/test/resources/benchmarks/pddl/[ipc_folders]/[benchmarks]/[benchmark_types]/domain.pddl file.
  • Iterate throught all pddl files in this benchmark’s folder.
  • And solve this problem using this domain with the solveHSP() function.

solveHSP()

Use HSP planner to plan the problem_name problem file using domain_name domain file with the several planner options. The output of this planification will be written inside a text file named ${benchmarks[index_folder]}/${benchmarks[index_folder]}_${index_file}.txt. After a run, we can find files like : blocks/blocks_1.txt, depots/depots_15.txt.

Run the bash script

Because this script is using the pddl library stored in pddl4j/build/libs/ folder. We must run this script from pddl4j/ folder.

bash src/test/resources/validators/testPlan.sh

Authors

@hugoapeloig @maleusa @mathysc

clergetm avatar Apr 08 '23 17:04 clergetm