Videos

NES Flappy Bird Reinforcement Learning AI



0niklas

This is a story of a little bird learning to fly. Sit back and enjoy.

I was finally able to recover the code from my old laptop and make it run on my current machine. Feel free to poke a stick at it: https://github.com/niklasfi/fceux-rlnes

This has gotten more attention than I was expecting, so here are some details:

The game you see running is the NES (Nintendo Entertainment System) port of the popular Flappy Bird game [1]. It is executed on the fceux [2] emulator, which we modified to implement our reinforcement learning logic (reinforcement learning is a special kind of machine learning) controlling the bird.

In each frame the computer takes a decision whether to press a and let the bird fly upwards or not to press a button. The decision is made taking only the bird’s distance to the next pipe on the X- and Y-Axes into account. Through reinforcement learning, over time, the bird gets an idea when it is beneficial to press a in order to pass the next tube.

If you’d like to more about reinforcement learning, I’ve found [3] to be a good starting point.

[1] http://forums.nesdev.com/viewtopic.php?f=22&t=11425
[2] http://www.fceux.com
[3] http://www.cs.indiana.edu/~gasser/Salsa/rl.html

Source

Similar Posts

40 thoughts on “NES Flappy Bird Reinforcement Learning AI
  1. The ai doesnt seem to understand the glitch that produces at 683 , causing it to fail eachtime, tho the last part it manages to pass it due to the randomizer that happened to spawm the next obstacle on the same height

  2. Am I going to watch 2 hours of a computer playing flappy bird?

    EDIT:
    Am I watching 2 hours of a computer playing flappy bird?

    EDIT 2:
    Did I just watch 2 hours of a computer playing flappy bird?

    EDIT 3:
    Am I really watching 2 hours of a computer playing flappy bird AGAIN?

Comments are closed.

WP2Social Auto Publish Powered By : XYZScripts.com