# Learning Invariant Representations for Reinforcement Learning without Reconstruction
## Requirements
We assume you have access to a gpu that can run CUDA 9.2. Then, the simplest way to install all required dependencies is to create an anaconda environment by running:
```
conda env create -f conda_env.yml
```
After the installation ends you can activate your environment with:
```
source activate dbc
```
## Instructions
To train a DBC agent on the `cheetah run` task from image-based observations run:
```
python train.py \
--domain_name cheetah \
--task_name run \
--encoder_type pixel \
--decoder_type identity \
--action_repeat 4 \
--save_video \
--save_tb \
--work_dir ./log \
--seed 1
```
This will produce 'log' folder, where all the outputs are going to be stored including train/eval logs, tensorboard blobs, and evaluation episode videos. One can attacha tensorboard to monitor training by running:
RLOSS - average reconstruction loss (only if it is trained from pixels and decoder)
```
while an evaluation entry:
```
| eval | S: 0 | ER: 21.1676
```
which just tells the expected reward `ER` evaluating current policy after `S` steps. Note that `ER` is average evaluation performance over `num_eval_episodes` episodes (usually 10).
You can download the Kinetics 400 dataset and grab the driving_car label from the train dataset to replicate our setup. Some instructions for downloading the dataset can be found here: https://github.com/Showmax/kinetics-downloader.