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.
- Host: GitHub
- URL: https://github.com/gregman-js/neural-network-car-racing
- Owner: Gregman-js
- License: gpl-3.0
- Created: 2020-03-23T22:22:54.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T10:37:15.000Z (about 5 years ago)
- Last Synced: 2025-03-27T05:42:04.715Z (about 2 months ago)
- Topics: evolutionary-algorithms, game2d, javascript, machine-learn, neural-network, simulation
- Language: JavaScript
- Homepage: https://gregman-js.github.io/Neural-Network-Car-Racing/
- Size: 348 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/)
## 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)