Skip to content

ai-f1-racing

Evolutionary racing AI • Deterministic sim

TypeScriptEvolution StrategiesNeural networksDeterminism

A top-down Formula 1 racing AI. A 38–16–3 neural network drives with analogue throttle, brake and steering, trained by an evolution strategy — antithetic perturbations, rank-normalised fitness, Adam on the search distribution — against a deterministic 2D simulation running at a fixed 60 Hz.

Determinism is a hard contract here: any function whose result is not bit-identical across JavaScript engines is banned from the simulation, and trigonometry is baked into tables at load. That is what makes a lap time mean the same thing twice and a training run reproducible. Spa-Francorchamps and Baku are traced from the real circuits to within about 0.1 % of their true lap lengths.

The simulation and the trainer work — a driver can be trained to lap. Cars cannot yet see or hit each other, so the racing itself is the part still being built.

ivan iliev

ICT student at HZ University of Applied Sciences, Vlissingen. Open to work.

© 2026 Ivan Iliev. Built with SvelteKit and too many stars.

no telemetry · no trackers · one page