A Neural Network experiment involving a JavaScript game.
Branch: master
Clone or download
Latest commit 7d30958 Feb 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
css First Commit Feb 8, 2019
img First Commit Feb 8, 2019
js First Commit Feb 8, 2019
LICENSE Create LICENSE Feb 8, 2019
README.md Update README.md Feb 20, 2019
favicon.png First Commit Feb 8, 2019
index.html First Commit Feb 8, 2019
manifest.json First Commit Feb 8, 2019
screenshot.png First Commit Feb 8, 2019
sw.js First Commit Feb 8, 2019

README.md

Excuse me, would you let my Neural Network drive?

A Neural Network experiment involving a JavaScript game: can a perceptron drive a car?

Scrap

A live version of the code is hosted here

About

Not so long ago I published the simplest perceptron you'll ever see, code I wrote after a machine learning class, a while back. Ever since that I've been meaning to do something cool with it. So, browsing some more old codes I found a little game I made when I was studing fake 3D perspective, so I thought: can my perceptron play this game?

So I gave the game code a little brushing, wrote some more code to capture the data of me playing it (I played until I got a score of 33 points) and feed it to my neural net. After that I just played with the learning rate and iterations and let it play the game on it's own.

A Neuroevolution you say? Yes, I thought about that. I have a fully conected multilayer perceptron, that I'm about to realease, So I'm saving the ideia of evolving a neural net with genetic algorithm for that.

Quick reminder that the game is not fair. Sometimes two cars comes in parallel with each other, so not even a human could beat it.

Questions?

If you have any questions about the code or how I implemented it, or even how I got the data to feed the neural network (features), please feel free to contact me. (I left some comments on the code)