
* Dependencies

** Python dependencies

Install anaconda, then

#+begin_src 
conda env create -f environment.yml
#+end_src

** APT packages

#+begin_src 
sudo apt install mercurial g++ cmake make flex bison g++-multilib git build-essential automake libcurl4-openssl-dev parallel zlib1g-dev awk
#+end_src

** Common Lisp dependencies (necessary for running the PDDL generator)

Install Roswell (https://roswell.github.io/),

#+begin_src 
git clone -b release https://github.com/roswell/roswell.git
cd roswell
sh bootstrap
./configure
make
sudo make install
ros setup
#+end_src

then install/compile the dependencies:

#+begin_src 
ros dynamic-space-size=8000 install numcl/numcl guicho271828/magicffi guicho271828/dataloader
#+end_src

** C++ dependencies (necessary for running the planner)

Build Fast Downward planner:

#+begin_src 
hg clone http://hg.fast-downward.org downward
cd downward
./build.py -j $(cat /proc/cpuinfo | grep -c processor) release
#+end_src

* Training

+ Download the 1billion dataset from https://www.statmt.org/lm-benchmark/ and uncompress it
+ In the uncompressed directory, make a validation directory =validation-monolingual.tokenized.shuffled=
+ Move the first file in the training set =training-monolingual.tokenized.shuffled= into the validation directory
+ Customize =example-1billion-ccc.sh= for
  + your dataset directory in =data= varaible
  + your job scheduler submission command in =submit= variable
+ Then run =example-1billion-ccc.sh=, which will run 225 models in total, each taking maximum 1 day.

We could not upload the pretrained weight because each weight file (npz, compressed) has around 1GB maximum,
which exceeds the limit for the supplementary material.

* Evaluation and plot generation

Run =evaluate-all.sh=.  Each hyperparameter must be evaluated in 6-7 modes. Some
finishes quickly, while others take maximum around 2 hours.
Some modes will generate several visualization plots in each model directory.

When all evaluation has finished, run =benchmark.py may21=
to create a csv file containing the overall performance statistics.

* Paraphrasing PDDL generation and planning

+ Go to =paraphrasing/= directory.
+ Customize the following files similarly for your job scheduler:
  + 1-generate-base-domain.sh
  + 2-generate-soft-domain.sh
  + 4-generate-paraphrase-problem.sh
  + 5-generate-plan.sh
+ Run =all-generate.sh=
  + Note: it is essential to run =evaluate-all.sh= above before running this script.
+ Run =all-plan.sh=
  + Each planning takes 4 hours, and there are 2 configurations x 68 problem instances.
+ Run =all-summarize.sh= for the summary log
+ Run =all-dump.sh= for statistics

