I really want to build a Lego Mindstorms robot (or similar) that watches my phone with a webcam, holds a stylus, and plays Flappy Bird. I have played enough (high score 194) that I am pretty sure I know the right strategy, I just want to take human error out of the equation.<p>Are there open source vision libraries that are low-latency enough to play this in real time? Assuming the robot could keep up with some regular servos. Would be a very interesting project.<p>Edit: I'm thinking I could run an Android emulator, and then use MonkeyRunner with Python OpenCV processing my monitor to do the work. Anyone who has any relevant experience please reply, I'd love to hear if this is feasible.
Neat AI approach to play it. When this first blew up 5 or so days ago I threw together a simple javascript bookmarklet that played the game at: <a href="http://www.mrspeaker.net/dev/game/flappy/" rel="nofollow">http://www.mrspeaker.net/dev/game/flappy/</a><p>It's really poorly formatted and has unused code in it but it was fun to automate and watch. <a href="http://pastebin.com/yTmdWgfC" rel="nofollow">http://pastebin.com/yTmdWgfC</a><p>To use it just install the bookmarklet, click on it and then start the game. Press space to make it die.
Very cool! It's remarkable that you can get a good score with effectively only two features: vertical distance from the lower pipe and horizontal distance from the next pair of pipes.<p>I suspect you could cut the training time by an order of magnitude with a different optimization algorithm, or just by varying alpha. For example, have you considered trying something like a line search?
<a href="http://en.wikipedia.org/wiki/Line_search" rel="nofollow">http://en.wikipedia.org/wiki/Line_search</a>
How hard would it be to solve this deterministically?<p>Can someone comment on the game's physics? I am assuming:<p><pre><code> - constant horizontal velocity
- gravity
- flapping implemented via impulse
- collisions are handled with bounding boxes
</code></pre>
Maybe someone who knows something about optimal control (ODE) say whether this is analytically solvable? Of course there's still the practical stuff (numerical integration, I/O lag) to deal with but I'm optimistic.
Neat. You could also probably do this with a genetic algorithm. Thinking out loud here:<p>- Have a neural network with 6 inputs for:<p><pre><code> - player x
- player y
- acceleration speed
- acceleration direction
- next pipe mid-point x
- next pipe mid-point y</code></pre>
- Two outputs of 0 or 1 for click or no-click<p>The fitness score would be how close the player is to the pipe mid-point. Hopefully, this would cause the bird to stay as close as possible to fly between the pipes. The genetic algorithm would select the best neural network that knows when to flap based on the current input state.
I'd like to see a two-dimensional chart that plots Click vs Do Nothing for the two input parameters. (Vertical distance from lower pipe
and Horizontal distance from next pair of pipes)
Reinforcement learning (RL) is the future of real-world AI. Bear my words ;) RL has been around for a long time, it is the mix of optimal (in the optimization sense) decision making along with machine learning (ML). It does benefit of most recent advances in ML. As such it is likely to power the next batch of 'intelligent' applications and services.
The GIF shown on this page makes it look like the input space could simply be pipe height and bird height.<p><a href="https://github.com/zachhuff386/flapbot" rel="nofollow">https://github.com/zachhuff386/flapbot</a>
I was waiting for something like this, but I expected somebody to build a flappy bird playing robot :)<p>Do you know some good literature for machine learning 101? Where to start?
The video seems jerky in a way which suggests the engine is taking longer to make decisions at certain points in the cycle.<p>Is that plausible? Or just my imagination?
This reminds me (vaguely) of the AI I made for a worm-in-tunnel game long ago.<p><a href="https://dl.dropboxusercontent.com/u/8554242/available-for-2-weeks/wormFX_2003.swf" rel="nofollow">https://dl.dropboxusercontent.com/u/8554242/available-for-2-...</a><p>(It's there in the background of the main menu.)
good job! now you have to do it with <a href="http://corpsmoderne.itch.io/flappy-space-program" rel="nofollow">http://corpsmoderne.itch.io/flappy-space-program</a> and deal with the complications