Meta-Learning Shared Hierarchies
Code for Meta-Learning Shared Hierarchies.
Installation
Add to your .bash_profile (replace ... with path to directory):
export PYTHONPATH=$PYTHONPATH:/.../mlsh/gym;
export PYTHONPATH=$PYTHONPATH:/.../mlsh/rl-algs;
Install MovementBandits environments:
cd test_envs
pip install -e .
Running Experiments
python main.py --task OverCooked --num_subs 5 --macro_duration 4 --num_rollouts 16 --warmup_time 9 --train_time 1 --replay False --exp mlsh --obs-type 'image' --env-name "OverCooked" --reward-level 1 --log-behavior-interval 5
Once you've trained your agent, view it by running:
python main.py [...] --replay True --continue_iter [your iteration] AntAgent
The MLSH script works on any Gym environment that implements the randomizeCorrect() function. See the envs/ folder for examples of such environments.
To run on multiple cores:
mpirun -np 12 python main.py ...