Code Monkey home page Code Monkey logo

adaeq_neurips21's Introduction

AdaEQ source code

This repo is the author's implementation of Adaptive Ensemble Q-learning (AdaEQ). The paper is available at https://openreview.net/pdf?id=YL6e9oSeInj. This code is a modification of the Randomized Ensembled Double Q-Learning (REDQ) algorithm. Paper link: https://arxiv.org/abs/2101.05982.

Update

We notice the REDQ algorithm has been updated lately in the author's repo (link: https://github.com/watchernyu/REDQ). Thanks for the effort by the author and we are also working hard on releasing the compatible version as soon as possible.

Code structure explained

The code structure is identical with REDQ algorithm.

experiments/train_ada.py: Our implementation of AdaEQ algorithm.

experiments/avg.py: Our implementation of Averge-DQN algorithm.

experiments/train_redq_sac.py: you will find the main training loop. Here we set up the environment, initialize an instance of the REDQSACAgent class, specifying all the hyperparameters and train the agent. You can run this file to train a REDQ agent.

redq/algos/redq_sac.py: We modify the original REDQSACAgent to include the testing and error estimation function.

redq/algos/core.py: We use the identical code as in REDQ algorithm which provides code for some basic classes (Q network, policy network, replay buffer) and some helper functions. These classes and functions are used by the REDQ agent class.

redq/utils: We use the identical code as in REDQ algorithm which provides some utility classes (such as a logger) and helper functions that mostly have nothing to do with REDQ's core components.

Implementation tutorial

We plan to also release a video tutorial to help people understand and use the code. Once we finish it, we will post the link on this page.

Environment setup

Note: We use the idential setup as in REDQ. Please refer to https://github.com/watchernyu/REDQ for details.

Train an REDQ agent

To train an AdaEQ agent, run:

python experiments/train_ada.py

To train an REDQ agent, run:

python experiments/train_redq_sac.py

To train an Averge-DQN agent, run:

python experiments/train_avg.py

Acknowledgement

Our code for REDQ-SAC is partly based on the REDQ implementation (https://github.com/watchernyu/REDQ).

adaeq_neurips21's People

Contributors

ustcmike avatar

Stargazers

 avatar RuiLiu avatar MaksV79 avatar

Watchers

 avatar

adaeq_neurips21's Issues

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.