Making Aseetto Corsa AI More Competitive for Offline Practice

I participate in an open wheel spec series over at northamericangp.com (http://www.northamericangp.com/board/forumdisplay.php?101-Assetto-Corsa-Monday-League). I was looking for a good way to practice starts, stints, and races offline, but ran into a few issues with the AI that I needed to overcome in order for the offline practice to really be useful.

The car we were using is based on the RSS Lotus 79. If you’re into formula cars this is a wonderful pay-mod worth every penny, and you can check it out here: http://racesimstudio.com/formula-79-profile

The singular primary issue that you can’t solve without modding a car is aero choices. Regardless of the track the ai tend to gravitate towards high downforce setups. I don’t know the complete history of the ai_default.ini file in AC, but I do know that in the current version ai will ignore any aero settings you specify, which is a real shame, imo.

Please note the following AERO section from the data\setup.ini file of the RSS Formula 79

/////////////////////////////////////////////////////
;AERO
/////////////////////////////////////////////////////
[WING_0]
SHOW_CLICKS=0
TAB=AERODYNAMICS
NAME=Front Wing Angle
MIN=0 // we can use this to force a minimum for the front wing
MAX=12 // we can use this to force the maximum for the front wing
STEP=1 // this only affects humans, not ai, as you’ll see later
POS_X=0.5
POS_Y=0
HELP=HELP_FRONT_WING

[WING_1]
SHOW_CLICKS=2
TAB=AERODYNAMICS
NAME=Rear Wing Position
MIN=0 // we can use this to force a minimum for the rear wing
MAX=24 // we can use this to force a maximum for the rear wing
STEP=12 // because step is 12 humans only get 3 rear wing settings, but ai get all 24 (or 25?)
POS_X=0.5
POS_Y=1
HELP=HELP_REAR_WING

I started a race with 2 ai opponents driving the Formula 79. We can check the log.txt after starting a race (there’s no need to finish it) to get some insights about what the ai is choosing for aero. If you search for Wing, you should find some lines that looks like this:

Checking: WING_0
...
AI can change Wing: 0 (0.000000, 12.000000)
Checking: WING_1
...
AI can change Wing: 1 (0.000000, 24.000000)

Those ranges match up with what’s shown above in the aero settings of the data\setup.ini file. Farther down I found the lines below, which show the ai cars have chose fairly high aero settings for Monza, which is probably the most low downforce track to have ever existed (except maybe a drag strip). The lines also demonstrate that ai has access to the full range of rear wing settings regardless of the step value being 12. This may help to increase the variability of racing against them.

AI car 1 changes Wing0 12.000000 -> 11.000000
AI car 1 changes Wing1 24.000000 -> 21.000000

AI car 2 changes Wing0 12.000000 -> 10.000000
AI car 2 changes Wing1 24.000000 -> 22.000000

And there’s more lines like this:
Setup change for Car: rss_formula_79 [1] Changing: WING_1 from 24.000000 to 21.000000
Setup change for Car: rss_formula_79 [2] Changing: WING_0 from 12.000000 to 10.000000
Setup change for Car: rss_formula_79 [2] Changing: WING_1 from 24.000000 to 22.000000

The lines below are where I loaded the ai_default.ini explicitly into the car assigned to me, which has 1 front wing and 0 rear wing:
Setup change for Car: rss_formula_79 [0] Changing: WING_0 from 12.000000 to 1.000000
Setup change for Car: rss_formula_79 [0] Changing: WING_1 from 24.000000 to 0.000000

If you look just above the lines where it says “Checking: WING_0” you should see something like:
Looking for AI setups in:
C:\Users\David\Documents/Assetto Corsa/setups/rss_formula_79/monza/ai_default.ini
system/setups/rss_formula_79/monza/ai_default.ini
SetupManager::load: C:\Users\David\Documents/Assetto Corsa/setups/rss_formula_79/monza/ai_default.ini
….
AI SETUP FOUND

I’m assuming that this means the ai found the ai_default.ini setup, loaded it, and then ignored the wing settings in contained. :-\

I do believe that the ai will use gear settings found in the ai_default.ini, so that’s helpful in getting them to be more competitive in terms of gearing, but you can’t specify a separate qually and race gearing (in case that’s something you’d like to do).

If you’re still wondering why anyone would want to limit the aero choices for the ai at Monza the difference between a low aero setup and a high aero setup is at least 3 seconds a lap. With this imbalance there is no chance the ai will be competitive, and at worst they will be a hazard going into and through some corners at such different (slower) speeds.

So, how do we limit aero settings for the ai? The answer is by creating a “mod” car of the original, and adjusting the setup.ini aero section.

If you unpack the data.acd into a data folder you can then copy the whole content\cars\<carname> folder into something like content\cars\carname_ai_ldf (ldf stands for Low DownForce, you may also want an _ai_mdf and _ai_hdf, just to make sure you’re racing ai with similar downforce settings). Once you’ve done that you can edit the data\setup.ini to force very low maximum values for the MAX wing settings. In this instance WING_0 will have little effect on top speed, so I’ve allowed for some variation.

/////////////////////////////////////////////////////
;AERO
/////////////////////////////////////////////////////
[WING_0]
SHOW_CLICKS=0
TAB=AERODYNAMICS
NAME=Front Wing Angle
MIN=0 // we can use this to force a minimum for the front wing
MAX=2 // we can use this to force the maximum for the front wing
STEP=1 // this only affects humans, not ai, as you’ll see later
POS_X=0.5
POS_Y=0
HELP=HELP_FRONT_WING

[WING_1]
SHOW_CLICKS=2
TAB=AERODYNAMICS
NAME=Rear Wing Position
MIN=0 // we can use this to force a minimum for the rear wing
MAX=0 // we can use this to force a maximum for the rear wing
STEP=12 // because step is 12 humans only get 3 rear wing settings, but ai get all 24 (or 25?)
POS_X=0.5
POS_Y=1
HELP=HELP_REAR_WING

Now we can check the log.txt to make sure the ai are in fact using low aero:
Setup change for Car: nagp_lotus_79_ai_mod_ldf [1] Changing: WING_0 from 12.000000 to 2.000000
Setup change for Car: nagp_lotus_79_ai_mod_ldf [1] Changing: WING_1 from 24.000000 to 0.000000
Setup change for Car: nagp_lotus_79_ai_mod_ldf [2] Changing: WING_0 from 12.000000 to 2.000000
Setup change for Car: nagp_lotus_79_ai_mod_ldf [2] Changing: WING_1 from 24.000000 to 0.000000

After solving the aero problem you can continue to go a step further to making the ai more competitive by adjusting the data\ai.ini values for AERO_HINT and BRAKE_HINT. It’s much better to do this while letting the ai drive your car around a hotlapping session (CTRL+C). Fiddling these values up and down is mostly trial and error, and it helps to have a performance delta up so you can hopefully quantify that what you’ve changed has had a positive or negative affect over at least several corners or preferably laps.

AI Dev App:
BrakeAndAeroHints.jpg

When you are done making adjustments click the “SAVE ai” button to save the aero and brake hint changes back into the ai.ini.

You can also change the <track>\<possibly layout>\data\ai_hints.ini file. This works best if you are running a one-make race. If you’re trying to run something more like multi-class then this will be less useful, and it may also fail to be useful if you are running high downforce and low downforce version of the same car in the same session.

You can try recording a fast lap with the same car and setup that the ai will be using. There is some brake and throttle data stored in the fast-lane, but I’m not sure how much the ai rely on that data to control their own brake and throttle inputs. This is an area I need to investigate more as a possible option for lowering ai lap times.

If anyone has any corrections or additions to this information please share it with me. Many thanks to @LilSki for all the information and guidance.

Cheers,

Esotic
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top