/Flappy-bird-pytorch

DQN and more for playing flappy bird game

Primary LanguagePythonMIT LicenseMIT

Deep Q-learning for playing Flappy Bird with Pytorch

Introduction

A small project during summer at THU Graduate School in Shenzhen. In this project, I implemented and compared various classic reinforcement learning algorithms, especially different variants of DQN (Deep Q-Network), and evolutionary algorithms within the context of the Flappy Bird game. There is still some work in progress and some interesting part to be explored in the future. You can find a summary of interesting ML algorithms from this repo:Andy-wyx/machine-learning-algorithms


Requirements

  • python
  • pygame
  • cv2
  • pytorch
  • numpy

TBD

Algorithms

  • LSTM
  • rainbow dqn
  • more implementation of Evolutionary Algorihms (EA) i.e. Genetic Algorithm and Evolution Strategy
  • PPO
  • distributed learning in RL (parallel or asynchronous)

Trainning the model

  • a better CNN, maxpooling ...
  • frameskipp
  • some reward engineering
  • NAS: Network Architecture Search

Others

  • Encapsulate the flappy bird env (you can even try to publish it onto the Gymnasium)
  • add save & load
  • enable human mode
  • enable GPU mode
  • enable CPU/GPU utilization monitoring

Reference

Playing Atari with Deep Reinforcement Learning

Disclaimer

The flappy bird environment is implemented based on the repo uvipen/Flappy-bird-deep-Q-learning-pytorch.

There are many repos about flappy bird agents or some other atari games, you might find some of them useful as well:

Flappy Bird

Atari Pong