For a sporting competition that has only been around since 2014, Formula E teams don’t have decades worth of data at their fingertips to analyse and improve performance like their football, basketball and traditional motor racing counterparts. And for Porsche, the amount of available data is even smaller as it didn’t start competing in the electric car racing championship until the 2019-2020 season.
One of the crucial aspects of Formula E races is the emphasis on energy efficiency. Teams are not allowed to use more than a certain amount of energy, which forms part of the rule set. That means you have to be extremely cautious about where you use energy and how you recuperate energy. So one of the big strategic levers for the Porsche team is measuring and understanding how much energy to use to keep position and try to fight for position.
Malte Huneke, Technical Project Leader for the TAG Heuer Porsche Formula E Team, explained that when the team started out, it was armed with just basic racing knowledge covering the simple rules of what to do and what not to do, what is strategically good and what is potentially less optimal. However, it didn't see a straightforward way to really optimize a strategy on an analytical basis. Speaking at the CogX Festival 2021, Huneke explained:
We just asked ourselves what could be a way to really learn about the patterns of an optimal strategy in Formula E, and that basically brought us to machine learning. We thought, we have a version A of a strategy, some simple rules, and then what if we put something competing in the situation. That got us interested in using machine learning.
However, despite realising the potential machine learning offered for Porsche’s Formula E team, the lack of available data posed a challenge. Normally, data to feed into its AI system could be gathered from the racetrack, including timing data, where each competitor is at a particular stage, the pace at which each competitor is running, whether they have or haven’t taken an Attack Mode (a temporary power boost) and how many they have already used. This data was only available in a very limited amount for Porsche, as the team only entered Formula E for the first time in season six, beginning at the end of 2019. Although the team had already started development of the strategy and software at the end of 2018, it was basically moving in parallel with season five, so that was the only data available. Huneke said:
We could basically listen into the races and get some data, but that was everything that we had. In machine learning context, this is not very much data if we think about how much we needed for training. So in the end, we also had to set up a simulation of full Formula E races just to generate more data, more training data and to come across more situations, which was another challenge in itself, because we had to make this representative of the real-world problem.
As well as the challenge of gathering enough data to develop a viable machine-learning system, putting together the right talent to build and use AI is also critical to success. Everyone involved needs to be open-minded to trying new approaches, it can’t just be the team leader deciding on the direction and expect everybody to follow. The team also requires experts from different fields to work together with an equal stake and try to find a common language on how to formulate the problems and find solutions.
On one side, there are the more traditional motor sports people, performance engineers, simulation engineers doing the physical models and the simulations for lap times, and the race engineers, who decide how to use energy and when to use Attack Mode, which is governed by specific rules as to when and how they are used. Then there are the data scientists, who bring in the machine learning part, and the software engineers who turn the technology into a usable product.
You have all these different types of talents in the mix. There is a need for a certain degree of resilience, because when trying new things, not everything will work right away. There's a constant need for iteration and you need a team that is willing to fight for it.
You need to give experiments room to exist, by supporting curiosity and also by giving the problem a little bit of time to be developed. We cannot basically set a timeline and say, we have this experiment so 15 days from now, everything needs to work. This will not work. Managing expectations is important because if we have too high expectations, if we’re only happy if everything worked from the beginning, then this will lead to problems within the team around motivation.
Taking the AI system out of the lab and onto the track, and using the models live in a race was a huge step for the Porsche team.
That was actually one of the biggest challenges, and it still is a big challenge. The biggest challenge there is really to build trust. Formula E racing is a very fast-paced environment, it's 45 minutes plus one lap, but everybody is racing very, very close to each other so the decisions have to be made very, very quickly. The consequences from some of these decisions are potentially very big. We can easily lose a couple of positions if we make a mistake there. So how can I, from a user's perspective, be sure that this black box actually gives me the right suggestions?
The team have approached this by working to prove themselves again and again. By running comparisons of competitions between the statistical machine learning-based method and other simpler logic, they would try to win these comparisons and therefore build trust.
It's still an ongoing process and you really need to be very sure that the thing works properly during the race. Also making sure that the whole analytics and software runs without fail in all race situations, there are all kinds of awkward situations in a race. It can be a red flag, there can be a safety car, there can be a partial drop of data, there can potentially be inconsistent data. The software has to be able to deal with all kinds of such situations so it needs to be very robust and the computations need to happen at a very high speed. Not exactly real time, but with minimal delay, just to really be able to react quickly if a certain situation unfolds.
Building up trust in AI is essential to getting value from the system. Race engineers have a wealth of knowledge about the fundamental problems and in every situation, they have an idea of what to do. If the engineer’s well-informed intuition, with lots of simple logic backing it up, is in line with the suggestion from an AI-based tool, that's the ideal scenario.
But as soon as they contradict each other there's always the question, am I getting the right suggestion, is this the best thing to do now? It’s very tricky.
But Huneke was quick to point out that even with all these elements for a successful AI system – data, the team and trust - the overriding factor in any Formula E race is still the driver; and then there's the huge organization in the background taking care of all the racing.
What we can do in this specific context with strategy and optimization, [AI] can give us a hint to try and flip one position or two positions maximum. The question isn’t do we win or lose a race, but it can give us a small, competitive edge, which is also what you need in an environment where the competition is extremely close.