Giter Club home page Giter Club logo

meta-q-learning's Introduction

Meta-Q-Learning

This paper introduces Meta-Q-Learning (MQL), a new off-policy algorithm for meta-Reinforcement Learning (meta-RL). MQL builds upon three simple ideas. First, we show that Q-learning is competitive with state-of-the-art meta-RL algorithms if given access to a context variable that is a representation of the past trajectory. Second, a multi-task objective to maximize the average reward across the training tasks is an effective method to meta-train RL policies. Third, past data from the meta-training replay buffer can be recycled to adapt the policy on a new task using off-policy updates. MQL draws upon ideas in propensity estimation to do so and thereby amplifies the amount of available data for adaptation. Experiments on standard continuous-control benchmarks suggest that MQL compares favorably with the state of the art in meta-RL.

This repository provides the implementation of Meta-Q-learning. If you use this code please cite the paper using the bibtex reference below.

@misc{fakoor2019metaqlearning,
    title={Meta-Q-Learning},
    author={Rasool Fakoor and Pratik Chaudhari and Stefano Soatto and Alexander J. Smola},
    year={2019},
    eprint={1910.00125},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

Getting Started

python run_script.py --env cheetah-dir --gpu_id 0 --seed 0

'env' can be humanoid-dir, ant-dir, cheetah-vel, cheetah-dir, ant-goal, and walker-rand-params. The code works on GPU and CPU machine. For the experiments in this paper, we used p3.2xlarge. For complete list of hyperparameters, please refer to the paper appendix.

In order to run this code, you will need to install Pytorch and MuJoCo. If you face any problem, please follow PEARL steps to install.

New Environments

In order to run code with a new environment, you will need to first define an entry in ./configs/pearl_envs.json. Look at ./configs/abl_envs.json as a reference. In addation, you will need to add an env's code to rlkit/env/.

Acknowledgement

  • rand_param_envs and rlkit are completely based/copied on/from following repositories: rand_param_envs and PEARL. Thanks to their authors to make them available. We include them here to make it easier to run and work with this repository.

License

This code is licensed under the CC-BY-NC-4.0 License.

Contact

Please open an issue on issues tracker to report problems or to ask questions or send an email to me, Rasool Fakoor.

meta-q-learning's People

Contributors

rasoolfakoor avatar amazon-auto avatar

Watchers

James Cloos 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.