Flappy Bird clone played by a Model Predictive Control (MPC) based algorithm implemented with CVXPY module.
Just flappy_bird_simulation.py and watch MPC playing the game of flappy bird!
The original version of the flappy clone was borrowed from Tech With Tim. The code for the original version can be found here: https://github.com/techwithtim/NEAT-Flappy-Bird. In my version, I tweaked the physics a bit, added some diagnostic visualization and replaced the AI with the MPC.
The algorithm uses CVXPY for creating the optimization problem and Gurobi for solving it. Therefore, you should download and install Gurobi. There is a trial version available, while students can get the student version for free. Of course, you can always use some other solver if you have it. Just bear in mind that the problem is nonlinear mixed integer, so your solver should be able to handle those.