Press space bar to reset the car's position Press enter key to reset the car's position AND change the track.
Now that I'm reading the title I'm realizing that this isn't actually an AI, and instead this is more like how real cars drive automatically with sensors that detect their surroundings and distances.