/lexa

Discovering and Achieving Goals via World Models, NeurIPS 2021

Primary LanguagePythonMIT LicenseMIT

Discovering and Achieving Goals via World Models

Russell Mendonca*1, Oleh Rybkin*2, Kostas Daniilidis2, Danijar Hafner3,4, Deepak Pathak1
(* equal contribution, random order)

1Carnegie Mellon University
2University of Pennsylvania
3Google Research, Brain Team
4University of Toronto

Official implementation of the Lexa agent from the paper Discovering and Achieving Goals via World Models.

Setup

Create the conda environment by running :

conda env create -f environment.yml

Clone the lexa-benchmark repo, and modify the python path
export PYTHONPATH=<path to lexa-training>/lexa:<path to lexa-benchmark>

Export the following variables for rendering
export MUJOCO_RENDERER=egl; export MUJOCO_GL=egl

Training

First source the environment : source activate lexa

For training, run :

export CUDA_VISIBLE_DEVICES=<gpu_id>  
python train.py --configs defaults <method> --task <task> --logdir <log path>

where method can be lexa_temporal, lexa_cosine, ddl, diayn or gcsl
Supported tasks are dmc_walker_walk, dmc_quadruped_run, robobin, kitchen, joint

To view the graphs and gifs during training, run tensorboard --logdir <log path>

Bibtex

If you find this code useful, please cite:

@misc{lexa2021,
    title={Discovering and Achieving Goals via World Models},
    author={Mendonca, Russell and Rybkin, Oleh and
    Daniilidis, Kostas and Hafner, Danijar and Pathak, Deepak},
    year={2021},
    Booktitle={NeurIPS}
}

Acknowledgements

This code was developed using Dreamer V2 and Plan2Explore.