Giter Site home page Giter Site logo

noisynet-dqn's Introduction

NoisyNet-DQN

MIT License

I implement the NoisyNet for DQN-based RL algorithms. The code is evaluated on Atari2000, which is commonly used to benchmark the RL algorithms. Also, the tensorflow summary is added to better visualize the training process. More about my notes for NoisyNet can be found at @andrewliao11/Deep-Reinforcement-Learning-Survey

Disclaimer: this code is highly based on @openai/baselines. Thanks for the great works!

Benchmarking Environment

I train and evaluate on the following environments:

Results

orange: NoisyNet-DQN; blue: DQN

Experiment on Atlantis-NoFrameskip-v4:

Experiment on DoubleDunk-NoFrameskip-v4:

Experiment on DemonAttack-NoFrameskip-v4:

Experiment on Kangaroo-NoFrameskip-v4:

Experiment on Assault-NoFrameskip-v4:

Experiment on Breakout-NoFrameskip-v4:

Other experiment results will be added soon ๐Ÿ”ฅ (Benchmarking takes time so be patient.)

Note that I pick the environment that is favorable to NoisyNet, according to the paper experiment. In some specific environment, NoisyNet will result in equal or even worse peformance. (You are suggestted to read the paper if you're interested in this repo.)

The corresponding event files can be found at drive

The decreasing \sigma?

Different from OpenAI's paper, DM's paper uses learnable parameter to determine the scale of the noise. So, you might curious about the scale of the \sigma. Here, I train NoisyNet-DQN on DoubleDunk-NoFrameskip-v4 and record the mean of the \sigma:

Usage

First, copy the modified files to openai baselines (to support NoisyNet)

git clone --recursive https://github.com/andrewliao11/NoisyNet-DQN.git
cd NoisyNet-DQN
cp build_graph.py ./baselines/baselines/deepq/build_graph.py
cp tf_util.py ./baselines/baselines/common/tf_util.py

And add this line to your .bashrc (append to the PYTHONPATH)

export PYTHONPATH="PATH-TO-NoisyNet-DQN/baselines:$PYTHONPATH"

Train the agent and be patient

# with NoisyNet-DQN
python train.py --env Breakout --no-double-q --noisy --save-dir MODEL_PATH
# with vanilla DQN
python train.py --env Breakout --no-double-q --save-dir MODEL_PATH

Basic requirement

  • tensorflow
  • python > 3.5
  • gym[atari]

Acknowledgements

  • @openai/baselines

Reference

  • Noisy Networks for Exploration
  • Human-level control through deep reinforcement learning
  • Deep Reinforcement Learning with Double Q-learning
  • Dueling Network Architectures for Deep Reinforcement Learning

noisynet-dqn's People

Contributors

andrewliao11 avatar

Stargazers

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

Watchers

 avatar  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.