7 mins version: DQN for flappy bird
Overview
This project follows the description of the Deep Q Learning algorithm described in Playing Atari with Deep Reinforcement Learning [2] and shows that this learning algorithm can be further generalized to the notorious Flappy Bird.
Installation Dependencies:
- Python 2.7 or 3
- TensorFlow 0.7
- pygame
- OpenCV-Python
How to Run?
git clone https://github.com/yenchenlin1994/DeepLearningFlappyBird.git
cd DeepLearningFlappyBird
python deep_q_network.py
What is Deep Q-Network?
It is a convolutional neural network, trained with a variant of Q-learning, whose input is raw pixels and whose output is a value function estimating future rewards.
For those who are interested in deep reinforcement learning, I highly recommend to read the following post:
Demystifying Deep Reinforcement Learning
Deep Q-Network Algorithm
The pseudo-code for the Deep Q Learning algorithm, as given in [1], can be found below:
Initialize replay memory D to size N
Initialize action-value