/spaceShooter_DQN

DQN with target network for spaceshooter

Primary LanguagePython

SpaceShooter in DQN

Overview

This work is based on the game SpaceShooter

I do these things on it:

  • wrap the game for training
  • test DQN algorithm on it

Installation Dependencies:

  • Python3
  • TensorFlow >= 1.1.0
  • tflearn
  • pygame
  • OpenCV-Python

How to Install

  • my system is win10, linux/mac is a little defferent but easier
pip install tensorflow
pip install tflearn
pip install opencv-python

  pygame click here: PyGame
  tensorflow gpu click here: Windows10 64位下安装TensorFlow - 官方原生GPU版安装

How to Run

  • Test the model
python main.py
  • Continue training
python main.py --train True
  • Play the game by yourself
python main.py --human_play True
  • Human Controls
Button
Move Left left
Move right right
Fire bullets spacebar
Quit game Esc

DQN Algorithm

This algorithm is on paper Human-level control through deep reinforcement learning

Details

  • The DQN code is nearly the same with FlappyBird_DQN_with_target_network
  • When train,you can wipe off the background or not
  • The algorithm is not very effective given the game is so easy.And its performance is very unstable.