Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanpanlau/Keras-FlappyBird
Using Keras and Deep Q-Network to Play FlappyBird
https://github.com/yanpanlau/Keras-FlappyBird
Last synced: 3 months ago
JSON representation
Using Keras and Deep Q-Network to Play FlappyBird
- Host: GitHub
- URL: https://github.com/yanpanlau/Keras-FlappyBird
- Owner: yanpanlau
- Created: 2016-07-12T11:15:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T16:01:38.000Z (over 5 years ago)
- Last Synced: 2024-07-19T02:14:50.779Z (4 months ago)
- Language: Python
- Size: 30.8 MB
- Stars: 434
- Watchers: 31
- Forks: 194
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keras-FlappyBird
A single 200 lines of python code to demostrate DQN with Keras
Please read the following blog for details
https://yanpanlau.github.io/2016/07/10/FlappyBird-Keras.html
![](animation1.gif)
# Installation Dependencies:
* Python 2.7
* Keras 1.0
* pygame
* scikit-image# How to Run?
**CPU only**
```
git clone https://github.com/yanpanlau/Keras-FlappyBird.git
cd Keras-FlappyBird
python qlearn.py -m "Run"
```**GPU version (Theano)**
```
git clone https://github.com/yanpanlau/Keras-FlappyBird.git
cd Keras-FlappyBird
THEANO_FLAGS=device=gpu,floatX=float32,lib.cnmem=0.2 python qlearn.py -m "Run"
```If you want to train the network from beginning, delete the model.h5 and run qlearn.py -m "Train"