Package: planutils
planutilsGeneral library for setting up linux-based environments for developing, running, and evaluating planners.1. Running the latest Docker releaseThe released Docker image comes with the latest planutils pre-installed. Note that in order to
run a number of the planners (all those that are based on singularity), you will need
to run the docker with the--privilegedoption.Run the planutils containerdockerrun-it--privilegedaiplanning/planutils:latestbashActive the planutils environmentplanutilsactivateThis means that in order to run the latest release, it is not necessary to clone this repository.2. Making your own image with desired solversBelow is an example for creating your own Dockerfile based on the latest release, with pre-installed solversFROMaiplanning/planutils:latest# Install solvers and toolsRUNplanutilsinstall-yval
RUNplanutilsinstall-yplanning.domains
RUNplanutilsinstall-ypopf
RUNplanutilsinstall-yoptic
RUNplanutilsinstall-ysmtplan3. Running planutils from sourceYou can also run the latest unreleased version. For this, clone this repository and rundockerbuild.-tplanutils-dev:latest4. UsageExample of currently working functionality$ lama domain.pddl problem.pddl

Package not installed!
  Download & install? [Y/n] y

About to install the following packages: downward (36M), lama (20K)
  Proceed? [Y/n] y
Installing downward...
INFO:    Downloading shub image
 35.88 MiB / 35.88 MiB [=======================================] 100.00% 3.99 MiB/s 8s
Finished installing downward (size: 36M)
Installing lama...
Finished installing lama (size: 20K)
Successfully installed lama!

Original command: lama
  Re-run command? [Y/n] y

Parsing...
$Example of upcoming functionality$ planutils install ipc-2018
Installing planners
This will require 3Gb of storage. Proceed? [Y/n]
Fetching all of the planners from IPC-2018 for use on the command line...

$ planutils install server-environment
Setting up a webserver to call the installed planners...

$ planutils install development-environment
Installing common dependencies for building planners...
Installing common planning libraries...

$ planutils install planning-domains
Installing the command-line utilities...
Installing the python library...
Fetching default benchmarks...

$ planutils setup-evaluation configuration.json
Installing Lab...
Configuring Lab...
Ready!
Run eval.py to evaluate

$5. Add a new packagePackage ConfigurationCreate a folder for new pacakeg, the package name will be the used to call the planner laterSet up theinstall,run,uninstall, and manifest file. You can find the template files under packages/TEMPLATE folderWrite Manifest filePlease create a manifest file namedmanifest_compact.jsonif you want to use predefined templates in the packages/TEMPLATE/SERVICE_TEMPLATE folder. The fullmanifest.jsonwill be generated at the run time. You can overwrite the dafult template by restating the value of json fields.You can also create amanifest.jsonfile directly if you don't need the template.Manifest Example{"name":"LAMA-FIRST","description":"http://fast-downward.org/","install-size":"20K","dependencies":["downward"],"endpoint":{"services":{"solve":{"args":[{"name":"domain","type":"file","description":"domain file"},{"name":"problem","type":"file","description":"problem file"}],"call":"lama-first {domain} {problem}","return":{"type":"generic","files":"*plan*"}}}}}Define ArgsThere are four types of Args:file,int,stringand,categorical. You can add default value forint,string, andcategoricalarguments"args":[{"name":"domain","type":"file","description":"domain file"},{"name":"number_of_plans","type":"int","description":"Number of Plans","default":3},{"name":"custom_search_algorithm","type":"string","description":"Custom Search Algorithm","default":"kstar(blind(),k=1)"},{"name":"search_algorithm","type":"categorical","description":"Search Algorithm","choices":[{"display_value":"Kstar Blind k=1","value":"kstar(blind(),k=1)"},{"display_value":"Kstar Blind k=2","value":"kstar(blind(),k=2)"}],"default":"kstar(blind(),k=1)"}]Define Return TypesThere are three types of return data:generic,jsonandlog. Thegenerictype should be used for all the text based result, thelogtype should be used for planner like Optic and Tfd which didn't generate a proper plan, and the typejsonshould used for plan in JSON format.For the value offiles, you will have to write aglobpattern. Planning-as-service backend usesgloblibary to find and return all the files that matched."return":{"type":"generic/log/json","files":"*plan*"}