Skip to content
Flappy bird AI via genetic programming
Profile icon
shuhua

Learn to Play Flappy Bird using Cartesian Genetic Programming (Evolutionary Computation) and Compete with AI

This file cannot be displayed: https://storage.googleapis.com/replit/images/1553219567700_73e3affa03f0d541f01b4504d53e31f7.gi

I designed a novel AI using an evolutionary algorithm called Cartesian Genetic Programming to learn to play the popular flappy bird. In most cases, it takes less than 50 generations to yield a good AI. If you feel boring to watch the birds learn, you can compete with the current AI anytime by adding a human player. For more instructions, please check README. The underlying theory is also explained in the associated GitHub repository.

Shortcut keys

  • CTRL+H: add a human player (a blue bird) at any time

  • SPACE or UP ARROW: flap the human player's bird

  • CTRL+P: pause/continue game

  • CTRL+K: switch ON/OFF sound effect (repl.it doesn't support sounds yet)

    If you want to accelerate the evolution process, you can speed up the game by

  • CTRL+1: speed x1

  • CTRL+2: speed x2

  • CTRL+3: speed x3

See if you can do better than an infant AI!

You are viewing a single comment. View All
Profile icon
zakdakidd

nice job