Coder Social home page Coder Social logo

dqn's Introduction

DQN

This is a hobby project to learn DQN reinforcement learning.

The implementation is quite standard DQN, including

  • Simple feedforward network to approximate state-value function
  • Replay memory
  • Separate target network that is "smoothed" version of policy net

I'm planning to add some experimental features. Now there are few

  • Option for ensemble learning
    • Voting best action based on multiple models
    • Finding most uncertain actions in exploration phase using multiple models
  • Option for adding reward bonus based on (hashed) state count as exploration strategy
  • Option to use priority based sampling from replay memory; priority defined by temporal difference error

Examples

Grid world with obstacles

Game

  • Grid world, 30 x 30
  • One target and 15 obstacles
  • Rewards:
    • target: +10
    • obstacle: -10
    • otherwise: -0.01
  • Robot starts from (0,0) and has 200 steps time to find target at (20, 20)

Testing

  • Test done with for different methods:
    • Standard
    • Priority sampling, based on temporal difference errors
    • Count based exploration
    • Ensemble
  • For each method, the run is repeated 20 times
  • Each run is 1000 episodes
  • Smoothed (running mean, 50 episodes) reward is calculated for each run

See details: src/samples/sample_method_comparison.py

Results

Example run (method: priority sampling):

20 runs with standard DQN:

20 runs with priority sampling:

20 runs with count based exploration:

20 runs with ensemble:

Comparison of methods, average of 20 runs from each:

References

Prioritized Experience Replay

Tom Schaul, John Quan, Ioannis Antonoglou, David Silver

http://arxiv.org/abs/1511.05952

#Exploration: A Study of Count-Based Exploration for Deep Reinforcement Learning

Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, Xi Chen, Yan Duan, John Schulman, Filip De Turck, Pieter Abbeel

https://arxiv.org/abs/1611.04717

dqn's People

Contributors

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