How to find the right AI level without trying them all?

Shovas

Premium
Update 2020-04-10: Based on my experience in this thread, I've released an AI mod: "SHO Competition AI is a mod for original content GTR2 cars and tracks that modifies various AI-related configuration parameters to achieve more realistic race performance by AI drivers resulting in more realistic, tighter, and more intense racing." Click here to download the SHO Competition Mod.

How to find the right AI level without trying them all?

I've always had a problem with dialing in AI. I don't know what produces a good race. It seems like I either get blown away or I have to start from way back in the grid (even though my times are better) and work my way up... There's no middle ground like where I might qualify top 6 and have a good battle with the lead pack: If I quality top 6 I always end up killing them in the race by large margins, like 10sec+.

I feel like there's some combination of qualifying grid position that would mean the AI level is correct and that I will have a tough battle to win. Maybe I need to qualify top 6-12th but not higher or lower to have a good fight mid pack? I don't know.

How do you find the right AI level?

Here's some times I pulled qualifying at VLM Sebring in the Ginetta G55:
Ginetta G55 @ VLM Sebring, 20C+, Clear, 2pm QUAL

screen capture tool

1. I notice 80-95 has its own slope linearity vs 95-120. I believe this is due to <95 not being able to use full throttle (it's hard-wired like that into the game, if I understand correctly).

2. My best qualify was a 2:14.420 so that turned out to be AI 93 (which I had times for: 1st 2:14.660 vs 25th 2:16.088). My actual qualify was lower, like 12th or something but I easily got up to 1st within a lap or two and proceeded to lead by 18sec at the end of the 5 lap race.

Ideally, I'd like to figure out the time deviation between each AI level, run a single qualifying session at AI 100, and then run my time through a calculation that would pick the ideal AI level for me. That calculation is eluding me so far, though

My whole problem is I don't want to have to try qualifying in many sessions with different AI levels just to run one race. I'd much rather run one qualifying session and then determine an AI level from that with a calculation and then start another race session with that AI level. I think that's about as streamlined as it can get.
 
Last edited:
I don't have a duplicate rcd of the same name as I used the only Luca Capellari that is already included. Anyway when changing names of the first line in the rcd file, I always make sure it's different than an existing one so if I want another Luca Capellari, I changed it to "Luca Capellari2" so as the driver1 line in .car file and rcd file name will be Capellari2. I don't know about the abbreviation if it has effects and I forgot what each line and their value means in the rest of the rcd file especially those without the explanation after //.

As Jempy said, I think it will be a great idea. I have a copy of his first post only.

And thanks Kenny.
 
Uploaded "VonDutch AI Mod and Tutorial"; this contains the full AI mod, the AI tutorial, nine pdf files containing most of the AI thread from NoGrip, and a few pdfs of misc threads pertaining to AI adjustment.

BTW, the data in the tutorial and the thread apply to GTL as well, though obviously the mod itself will not work. The only difference is that changes may not be identical, i.e. changing something by 0.01 in GTL may produce more or less effect than the same change in GTR2.
 
Last edited:
I always had the feeling that AI in GTR2 is slower than the driver mostly in the 2 first laps.
You may even gain many places in the first half of the 1st lap.
Did you try a longer race than 5 laps ?

Mostly, when I have time to do a race in GTR2 ... I mostly do races of minimum 30 minutes.
Rather short for a VLM LeMans 79 race .... surely the same for ... Sebring ;)

I ran a 30min race at VLM Sebring 12h with the updated AIW at AI 100. I qualified last (out by 0.5s from the next, and out by 1.5s+ from first). I tried not to pass too many cars in the first lap as that's too easy but sometimes they're a mess, so was 19th or so after the first lap. I gained 1st by about 8-10min left and lead by 8s+ at the end.

With iRacing, with real people, competitively placed by iRating and qualifying, I find that I tend to finish near my qualifying position. In general, you're not suddenly going to be much worse or better in the race than you were in qualifying. There are the occassional DNFs that bump you up a few spots, and very rarely big mess ups ahead of you where you can get near or win the race, but mostly you're finishing within a few +/- spots of your qualifying.

All other things being equal, I think it simply comes down to pace. How to get the AI to race at qualifying pace (even if slower due to setups, they should all be consistenly slower)? I suspect that's in the talent files which is a little too tedious to get into for just one-off racing.

Would be nice to come up with something that could be packaged with the HQ Mods or the 10th Anniversary mods for stock and HQ cars.
 
I always had the feeling that AI in GTR2 is slower than the driver mostly in the 2 first laps.
You may even gain many places in the first half of the 1st lap.
Did you try a longer race than 5 laps ?

Mostly, when I have time to do a race in GTR2 ... I mostly do races of minimum 30 minutes.
Rather short for a VLM LeMans 79 race .... surely the same for ... Sebring ;)

