Sense
Seven rays measure the distance to the nearest wall, plus the car's own speed. That's the entire input: eight numbers. No map, no racing line, no idea where the finish is.
A population of neural networks starts out knowing nothing. The ones that get furthest survive and breed; nobody tells them what a corner is. Then it's your turn: race what they learned.
Switching tracks keeps the population. A network trained on one layout has to generalise: watch the fitness dip, then recover.
positive negative · brightness = signal strength right now
Seven rays measure the distance to the nearest wall, plus the car's own speed. That's the entire input: eight numbers. No map, no racing line, no idea where the finish is.
Those numbers run through a small feed-forward network and come out as two values: how hard to steer, and how hard to accelerate or brake. That network is the policy.
Reward comes from passing gates in order, with a small bonus for carrying speed and a penalty for hitting a wall. It is deliberately sparse: nothing tells the car how to corner.
The best few are copied, the rest rebuilt from mixed and mutated parents. Train a few generations and Your AI joins the grid in Race mode, next to the champion shipped with the page.