r/Simulated • • 9h ago

Research Simulation [OC] An AI crashes 7 metres from the finish after 5,239 attempts. Same brain, a few tries later, it finishes the lap

Thumbnail
youtu.be
0 Upvotes

How it works: this is reinforcement learning (PPO) in Unreal Engine 5 with the Learning Agents plugin. The AI only controls the pedal and the steering wheel. It can see its speed, where it is on the road, and the shape of the road ahead.

It earns reward for every metre it drives forward and loses reward when it hits a wall. There's also a small penalty for sawing at the wheel, which keeps the steering smooth. Nobody tells it how to drive.

32 cars learn at the same time, all sharing one brain. Training took 50 minutes on a MacBook Pro, 9,392 attempts in total, and nearly all of them ended in a crash. The track is 867 m with a 12.5 m hairpin.

The full video, from attempt zero to a race against a hand-written robot driver: https://youtu.be/XpDuukNo5Us

Happy to answer questions about the setup.