The AI of F1 Race Stars



October 10, 2012

We’ve put a lot of effort into the computer drivers in F1 Race Stars, and the results are great. Unlike many other racing games’ AIs, our drivers control their karts in the same way as a human, don’t cheat, and are smart enough to avoid hazards and each other… some of the time!

The game balances AI difficulty by examining your performance after each race, so if you’re new to the game or a casual player you’ll find that you’re given an easier time. But in this post we’ll be talking about the other end of the scale. Just how hard does F1 Race Stars get?

I’ll spoil the ending: it gets pretty hard.

In playtests it’s common to see AI drivers beating a few of us developers, and we’ve all played for hundreds of hours. At this top level the AI take excellent racing lines, use lots of shortcuts, are very accurate when firing power-ups, and can dodge hazards dropped in all but the sneakiest of places.

We don’t force that sort of challenge on everyone, though. The game’s difficulty will settle at a level that’s right for your skills. We use all sorts of values and equations to decide how hard races should be and, at the same time, ensure that one unlucky loss doesn’t undo all your hard work; all in all, it means that as you improve as a racer you’ll find the game gradually ramping up to meet your abilities.


One tool that we don’t use is rubber banding. This is, broadly speaking, when a game cheats to try and ensure the outcome it wants. AI drivers who are in an “incorrect” position drive faster (or slower) until they reach the “right” place, which is normally somewhere near to the player. The only part of these races which count is the last half a lap, where the rubber banding doesn’t have enough time left to take away the player’s gains.

F1 Race Stars doesn’t have any of that nonsense. If you win a race against the AI it’s because you beat them fair and square. When other AI drivers spend time near you it’s because they are matched to your own ability. It’s taken a lot of effort to create and balance our AI system, much more than a simple rubber banding system would have required, but the game is much more authentic and rewarding for it. When you play it we think you’ll agree!

  • Share

About Lee Williams

Codemasters Community Manager, beard grower, biscuit stealer and fan of all things off road.

View all posts by Lee Williams

You might also like