项目作者: GuilhermeGSousa

项目描述 :
Keras implementation of a DQN agent for solving OpenAI's Flappy Bird environment
高级语言: Python
项目地址: git://github.com/GuilhermeGSousa/rl-flappy-bird.git
创建时间: 2018-10-20T17:44:52Z
项目社区:https://github.com/GuilhermeGSousa/rl-flappy-bird

开源协议:

下载


rl-flappy-bird


Keras implementation of a DQN agent for solving OpenAI’s Flappy Bird environment

Installing things and such


To install the environment, PLE and PyGame:

PyGame

On OSX:

  1. brew install sdl sdl_ttf sdl_image sdl_mixer portmidi # brew or use equivalent means
  2. conda install -c tlatorre pygame=1.9.2 # using Anaconda

On Ubuntu 14.04:

  1. apt-get install -y python-pygame

More configurations and installation details on: http://www.pygame.org/wiki/GettingStarted#Pygame%20Installation

PLE

  1. git clone https://github.com/ntasfi/PyGame-Learning-Environment.git
  2. cd PyGame-Learning-Environment/
  3. pip install -e .

and finally in order to use PLE as an OpenAI gym environment

Gym PLE

  1. pip install gym_ple

Keras

Given that the agent is implemented using Keras, having it installed may proove useful, to do so:

  1. sudo pip install keras

As a backend for Keras I highly recommend gpu-enabled tensorflow

Using the agent


To train the agent simply run

  1. python flappy_bird.py