An open API service indexing awesome lists of open source software.

https://github.com/gregman-js/neural-network-car-racing

A small 2D simulation in which cars learn to drive by themselves.
https://github.com/gregman-js/neural-network-car-racing

evolutionary-algorithms game2d javascript machine-learn neural-network simulation

Last synced: about 2 months ago
JSON representation

A small 2D simulation in which cars learn to drive by themselves.

Awesome Lists containing this project

README

        

# Neural-Network-Car-Racing
A small 2D simulation in which cars learn to drive by themselves using a neural network and genetics algorithms.
Created by [Gregman-js](https://github.com/Gregman-js)

## Demo
Just visit and enjoy. [gregman-js.github.io/Neural-Network-Car-Racing/](https://gregman-js.github.io/Neural-Network-Car-Racing/)

![preview](https://raw.githubusercontent.com/Gregman-js/Neural-Network-Car-Racing/master/preview.png)

## No requirements and dependencies
You don't need to install libraries and others dependencies.

## Important files
`index.html` - default page with car simulation
`trackgen.html` - create your own terrain json file
`terrain.json` - JSON file with track vectors, if you want, replace with your track
`lib/` - folder with libraries
`source/` - the hearth of simulation

## Key features
Access following keys in simualtion:
`e` - stop simulation
`s` - 100x generation proccess
`g` - force new generation
`q` - save best car to localStorage
`r` - restore neural network from localStorage
`c` - turn on/off car collisions
`←↓→` - control your camera position with arraw keys
`+/-` - zoom in / out our camera

## Used library
* p5.js - [https://github.com/processing/p5.js](https://github.com/processing/p5.js)
* Toy-Neural-Network-JS - [https://github.com/CodingTrain/Toy-Neural-Network-JS](https://github.com/CodingTrain/Toy-Neural-Network-JS)