Coder Social home page Coder Social logo

tcrl's Introduction

TCRL: Simplified Temporal Consistency Reinforcement Learning

This is the PyTorch implementation of Simplified Temporal Consistency Reinforcement Learning (TCRL).

Method

TCRL shows that, a simple representation learning approach relying only on a latent dynamics model trained by latent temporal consistency is sufficient for high-performance RL. This applies when using pure planning with a dynamics model conditioned on the representation, but, also when utilizing the representation as policy and value function features in model-free RL. In experiments, our approach learns an accurate dynamics model to solve challenging high-dimensional locomotion tasks with online planners while being 4.1× faster to train compared to ensemble-based methods. With model-free RL without planning, especially on high-dimensional tasks, such as the DeepMind Control Suite Humanoid and Dog tasks, our approach outperforms model-free methods by a large margin and matches model-based methods’ sample efficiency while training 2.4× faster.

video video video video video video

video video video video video video

Instructions

Install dependencies

conda env create -f environment.yaml
conda activate tcrl

Train the agent

python main.py task=walker_walk

To log metircs with wandb

python main.py task=walker_walk use_wandb=true

You can also save video, replay buffer, trained model and logging by setting save_<video/buffer/model/logging>=true. All tested tasks are listed in cfgs/task

Results are saved in results/tcrl.csv. The results/plot.ipynb file can be used to plot resutls.

Citation

If you use this repo in your research, please consider citing our original paper:

@article{zhao2023simplified,
  title={Simplified Temporal Consistency Reinforcement Learning},
  author={Zhao, Yi and Zhao, Wenshuai and Boney, Rinu and Kannala, Juho and Pajarinen, Joni},
  journal={arXiv preprint arXiv:2306.09466},
  year={2023}
}

Acknowledgements

We thanks the TD-MPC, SAC-PyTorch and DrQv2 authors for their high-quality source code.

tcrl's People

Contributors

zhaoyi11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.