Martino Cesaratto (AI Lead)
With a master’s degree in AI and Robotics and a career forged in the intense arena of Formula SAE, Martino Cesaratto comes to Straight4 to build the studio’s next generation of AI. In short, that’s machine learning for AI with an added sprinkling of human for that extra spice.
Tell me a little about yourself and how you got into AI and gaming. Experience, and so on.
MC: I’ve been playing racing games my whole life, starting with the first Colin McRae Rally game on my dad’s PC. At 14, I got my first steering wheel to play the original GTR and since then I’ve played pretty much every sim racing title. I also started to get passionate about machine learning and its applications to real cars and decided to get a master’s degree in AI and Robotics while also participating in Formula SAE and doing a lot of motorsports-related side projects.
Being able to join my two passions and research how to bring the latest innovations in the machine learning field to a racing sim is a dream come true. I’m confident that racing sims could help improve real-car AI development at least as much as AI can help their gameplay to get better.
They say AI is about to end (or save) the world, but in sim racing, they seem to be getting dumber with every generation. Why do you think that is?
MC: Historically, AI in games is not really an AI, but just a series of scripts that are unable to learn and just follow some pattern added instead. That’s true for racing games too, and that means there’s no long-term action planning, just some sophisticated rules and a controller that tries to follow an ideal line. I think one of the main reasons AI got worse over years is that the controller is “linear”—meaning its output is just some kind of “error” multiplied by a constant. This works well with problems that can be linearized. In other words, over a very short time interval, the effects of the controller’s output are very close to its output multiplied by some other constant but with modern physics engines becoming quite complex, you now have quite some deviation from their linear approximation, even over very short intervals. This necessitates that we must start adding some complexity to the controller too. Machine learning is basically just an extremely good approximator of unknown non-linear functions, so it’s quite natural to go in this direction.
How do you plan to bring an intelligent generation of AI to Straight4’s new sim?
MC: On an empty dry track, current driving AI is already quite good, so there’s no need to start from scratch. The focus will be to slowly introduce machine-learning-based logic instead, in those situations where current AI algorithms struggle:
- Overtakes and double/triple-file driving
- Obstacles avoidance
- Wet driving
- Driving outside of the ideal racing line
As we go ahead in development, we’ll evaluate which parts of the driving logic could use some help and we may even entirely replace some with pure machine learning, but we’ll do it in small steps instead of going immediately full-on AI like GT did with their Sophy tech.
When you look at the way AI interacts with the player, is it possible to come to it from a "human" perspective?
MC: Since we’ll try to exploit player data to train our AI driving, for sure it will expose some more “human” traits. We’ll also have some longer-term planning logic that should avoid typical situations where the AI gets stuck behind a slower car and doesn’t know what to do, or where it goes back and forth between different lines when there are too many nearby opponents, and the scripted logic doesn’t know how to react.
About overtaking and being overtaken, we’ll have the AI make some evaluation about the probability to improve their position at the end of the race by making blocking moves or aggressive passes against the risk of a mistake and/or of losing time. Once it makes that evaluation, it will stick to the decision unless its evaluation drastically changes. In a championship scenario, for example, this evaluation could also take into account the number of points that a certain position would give them—for example, they won’t fight as hard for two points as they’d do for 10.
What's the best AI you've ever encountered in a racing game?
MC: I’d say rFactor2’s AI can be really competent on some track/car combinations. Being an average racer, I mostly enjoy AI racing in AMS2, where the AI is about as fast as me but does quite realistic moves and is not overly aggressive.
What are the main traits you look for in AI? Is it aggression and speed? Any others?
MC: My idea to make each AI driver unique is to start with, giving each of them slightly different parameters on the “old school” control part, and then have them “learn” the best way to deal with their own parameters. This is the machine learning part which assigns some learnable personality descriptor that gets updated after each race and could be stored in the cloud so that the same AI opponent would have the same traits for every player.