The general race driver (episode 14)

From episode 14 of A Million Tries ("My AI Designed a Race Car With No Front Wing"). Driver school: one brain that drives any car the engineer might build (random designs, random circuits), 300M steps of PPO in about two minutes on one GPU. It judged the engineer's cars and was the starting point for each car's own driver.

On test circuits it never trained on: 2,793 m a minute, 172 km/h on average, 5% crashes (a random mix of cars). On the way it learned to park: after crashing every run at first, it sat at ~5 km/h until the clock ran out (5-7M steps), then found the throttle again.

  • The game: a four-tyre car on real-scale circuits (grip and slip per tyre, downforce from wings and a floor that stalls near the road, tyre heat and wear, fuel, hills and banking, grass that's slow and dirties the tyres). The physics is road-tested against a 911 and an F1 car. Code at the tag episode-14: https://github.com/backstab319/a-million-tries/tree/episode-14
  • Sees (82 numbers): 13 distance lasers (up to 200 m), the road's bends, climbs and banking at 10 points ahead (10-320 m), its motion (speeds, yaw, g-forces, place on the road, heading, steering, pedal), each tyre's grip, sliding, temperature and wear, the fuel left, and the car's 13 dials.
  • Does: steering and pedal (throttle or brake), 20 times a second. Brain: 82 -> 256 -> 256 (tanh) -> 2.
  • Files: model.safetensors holds the weights (PyTorch names; ailearns.agents.ppo_car builds the same network), config.json the training and game settings.

From the YouTube channel A Million Tries: https://www.youtube.com/@amilliontries

Downloads last month
18
Safetensors
Model size
87.8k params
Tensor type
F32
·
Video Preview
loading