GithubHelp home page GithubHelp logo

kyushik / drl Goto Github PK

View Code? Open in Web Editor NEW
214.0 10.0 43.0 7.81 MB

Repository for codes of 'Deep Reinforcement Learning'

Python 100.00%
dqn deep-reinforcement-learning double-dqn deep-recurrent-q-network ddqn drqn dueling-dqn prioritized-experience-replay prioritized-replay drl

drl's Introduction

DRL

Introduction

This repository is the codes for Deep Reinforcement Learning
I verified my codes with games. The games are made with pygame. I made the games or I modified them to apply for DRL.

Also, environments, which are made by Unity ML-agents, are in Unity_ML_Agent Repository


Performance of each algorithm that I implemented are as follows (verified with Breakout).

Performance

Result

Youtube Link of Playing Breakout with NoisyNet DQN

I set up the DRL code as follows.

  1. Human-level Control Through Deep Reinforcement Learning (DQN)
  2. Deep Reinforcement Learning with Double Q-Learning (DDQN)
  3. Prioritized Experience Replay (PER)
  4. Dueling Network Architecture for Deep Reinforcement Learning (Dueling DQN)
  5. Noisy Networks for Exploration (NoisyNet DQN)
  6. A Distributional Perspective on Reinforcement Learning (C51)
  7. Learning to Predict by the Methods of Temporal Differences (N-step DQN)
  8. Deep Recurrent Q-Learning for Partially Observable MDPs (DRQN)
  9. Distributional Reinforcement Learning with Quantile Regression(QR-DQN)
  10. Implicit Quantile Networks for Distributional Reinforcement Learning(IQN)
  11. Curiosity-driven Exploration by Self-supervised Prediction (ICM)
  12. Exploration by Random Network Distillation(RND)

This is the PPT file for the description of DQN codes that I implemented.

The description of DRL algorithms

Description of algorithms link



Environment

Software

  • Windows7 (64bit)
  • Python 3.6.5
  • Anaconda 4.2.0
  • Tensorflow-gpu 1.12.0
  • pygame 1.9.3
  • opencv3 3.1.0

Hardware

  • CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHZ

  • GPU: GeForce GTX 1080TI

  • Memory: 16GB



Implementation

The sample code for my environment is Environment_sample.py

# This is sample code for Deep Reinforcement Learning testing environment 

# Import modules
import sys 
import numpy as np
import random

# Import games
sys.path.append("DQN_GAMES/")

# add as game the one that you want to play!! 
import pong as game
import dot  
import dot_test  
import tetris  
import wormy
import breakout

# Get Number of action and name of game from the game code
Num_action = game.Return_Num_Action()
game_name = game.ReturnName()

# Get game state class from game code
game_state = game.GameState()

while True:
    # Choose random action
    action = np.zeros([Num_action])
    action[random.randint(0, Num_action - 1)] = 1.0

    # You can get next observation, reward and terminal after action
    observation_next, reward, terminal = game_state.frame_step(action)

You can run the game with random action using this code!!

Please check that you made the folder for saved variables

checkpoint = tf.train.get_checkpoint_state("saved_networks_DQN")

Then you are ready to implement the code! ๐Ÿ˜†



Games

Most of the games are made with python and pygame!

The codes are easy to understand and variables are easy to understand.

So fix the code as you want!! ๐Ÿ˜†

Description of the games

Specific description of games

drl's People

Contributors

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