Fork me on GitHub

Bricked by KurToMe

Note this is only tested on Chrome browser. Chrome pauses javascript when on another tab, so open this in its own window. Also, this can take around 10+ minutes of running to display anything even close to smart play.

This is a work in progress proof-of-concept "game" which will attempt to have a simple AI agent learn and become proficient in game from scratch. All code is written in CoffeeScript.

The learning is done as Neural Network classification training. The only data given to classify a point is simple data such as the ball's and paddle's relative position, velocity, etc. The possible classifcations for each point are left, right, stay, each indicating the desired action of the paddle. Training data is gained by storing classification data throughout the a single run of the ball, and when the ball hits or misses the paddle the stored data points are manually classified and passed to the nearal net trainer as training data. The classification function returned from the neural net trainer is used whenever training completes, and then the next batch of training data can be sent to the trainer. The neural net trains on a separate Web Worker thread allow training to happen in real time.

Authors

Kurtis Melby (KurToMe@gmail.com)

Libraries Used

box2dJs

brain

statsJs

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/KurToMe/Bricked