Zum Hauptinhalt springen
TU Graz/ TU Graz/ Services/ News+Stories/

Algorithm Wants to Learn the Perfect Lap in a Racing Car

05/07/2024 | Planet research | FoE Information, Communication & Computing

By Falko Schoklitsch

Research into robots and their autonomy can also lead to an algorithm chasing its own lap record. Does it do this better than humans?

Is the machine superior to humans when driving fast? Image source: Schoklitsch - TU Graz

For as long as there have been motorsports, fans and racing drivers have been asking themselves whether it is possible to complete a perfect lap without losing a thousandth of a second. Realistically, this is probably not possible and the question arises as to how you can measure whether the time could have been a thousandth of a second faster. “It’s very difficult to drive the absolutely perfect, perfect lap. I was close. But if someone claims to have driven the perfect lap, I don’t think that’s possible,” explained former Formula 1 driver Mark Webber in 2013.

But can the computer succeed where the fastest drivers in the world don’t think it is possible? Eduardo Veas’ team at the Institute of Interactive Systems and Data Science at Graz University of Technology (TU Graz) could come closer to answering this question. As part of their robotics research, the scientists have developed an algorithm for autonomous driving that uses reinforcement learning to teach itself to drive faster and faster. A program known as a software agent is used, which independently learns a strategy based on rewards or penalties in order to maximise the rewards.

In a few (million) attempts at speed

“The software agent learns from its own experience with the environment,” explains Eduardo Veas. “Based on the observed state of the environment, it performs an action and then receives positive or negative feedback. It stores these in an experience buffer and learns how to do it better.” The team applied this method in a racing simulator and had the software agent start with zero experience. A reward was given for driving as fast as possible without leaving the track. In the simulator, the software agent can repeat its actions quickly and thus improve rapidly. After a few thousand attempts, it had learnt how to drive the car, and a few tens of thousands of times later it was able to drive really fast and continually improve lap times.

But can it also drive the perfect lap? At the time of the interview with Eduardo Veas, the current simulation had already been running for ten days and it was clear that the times were improving in some sections, but deteriorating in others – although they were on par with the top professionals in esports. The past showed that it can be done even better when a specially trained software agent was able to outperform professional human drivers on qualifying laps in an industrial simulator. Sony carried out a similar experiment a few months later in the game Gran Turismo Sport, in which the AI agent Gran Turismo Sophy competed against the best players and was able to defeat them in three different track-car combinations.

So far, however, these algorithms have only been trained on a handful of tracks and vehicles, and it is not yet possible to generalise what has been learned for use on all types of racetracks and vehicle types. “We have this experience buffer and because I record everything, I can now put together a new agent quite quickly. We try to learn what the best approach is to set up the agent again and then you have to fine-tune it on the track. We have been conducting research into this topic for five years,” says Eduardo Veas. His aim is actually to improve the conditions for autonomous driving; the virtual time chase is only a by-product of this and represents a marginal aspect, since the algorithm is trained purely on fast laps and does not have to take overtaking manoeuvres, tyre wear or fuel consumption into account.

Human intuition as advantage?

Despite the extensive simulations and many years of experience, the absolutely perfect lap does not yet seem to have been achieved, as Eduardo Veas admits. “I wouldn’t call it the perfect lap at the moment, no. But let’s say it’s a better lap than we’ve managed so far and the algorithm can still squeeze a few milliseconds out of it and get better.” However, Mark Webber saw Homo sapiens as having the advantage in the comparison between simulation and humans anyway. Although some technical developments have taken place since his statements in 2013, there is still some truth in them. “The simulators give us a perspective on what is possible. Nevertheless, the most important factor is the real driver in the car, who understands where the limit really is,” explained Mark Webber. Feeling and intuition (or those special senses in their behinds, as racing drivers sometimes like to call it) as well as experience with different conditions and vehicle characteristics could therefore give humans a decisive advantage over the machine.

This research is anchored in the Field of Expertise "Information, Communication & Computing", one of five strategic foci of TU Graz.

Would you like to receive the latest stories, news, research stories, interviews or blog posts from TU Graz directly on your smartphone or in your email inbox? Subscribe to the TU Graz Telegram newsletter free of charge.

Contact

Eduardo VEAS
Univ.-Prof. Dr.techn. MSc
TU Graz | Institute of Interactive Systems and Data Science
Phone: +43 316 873 30858
eveasnoSpam@tugraz.at