That is due to talent files.
//AI ColdBrain variables
RaceColdBrainMin=0.93
RaceColdBrainTime=120
QualColdBrainMin=0.80
QualColdBrainTime=200

This is a standard entry so for the first 2 min (120 sec) the car slowed down with additional X 0.93

I find Berry's talent files from Reborn project the best and most consistent.
 
But reborn talent files are all the same clones, i find quite stupid to have 150 driver files with same specs : that is why they fight on same level in reborn. Just delete all RCD files and keep only default.rcd file then you will get the same effect : I am sorry but you just cannot place L.Hamilton and R.Grosjean on same level LoL
 
But reborn talent files are all the same clones, i find quite stupid to have 150 driver files with same specs : that is why they fight on same level in reborn. Just delete all RCD files and keep only default.rcd file then you will get the same effect : I am sorry but you just cannot place L.Hamilton and R.Grosjean on same level LoL
They are not the same on my download?
They got different race skills and consistencies but yes all got a chance to win and they all starts close to full strength.
Nether Hamilton nor Grosjean are on my computer just AI to make if more fun.
I do not care what the AI are called newer even look at that.

With only 3TB HD there would not even be enough space for Hamilton :D
 
I've been intensively experimenting with Von Dutch's PLR and AIW parameters attempting to find values that result in or resolve these AI issues:
  1. Representative Qualifying Position:
    1. If I qualify 5th I'm probably not going to win the race in real-life. I might move +/- 1-2 positions, occassionally but rarely more, but realistically I'm not in a position to win the race. If I do qualify 1st-3rd then yes I might have a shot at winning.
  2. Realistically closer qualifying vs race pace:
    1. Original AI will be MUCH slower in race than they were in qualifying. This results in the issue noted above where, for example, if you qualify 10th, with original AI, you have a good shot at winning which indicates your true qualifying position should have been much higher.
  3. AI Qual/Race lap times differ by too much
    1. For example, qual/race times may differ by multiple seconds and this can prevent hard, tight racing battles.
    2. This is an easy fix, set PLR Player Car Equal="1", and on a 25 car grid times should all be within about 1.5sec of each other.
  4. AI Levels Not Granular Enough / Have bad hard-wired side-effects
    1. Example: +/- 1 AI Level increments do not provide the granularity needed to tune in AI for competitive, tight racing, and AI 80-95 are hard-wired to *not* use full throttle.
In a nutshell, I'm looking for realistic, close racing around my qualifying position.

Here are some very rough notes of what I've done so far (there's a whole spreadsheet I'll show later) and a step-by-step process of tuning the AI to suit your personal driving skill level (this process is also rough and needs some streamlining to make it as easy as I think it can be made).

Ginetta G55 at Sebring 12h, AI 100, 25 car grid

7. Von Dutch AI Tuning

Problem: AI times are too spread out in Qualifying and Race resulting in wide gaps between cars which prevents hard, tight race battles from being the norm.

Solution: Set PLR Player Car Equal="1" ('less variance between fastest and slowest cars' from AI_Mod_Manual.rtf)

Problem: AI Qual vs Race lap time differential is too extreme. AIW QualRatio vs RaceRatio should be more like 1-2% max in real life because it's based on a whole lap time (ex. QualRatio=1.01%+ on a Sebring 12h lap time of 133.300 is 134.633, which is reasonable, but in GTR2 races they go much slower due to Talent file considerations).

Solution: Due to variables like Talent files affecting Qual and Race pace, the best option is to set QualRatio=1.0 and RaceRatio=1.0 and then tune QualRatio to place you where you realistically should be.

Problem: Qual result is not representative of relative performance in-race player vs AI. For example, it's common in GTR2 to qualifying 10th+ and still win the race. This not realistic. It means that you should've actually qualified very high. This is due to Qual vs Race pace being way off due to Talent file variables.

Solution: Same solution as above.

Problem: AI braking and cornering is too good by default resulting in extremely low qualifying times that can't be tuned out with the AI level due to lack of granularity and hard-wired issues like AI 80-95 not using full throttle.

Solution: Tune AI Brake Power Usage + AI Brake Grip Usage + AI Corner Grip Usage in unison to achieve realistic qualifying times and tight race battles.

Problem: AI level is not fine grain enough to find your competitive level while still having tight battles.

Solution: Set AI=100 always. Tune other parameters to ensure you qualify where you should be for a good, tight race where you'll be able to move +/- a few positions, ocassionally more based on AI dynamic performance, but you won't or will rarely be able to make up more than 4 or 5 spots from your qualifying position.

7.1 Start from Von Dutch AI Mod 1.0 PLR Settings ("AI_Mod_Manual.rtf" in "AI Mod v1 v1_0 by vondutch51")

