How it learns
Twenty times a second Revenant gets a small grey picture of the screen, its speed, which wheels are touching the ground, and where the racing line goes next. It picks one of twelve key combinations. That's all it ever sees or does.
It's rewarded for getting further along the line in less time, and nudged away from walls. At first it drives into the first barrier over and over. A few hours later it's finishing the easy levels, and then it starts shaving off tenths.
Under the hood it's an IQN reinforcement learning agent, built on Linesight, talking to the game through TMInterface. Two copies of the game play at once while the learner trains on what they bring back.
When it gets stuck
D02 has a hairpin that Revenant hit the wall on for five hours straight. Practising from the start every time meant it barely got any tries at the corner itself.
So a spare copy of the game builds a lap out of Revenant's own controls, following the record line one 50 ms step at a time and checking every step replays exactly. Then Revenant starts runs from random points along that lap and takes over the wheel. It finished D02 minutes after the first one.