Keras implementation of a DQN agent for solving OpenAI's Flappy Bird environment
To install the environment, PLE and PyGame:
On OSX:
brew install sdl sdl_ttf sdl_image sdl_mixer portmidi # brew or use equivalent means
conda install -c tlatorre pygame=1.9.2 # using Anaconda
On Ubuntu 14.04:
apt-get install -y python-pygame
More configurations and installation details on: http://www.pygame.org/wiki/GettingStarted#Pygame%20Installation
git clone https://github.com/ntasfi/PyGame-Learning-Environment.git
cd PyGame-Learning-Environment/
pip install -e .
and finally in order to use PLE as an OpenAI gym environment
pip install gym_ple
Given that the agent is implemented using Keras, having it installed may proove useful, to do so:
sudo pip install keras
As a backend for Keras I highly recommend gpu-enabled tensorflow
To train the agent simply run
python flappy_bird.py