Giter Club home page Giter Club logo

drqn-tensorflow's Introduction

DRQN-tensorflow

Deep Recurrent Q Learning using Tensorflow, openai/gym and openai/retro

This repository contains code for training a DQN or a DRQN on openai/gym Atari and openai/retro environments.

Note that training on Retro environments is completely experimental as of now and these environments have to be wrapped to reduce the action space to a more sensible subspace of all actions for each game. The wrapper currently implemented only makes sense for the SEGA Sonic environments.

Installation

You can install all dependencies by issuing following command:

pip install -r requirements.txt

This will install Tensorflow without GPU support. However, I highly recommend using Tensorflow with GPU support, otherwise training will take a very long time. For more information on this topic please see https://www.tensorflow.org/install/. In order to run the retro environments, you have to gather the roms of the games you want to play and import them: https://github.com/openai/retro#roms

Running

You can start training by:

python main.py --gym=gym --steps=10000000 --train=True --network_type=dqn --env_name=Breakout-v0

This will train a DQN on Atari Breakout for 10 mio observations. For more on command line parameters please see

python main.py -h

Visualizing the training process can be done using tensorboard by:

tensorboard --logdir=out

Pretrained models

A pretrained model for Breakout is available in pretrained_models

Result after training for 10mio steps (approx. 11 hours on GTX 1080 Ti)

Alt Text

References

  1. DQN-tensorflow
  2. Playing Atari with Deep Reinforcement Learning
  3. Playing FPS Games with Deep Reinforcement Learning
  4. Deep Recurrent Q-Learning for Partially Observable MDPs

drqn-tensorflow's People

Contributors

dependabot[bot] avatar marctuscher 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

drqn-tensorflow's Issues

min_history and state_to_update

Hi, I want to use DRQN for my research, and I don't understand the parameters "min_history" and "state_to_update" in train. Could you give me a further explanation?

cannot restore session correctly.

Hello:

I have saved the session and I am trying to restore it. However, I think the reply buffer is referenced before it is defined.

Thanks

Bootstrapped Sequential Updates

Do you try to train model by Bootstrapped Sequential Updates? I do not know how to choose the batch and I will appreciate it if you can help me.

About drqn

Thanks for your code, but I meet some problems.I ran the code used drqn but I found it ran much slower than dqn and the result was also worse than dqn, did I make some mistakes?

requirements.txt

I run the command: pip3 install -r requirements.txt
lots of packages go back to elder version....
I believe you can make it work better.
thanks to you code~

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.