Skip to content
Using Ordered Neuron to learn hierachy from demontration without annotation
Python C Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
EVALB
gym-minigrid @ ce7b29e
hier_rl_on
scripts
.gitignore
.gitmodules
README.md
enjoy.py
generate_demos.py
gui.py
setup.py
test_parse.py
train_il.py
train_rl.py

README.md

Install

  1. git clone --recursive this_repo
  2. Follow the installation of babyai and gym-minigrid.
  3. Set environment variable BABYAI_STORAGE
  4. Go to project root and do pip install -e ..

Test Installation

cd babyai & ./run_tests.py

Get demonstration

Run

./generate_demos.py --num-task 5 --seed 1

This will generate demos for pickup environments. The expert data with appear under ${BABYAI_STORAGE}/demos. You can view the demo by

./babyai/scripts/enjoy.py --env ${ENV_NAME}
    --demos ${ENV_NAME}_agent --seed 1

Training

./train_il.py --env ${ENV_NAME} \
    --demos-origin agent --batch-size 128
    --mem-arch ['lstm'|'onlstm'] --tb

You will find corresponding tensorboard and model checkpoints at BABYAI_STORAGE

Check Model Performance

./enjoy.py --env ${ENV_NAME} --model ${MODEL_NAME}

Generate parse tree

./test_parse.py --env ${ENV_NAME} \
    --demos-origin agent --batch-size 4
    --model ${MODEL_NAME}

You will see a pickle file trees.pkl in the corresponding model dir.

You can’t perform that action at this time.