Skip to content
Python implementation of a Q-Learning AI that plays @TimoWilken's Flappy Bird
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Flappy Bird - QLearning

WARNING: If you are a Pitt Student -- Do NOT copy/paste this code for your homework assignment

Your professor knows you're doing it, and you will get caught. Do your own work.

I also have this linked from my blog and don't feel like breaking links by making this private to stop you from cheating. Just don't.


This project contains the implementation of a Q-Learning Artificial Intelligence for learning to play the popular video game Flappy Bird.

The project folder is divided into two sections:

  • The original game (unmodified, and made by @TimoWilken)
  • My modified game which contains an AI-Agent made to learn and play Flappy Bird automatically

Source Code

The source code for my AI contained in the folder named 'updated_game'

Running the program

To use my smart bird, simply take the following steps:

  • cd into a directory containing my source code
  • Ensure that this directory includes the file named ‘qdata.txt’
  • Run the command:
    python "qdata.txt"
  • Watch Flappy crush it. (the game will run 10x)


Based on the current qdata.txt file, I have seen Flappy get well over 100 pipes. Flappy


The report for this section is found starting on the first page of the document located at: /ADP59-CS1571-HW03-REPORT.pdf


This source code is written using python version 2.7.8



This project depends upon Python v. 2.7.8

I am also using the itertools python library

You must also have the config files you intend to read from in the same directory as the source code

Built With

  • Python v. 2.7.8
  • PyCharm


You can’t perform that action at this time.