Code Monkey home page Code Monkey logo

dqn's Introduction

Rainbow-DQN for Keras-rl in SC2

Applying the DQN-Agent from keras-rl to Starcraft 2 Learning Environment and modding it to to use the Rainbow-DQN algorithms.


Current state of the project

Final Paper (german): read here

  • Naive DQN with basic keras-rl dqn agent
  • Fully-conv network with 2 outputs (described in this deepmind paper)
  • Double DQN (described here)
  • Dueling DQN (described here)
  • Prioritized experience replay (described here)
  • Multi-step learning (described here)
  • Noisy nets (described here)
  • Distributional RL - working, but not learning (described here)
  • Final rainbow agent without Distributional RL

Installation:

Make sure, you have Python 3.6.

Follow the instructions on the pysc2 repository for installing it as well as for installing StarCraft2 and the required mini_games Maps.

Follow the instructions on the keras-rl repository for installation.

Follow the instructions on the baselines repository for installation.

You will also need the following python packages installed:

  • tensorflow 1.12 (newer is currently not working with CUDA support for me)
  • keras 2.2.4
  • numpy
  • matplotlib

If you want to use a CUDA-able GPU, install tensorflow-gpu and keras-gpu as well. You need to make sure to have a compatible driver and CUDA-toolkit (9.0 works for me) and the cudnn library (7.1.2 works for me) installed. This provides a 5x to 20x SpeedUp and therefor is recommended for training.

Running it on Linux is recommended for training as well, because it is required for running the game headless with up to 2x speedup.

Download the project files:

git clone https://github.com/chucnorrisful/dqn.git

The executable is located in exec.py - just set some Hyperparameters and run it!

The plot.py file provides some visualisation, but you have to manually enter the path to a (created by execution) log file.


Challenges and Benchmarks (Deepmind SC2 minigames)

  • MoveToBeacon [mean: 25,64, max: 34]
  • CollectMineralShards [mean: 89, max: 120]
  • FindAndDefeatZerglings
  • DefeatRoaches
  • DefeatZerglingsAndBanelings
  • CollectMineralsAndGas
  • BuildMarines

dqn's People

Contributors

chucnorrisful avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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