This code is implementation for ICLR 2022 Submission "Auto-Encoding Inverse Reinforcement Learning". 



It follows the code from the OpenAI Baselines: https://github.com/andrewliao11/gail-tf

You Should install some requirements which are the same with OpenAI Baselines.

How to run this code, take Walker2d as a example,
Configuration:

cd AEIRL  #this fold

export ENV_ID="Walker2d-v2"
export SAMPLE_STOCHASTIC="False"           
export STOCHASTIC_POLICY="False" 

# for non-noisy expert data
export PICKLE_PATH=data/stochastic.ppo.Walker2d.0.00.pkl
# for noisy expert data
export PICKLE_PATH=data/stochastic.ppo.Walker2d.0.00noise3.pkl

python main.py --env_id $ENV_ID --expert_path $PICKLE_PATH


# Our paper test algorithms on Walker2d-v2, Hopper-v2 and Swimmer-v2 without BC pre-train while on Ant-v2, HalfCheetah-v2 and Humanoid-v2 with BC pre-train 1e4 iterations
# Default setting is without BC pre-train, to train the model with BC pre-train pls refer to main.py set the "--pretrained" parameter to be True or just run:

python main.py --env_id $ENV_ID --expert_path $PICKLE_PATH --pretrained True --BC_max_iter 10000


# Revision:
# With new revision dataset, each task with 16 trajectories, you can export the new dataset with "export PICKLE_PATH=######"


