AI Racing

AI Racing is a study prototype that aims to create a reliable racing AI, capable of running on any circuit.

It uses a 3-layer feed-forward neural network. The network is provided with an initial training and gets better each time it crashes. It receives the distance from the walls to the car by three ray casts and produces a combination of “turn” and “thrust”, which values are used to control the ship.

I also took the opportunity to experiment with shaders. I use custom shaders for:

  • Skybox
  • Terrain (geometry shader)
  • Coins. Hologram effect
  • Trail. I create the mesh dynamically and then add a particle premultiply shader, that in combination with the post-processing creates that flaring effect.
  • Post-processing with Unity’s post-processing stack

You can try the prototype here.