Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Machine Learning and Flappy Bird: Automating Gameplay

DZone's Guide to

Machine Learning and Flappy Bird: Automating Gameplay

· Big Data Zone ·
Free Resource

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

Sometimes you just want to make games play themselves. This recent blog post from Sarvagya Vaish applies reinforcement machine learning techniques to the controversial and recently-disappeared mobile game, Flappy Bird. The strategy is based on reinforcement learning, which avoids the need to model the movement dynamics of the game. According to Sarvagya:

Here's the basic principle: the agent, Flappy Bird in this case, performs a certain action in a state. It then finds itself in a new state and gets a reward based on that.

So, Sarvagya's hack learns based on a reward system derived entirely from the status of the bird - either living or dead - and makes decisions for the bird (whether to, you know, flap) depending on the rewards associated with the current state (distance from the pipes).

Check out Sarvagya's GitHub for the code, as well as this video overview:

Hortonworks Community Connection (HCC) is an online collaboration destination for developers, DevOps, customers and partners to get answers to questions, collaborate on technical articles and share code examples from GitHub.  Join the discussion.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}