Skip to content

Play flappy bird using reinforcement Learning. Trying to implement using keras

License

Notifications You must be signed in to change notification settings

pratikab/flappy_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flappy Bird Using Reinforcement Learning in Keras

Objective

Learn to play Flappy Bird game using Reinforcement Learning. For deep learning I have used keras for its simplicity. I am using Q-learning algorithm to achieve this. You can find paper here.

How to run

  • Install tensorflow, keras, pygame and opencv
  • python flappy_reinforced.py ==> You can either test using pretrained weights or choose to train from scratch

Keras Model

Layer (type) Output Shape Param #
input_1 (InputLayer) (None, 80, 80, 4) 0
conv2d_1 (Conv2D) (None, 20, 20, 32) 8224
max_pooling2d_1 (MaxPooling2 (None, 10, 10, 32) 0
conv2d_2 (Conv2D) (None, 5, 5, 64) 32832
conv2d_3 (Conv2D) (None, 5, 5, 64) 4160
flatten_1 (Flatten) (None, 1600) 0
dense_1 (Dense) (None, 512) 819712
dense_2 (Dense) (None, 2) 1026

Credits

Releases

No releases published

Packages

No packages published

Languages