JongseongChae / RIME

Implementation of Robust Imitation Learning against Variations in Environment Dynamics
MIT License
84 stars 2 forks source link
deep-reinforcement-learning dynamics-variation imitation-learning reinforcement-learning robust-imitation-learning robust-optimization robustness

Robust Imitation learning with Multiple perturbed Environments (RIME)

This repository is an implementation of Robust Imitation Learning against Variations in Environment Dynamics published to ICML 2022.

The RIME code are modified from the codes of pytorch-a2c-ppo-acktr.

Supported Environments

For perturbed tasks, I only used mujoco200 and made these MuJoCo tasks with perturbed dynamics by changing components in xml files for the tasks to introduce fixed dynamics perturbations. For more details, please go to the environments folder.

Requirements

I provide all libraries and packages for this codes.

pip install -r requirements.txt

Run Example

For training agents (over 10 random seeds), we can change env-parameter & algo-name for selecting other dynamics perturbation type (for single dynamics parameter cases) or training other algorithms as follows:

train the agent in the 3 sampled interaction environments setting

python main.py --env-name=Hopper-v2 --env-parameter=gravity --sampled-envs=3 --algo-name=RIME+WSD

train the agent in the 4 sampled interaction environments setting (2-dim perturbation parameter case)

python main.py --env-name=Hopper-v2 --sampled-envs=4 --algo-name=RIME+WSD