The AI in Assetto Corsa isn’t industry-leading. As standard, it does the job but is nothing special. Though with a bit of work and some time, it can become much better. Here’s how to improve the AI in Assetto Corsa.
Image credit: Kunos Simulazioni
Since launch all the way back in 2014, Assetto Corsa has featured very basic AI. Cars on-track follow the racing line at a decent pace. They do their best not to get in the player’s way. But one can’t say they’re optimised.
However, making your own AI lines in Assetto Corsa can drastically improve the offline experience. It may sound like scary and complicated at first. But once you dive in, you’ll realise it’s much easier than it sounds. Plus, anything you do can be fully reversed.
From simply optimising the way the AI gets around a track to saving multiple lines for different car types. One could spend ages improving Assetto Corsa AI. But in this tutorial, we’ll learn how to make a simple line that will work with most cars, even mods.
Tools needed to improve Assetto Corsa AI
To get started with making AI lines in Assetto Corsa, you’ll need a few apps at your disposal. The first one is available in Assetto Corsa as standard, although you will need to enable developer apps. In Content Manager, go to the App Settings tab and tick the Developer App box. This also gives you the free roam camera, a very hand item.
The second app that will come in handy later on is the AI Line Helper. This nifty tool helps you reduce the area of track the AI will use when making overtakes.
Lastly, and depending on your version of Custom Shader’s Patch, you may need to go through some settings to make your new AI line work. In the New AI Behaviour tab, you’ll find the AI Spline settings. Both the Cache Grid and Cache Payloads boxes must not be selected. Otherwise, certain elements of your work may not load properly in-game, breaking the AI.
Improving the AI line
The AI line is created by the AI app in Assetto Corsa. It tracks a player’s inputs, speed, and gear throughout a given recorded lap. This data is what the AI will replicate, adapting it to the grip available in each car.
In order to make a single AI line for all vehicle types, you’ll want your lap to be smooth. You don’t want to be yanking the wheel side-to-side or tapping the brake as it will negatively impact how the AI adapts to different cars. Sure, you can slide a classic car through a sweeping turn. But Formula 1 machinery must be stable. Remember to brake early, hit the apex and get on the power as soon as possible. Do this in a smooth manner and the AI will navigate each corner perfectly.
You’ll want to record your AI line in a car that is easy to drive. It also helps to choose a slower vehicle as the AI will push the limit of grip regardless. Therefore, I would recommend using the Mazda MX-5 Global. This little racer has excellent balance, so understeer and oversteer aren’t a big factor and you won’t find yourself on the edge.
Once on-track, hit Start Recording in the AI app and it will record the next lap from the start line. It will continue recording each lap until you exit the sim, so once you have a perfect lap, leave the game. You can also record the pitlane line, including entry and exit. Though most tracks already feature these so it’s not always worth it.
When you have recorded your lines, go into the track’s AI folder. Here, you will find the current AI files, as well as Candidate files. Backup the existing ones and remove the Candidate extension on your newly recorded lines. If all goes well, AI cars should run the lines without problem. Though don’t worry if they swerve in places. This will be solved in the following part.
Smoothing off the rough edges
Throughout the Assetto Corsa community, you may hear people mentioning AI hints. This is a secondary file that compliments the in-game AI line letting cars know where they should push harder or slow further. Obviously, this is a very helpful tool for ironing out small imperfections in your racing line.
However, I never use this as it makes cars act in a very strange way, suddenly hitting the gas or slamming on the brakes. Instead, I redo my racing line until it is perfect without the need for ‘hinting’ at the AI to drive differently. This will make for a much more realistic and immersive racing experience.
Once you have the ultimate AI line in Assetto Corsa, it’s time to lay out the track boundaries. For this, use the aforementioned Sidelines app. When drawing out the track boundaries for AI cars, this won’t affect the actual track limits. It will simply guide the AI into not attempting overtakes in wrong parts of a track. You wouldn’t send it round the outside of a fast 180-degree corner, so why should your opponents?
The Sidelines app will draw a line from the selected side of your car (left or right) informing AI cars to remain within these limits. When driving, make sure to open up on straights and close to within a few car’s widths of the racing line in braking zones. Make sure each line flows through the corners, all while giving space for cars to run side-by-side.
All-in-all, making an AI line shouldn’t take longer than an hour or-so once you’re up to speed with the process. If you aim to race classic cars on the specific track, I would recommend recording a second line with a similar car, my choice is the Porsche 718 Spyder RS. You can easily swap the files depending on what vehicle type you want to run.
Have you ever tried improving the Assetto Corsa AI? Tell us on Twitter at @OverTake_gg or in the comments down below!