Code Monkey home page Code Monkey logo

dqn_atari's Introduction

Deep Q Network (DQN)

A Tensorflow implementation of a Deep Q Network (DQN) for playing Atari games.

Trained on OpenAI Gym Atari environments.

Based on Human-Level Control through Deep Reinforcement Learning. This implementation includes the improvements to the original DQN detailed in the above paper, namely:

  • Larger network
  • Longer training
  • Target network
  • Huber loss

Requirements

Note: Versions stated are the versions I used, however this will still likely work with other versions.

Usage

The default environment is 'BreakoutDeterministic-v4'. To use a different environment simply pass the environment in via the --env argument when running the following files.

  $ python train.py

This will train the DQN on the specified environment and periodically save checkpoints to the /ckpts folder.

  $ ./run_every_new_ckpt.sh

This shell script should be run alongside the training script, allowing to periodically test the latest network as it trains. This script will monitor the /ckpts folder and run the test.py script on the latest checkpoint every time a new checkpoint is saved.

  $ python play.py

Once we have a trained network, we can visualise its performance in the game environment by running play.py. This will play the game on screen using the trained network.

Results

Result of training the DQN on the 'BreakoutDeterministic-v4' environment:

References

License

MIT License

dqn_atari's People

Contributors

msinto93 avatar

Stargazers

Salman Khalil avatar Media Explorer avatar Qin Zheng avatar Sean avatar 坂本 avatar Kolin Guo avatar Adriano Machado avatar  avatar

Watchers

Media Explorer avatar  avatar

dqn_atari'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.