Giter VIP home page Giter VIP logo

ai-plays-breakout's Introduction

AI-plays-breakout

An AI that uses NEAT algorithm and python to beat the famous atari game breakout released in 1976. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks developed by Ken Stanley. Best performimg agents are passed onto the next generation, repeated process of this creates an efficient agent that can produce optimal set of action for the given task.

Neural network

The program have a simple two layer feed forward neural network that uses tanh as an activation function to decide actions to be performed.

  • Input layer- Consist of 5 nodes(Coordinates of ball and paddle and distance between ball and paddle)
  • Hidden layer- Consist of 4 neurons
  • Output layer- Consist of 3 nodes(Do nothing, go left, go right)

Efficiency

The program efficiency to develop a desirable agent is directly dependent of population size on each generation, where a pop size of 200 can take up to 10-12 generations a population of 500 require only 2-3 generation and population of 1000 can sometimes do the trick on the first shot. You can tweak the neural net hyperparameters and network size to see the effect of it in the learning process.

Reward function

The reward or fitness is incremented positively when a particular agent collides with the ball and decremented when it misses or if the ball hits the ground.

 

Example

 

Be my guest to build over my code and use it wisely

ai-plays-breakout's People

Contributors

micky659 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.