Empty Box about better A.I. in Racing Games

Empty Box about a better A.I.in a Racing Game

In his latest video, Empty Box takes a look at what we as a user can do to improve the behaviour of the A.I. opponents in a racing game. As an example, Empty Box fired up rFactor 2, but it is safe to say that his A.I. tips work for pretty much every racing game or simulator.

Developing A.I. behaviour in a racing game is often underestimated. A.I. or artificial intelligent drivers are supposed to emulate human input and make tactical decisions based on the dynamic behaviour of the opponents and the surrounding environment.

Basically, the A.I. car will base its trajectory on a predefined set of racing lines and racing rules. That is fairly straightforward, but it becomes a lot more complex when the A.I. gets close to an opponent or obstacle. The computer controlled cars will have to change their driving line from racing to overtaking, and have to try and get past the opponent by rapidly reacting to a very dynamic situation.

Think about the multitude of parameters that are needed to get the job done. They have to stay on track, look ahead, avoid cars and obstacles, catch up or stay behind, change racing lines, be tactical, and ultimately overtake a moving car on a changeable track layout. All of this has to be done in different scenarios at different speeds, while keeping track of the other drivers, including the unpredictable player.

Keeping all of this in mind, it easy to understand that creating a realistically behaving A.I. grid is not a small task and heavily depends on the creativity and skill of the programmer.

 

Empty Box Quote:

1. Come to the realisation that more cars mean more crappy behaviour. That and the fact you often don’t need more cars in the first place! this has the biggest effect early in the race, where it will result in tremendously slow AI with a lot of cars.

1A. (didn’t put this in the video for some reason, but it relates to 1 and is more detail for those who want it) Some cars don’t have enough “AI drivers” to fill a large grid. This leads to even more obvious clones as those “drivers” are the same. Keep it at 1 car per skin, no repeats if possible! While this is not always the case, it should be your rule of thumb to ensure it isn’t a huge issue.

2. Some tracks will suck pretty much always for AI. Same way AI always has a tendency to fail in very low speed very tight corners in almost every racing game ever! Some mod tracks in particular, have zero attention paid to providing quality offline racing.

3. QUALIFY. ALWAYS RUN A QUALIFYING SESSION. ALWAYS. Unless you are willing to deal with the crapfest at the start, that is.

4. Only then begin to tweak your settings. Tweaking the settings is very easy and straight forward but without the easy steps above you are a dog chasing its tail – that is to say, you are getting nowhere and doing nothing.

If the AI is too fast turn the strength down. Too slow turn it up – but beware this can have somewhat unintended results such as incredible straight-line speed and braking ability not possible for player cars.

If they pass too little turn the aggression up, if they always chuck it up the inside turn it down. Slower cars generally work better with higher aggression, oval racing should always be done with the aggression turned way up. For starters, 80% is a good starting point for ovals, 50% for road racing GT / Touring cars and 35% for open wheelers on road courses. In games like Stock Car Extreme or GTR2 this roughly correlates to the named options they give you – aggression works the same way in those games, just named differently.