The 'self-driving car' is a creation by Radu Mariescu Istodor.
You can find a more sophisticated version on his website.
More importantly, you can learn how to build it yourself in his great free course on freeCodeCamp. In this course you get introduced in neural networks and
genetic algorithms.
The application is written in javascript (ES6) without the use of any library.
The graph visualizes the activity of the neural network of the car with the sensors highlighted.
The 'brain' will be optimized by trial and error.
You have to help your computer by picking out the smartest car (the blue one with the sensors). Use the
save button.
Based on the characteristics of this car your machine will randomly compute a new population of cars.
With some luck a smarter car was calculated and you can now save this one.
Go on until you get a car that is able to pass all the (red) cars without crashing.
* save best 'brain':
* restart with stored best 'brain':
=> The application is running with a population of 100 cars
Be careful!
A recent computer should be able to do the calculation for up to 1000 cars, and maybe
more.
If not, your browser will slow down or even freeze. (The default is set to 100, but with this small number it can take a very long time to get a car that won't crash anymore.)
The neural network, as well as the algorithm that is constantly checking for
intersections, uses nested loops. Hence, time efficiency of these algorithms is O(n^2).
This means that the application is energy consuming.
Don't let your machine make unnecessary calculations.
You can find more information about algorithms, time efficiency and energy consumption on this website.
This site is not responsive, because small devices lack computing power