AI Driver Strength="100"
AI Power Calibration="7" // Adjustments with AI strength (0=none, or add the following: 1=power, 2=gearing, 4=fuel)
AI Additional Fuel Mult="0.98000" // Additional fuel multiplier for AIs because of their driving style
AI Brake Power Usage="1.20900" // Fraction of theoretical brake power that AI attempt to use
AI Brake Grip Usage="0.95550" // Fraction of theoretical brake grip that AI attempt to use
AI Corner Grip Usage="0.97500" // Fraction of theoretical cornering grip that AI attempt to use
AI Max Load="38700.00000" // Maximum total load to set up theoretical performance tables
AI Min Radius="20.00000" // Minimum radius turn to set up theoretical performance tables
AI to AI Collision Rate="40" // Detection rate per second (1-40) for AI-to-AI collisions
Player Car Equal="0"
AI Realism="1.30000"

7.2 Update to Von Dutch AI Mod - Shovas AI Updates:

AI Brake Power Usage="0.96348" // Fraction of theoretical brake power that AI attempt to use
AI Brake Grip Usage="0.96348" // Fraction of theoretical brake grip that AI attempt to use
AI Corner Grip Usage="0.96348" // Fraction of theoretical cornering grip that AI attempt to use
AI Max Load="35000.00000" // Maximum total load to set up theoretical performance tables
Player Car Equal="1"

7.3 Update Location AIW settings:

WorstAdjust=(0.75)
MidAdjust=(1.02)
BestAdjust=(1.19)
QualRatio=(0.9878125)
RaceRatio=(1.0)

7.3 Run qualifying at AI 100 and record lap time

7.4 Adjust AI Brake Power Usage + AI Brake Grip Usage + AI Corner Grip Usage in sync so that your qualifying time will be at the correct qualifing position.

7.4.* Start adjustments at +/- 1% and use bisection searching to find the optimal value

7.4.* Balance these changes with equivalent, opposite changes to AIW QualRatio to avoid overly fast qualifying times that knock your qualifying position out of balance.

7.4.* Note: Shovas AI is designed so that you won't be able to make up too many positions while racing - just like real life you wouldn't go from 10th to 1st if you put in a representative qualifying time.

As you tune the AI and QualRatio parameters to your actual qualifying times, your races will be become tigher with the positions you have qualified near. For exampl, the goal is that if I qualify 5th I'm probably not going to win but I want to have a good battle (+/- 1-2sec for many laps) with the AI around me.

...work in progress..

I will be continuing to work on this and attempting to streamline it so that it's easy for most GTR2 users to do.

One key to this process is AI is always 100. You tune other parameters because the AI level is not granular enough to achieve what we want.

I have already made tremendous improvements to my racing experience vs original AI or even original Von Dutch or original HQ AI settings.

My one concern right now is that these settings won't apply very well to other cars or tracks but we'll cross that bridge when we come to it.
 
In case anybody was wondering what that spreadsheet looks like:



lol I really didn't want to do that many qualifying/race sessions but it's turned out that way...and the results are positive so far, I think I can get to where I want, so it's worth it for now.
 
Question: Does anyone know if AIColdBrain parameters actually are intended to simulate running on cold tires - if GTR2 is already simulating actual cold tires? Wouldn't AI have just as much grip as me? Or is GTR2 only simulating player's tire temps and AI are always running on 80C tires?

I wish the AIColdBrain params weren't even a thing. They mess up my experiments for the first two minutes of every race.
 
Just change coldbrain=1.0
With Textcrawler you can do that in 10 sec in all talent files.
My guess is it is there to avoid a pile up in the first couple of corners.
Like we see in PC2!
This mod I'm using doesn't seem to use stock Talent files. I mean I can't find the AI driver names in any Talent files.

Does that mean I'm out of luck and that GTR2 is using hard-wired values for mods that don't explicitly code those parameters?
 
@Shovas: Coldbrain has nothing to do with cold tires, it is a setting which defines the concentration of the driver : beyond a coldbrain value, the driver will start to make mistakes with less concentration. So if you stuck to rear bumper of a driver with low coldbrain you will get on his nerves (the car will not take the best lines and driver will do driving mistakes) sooner than a driver with high coldbrain value
 
This mod I'm using doesn't seem to use stock Talent files. I mean I can't find the AI driver names in any Talent files.

Does that mean I'm out of luck and that GTR2 is using hard-wired values for mods that don't explicitly code those parameters?

If a talent file is not found for a particular car (none specified or the file is not present) the game uses default values, which are usually too fast/aggressive. It is a good idea to create talent files for each car, even if just cloning existing ones and merely changing the driver names.
 

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top