Details

This is a simulator where racing cars are learning to drive on the Hungaroring race track using evolution. Each car has a neural network - a brain - that is initialized randomly. The network of each car has the following structure:

The cars are equipped with an array of 5 sensors that measure distance between the itself and the edge of the track. This data is provided to the neural network along with the current speed, the direction, and the state of the steering wheel and the pedals. All of this should be enough data for the network to be able to drive, now it only has to learn how to do it.

Each neural network drives its vehicle by choosing its speed and direction every 50 milliseconds. In each generation 60 cars start racing. Cars get rewards for driven distance, and for passing checkpoints around the track. The further and faster a car drives the higher the reward. If a car drives off the track, or drives too slowly it gets disqualified. At the end of a generation - that is after all cars drove off the track or stopped due to being slow - the best performing 9 (15%) cars will be selected for the next generation, and the remaining 51 places will be filled by their copies. After that all 60 of them are mutated by applying a small random vector to their neural networks weights and biases and then a new generation starts.



Here you can find the neural network of the last generation's top performer:

>

You can also save or load the top performer's network to and from the clipboard:

Save to Clipboard

Load from Clipboard

No network loaded from clipboard!