8000 GitHub - wangyy161/DRL: Repository for codes of 'Deep Reinforcement Learning' · GitHub
[go: up one dir, main page]

Skip to content
wangyy161Public
forked from Kyushik/DRL

About

Repository for codes of 'Deep Reinforcement Learning'

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

120 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


I set up the DQN code as follows.

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

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

Performance

Youtube Link of Playing Breakout with NoisyNet DQN

The description of DRL algorithms

Description of algorithms link



Environment

Software

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

Hardware

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

  • GPU: GeForce GTX 1080

  • Memory: 8GB



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

About

Repository for codes of 'Deep Reinforcement Learning'

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0