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

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:
Hi guys. Just found an old GTR1 Reborn mod. It contains .Rcd, Talent, Tires, I.R.G .Plr and .Eng files for the default FIA GTR game. I loaded up GTR1 and tested them and the game is really cool to play, much better than the default GTR1.

Most importantly it contains a ReadMe file which explains in detail about the various changes to the physics. These changes can be transposed into GTR2. You'll notice that the tires have the same Long/Lat parameters, the same Long/Lat format was done in the previously released Nascar 03 by Tiburum? I can only assume that when GTR1 was made, the same format carried over and would go towards the difficulties in handling the default game.

Oops, just noticed i cannot post a compressed .7z 85.3KB file, so i'll post 2 important points that were brought up recently.

7. Changed the default AI Max Load to "31000.00000" // Maximum total load to set up theoretical performance tables. This value takes into account the cars weight and Generated G-Force Parameters.

8. Changed the default AI Min Radius to "0.50000" // Minimum radius turn to set up theoretical performance tables. This value is derived from the minimum radius that the car can turn.

(as there is only 1 possible AI Max Load and AI Min Radius entry the heaviest vehicle was used).

Hope this helps.

Regards

Barry
 
HELLO!
i'm about to test your

..but, there are at least 3 AI mods (I think), the one in the former "10th", the one in the HQ Mods Collection (both are "GTR2 HQ AI v4.2"), ... and then there is yours. (and another mod from there is also somewhere in the DR:O_o:)

they are the same? (I doubt it), I mean how "proven" are ...
Of course, it is like asking the seller if your product is good, it will always say that it is the best:roflmao: ... but my intention is to try and test ... and in that case I may not notice the differences:O_o::O_o:. I don't know if I make myself understood (if not, I'll explain it again).

:thumbsup:

Google translator.
 
SHO Competition AI is meant to be applied against vanilla GTR2 (original cars and tracks) without any other mods.

I had to do it that way to avoid too many variables in dealing with other mods.

Let me know what you think. Be sure to read the README for lots of helpful info, tips and tricks.
 
Hi guys. Just found an old GTR1 Reborn mod. It contains .Rcd, Talent, Tires, I.R.G .Plr and .Eng files for the default FIA GTR game. I loaded up GTR1 and tested them and the game is really cool to play, much better than the default GTR1.

Most importantly it contains a ReadMe file which explains in detail about the various changes to the physics. These changes can be transposed into GTR2. You'll notice that the tires have the same Long/Lat parameters, the same Long/Lat format was done in the previously released Nascar 03 by Tiburum? I can only assume that when GTR1 was made, the same format carried over and would go towards the difficulties in handling the default game.

Oops, just noticed i cannot post a compressed .7z 85.3KB file, so i'll post 2 important points that were brought up recently.

7. Changed the default AI Max Load to "31000.00000" // Maximum total load to set up theoretical performance tables. This value takes into account the cars weight and Generated G-Force Parameters.

8. Changed the default AI Min Radius to "0.50000" // Minimum radius turn to set up theoretical performance tables. This value is derived from the minimum radius that the car can turn.

(as there is only 1 possible AI Max Load and AI Min Radius entry the heaviest vehicle was used).

Hope this helps.

Regards

Barry

Thanks for this. I think I will definitely try both of those points in my tuning.
 
Believe it or not, from time to time I still work on these numbers. I actually FINALLY figured out how Excel graph formulas are meant to be used (they only work with one specific plot type: scatter plot). Now, I can use the interpolation formula to get a new AI value for a given lap time vs AI's fastest lap time to bring them up or down to you.

That only works on one car+track combo, though, so you'd need to generate a dataset for each.

Instead, I need to figure out how to convert and use that as time-percentage-per-ai-unit-of-total-laptime instead of the current time-per-ai-unit-of-total-laptime. My theory is that a percentage metric will be relative to AI levels in general and applicable to all cars and tracks.

My heads hurts when I think about it so we'll see :D
 
Hi Shovas,

yesterday I downloaded your Competition AI mod, and I'd like to share some of my experiences with you. First of all, thank you for the hard work you've put into the mod. As an offline racer, good AI is a must for me, and I think GTR2 is a pretty good base for singleplayer experiences - with the right modifications. This thread is a godsend as it gave me some very good ideas about how the AI work in GTR2.

So yesterday I tried your mod. Previously I used the HQ AI mod from the HQ Mod Collection, which I think is a pretty good upgrade from the vanilla AI. Before installing your mod, I reverted back to vanilla files with the help of your "Originals" folder, just to make sure your mod won't interfere with the HQ AI mod. I've set up a race at Magny Cours 2003, 40% distance, AI strength 100, aggro set to "real", full field of cars. I qualified 2nd. The start was flawless, the AI being racey rith from the start, AI1 kept the pole, I held my 2nd place, the AI behind me was in my tail for three laps, but also the guy in P4 put pressure on P3. All in all, fantastic start, the best early-race experience I've ever had in GTR2!

Then came lap 4, full course yellow was announced (I've set Safety Car Threshold="1.50000" in the .plr file). It's rather rare to have a FCY in GTR2 so I was surprised but I didn't mind it; after all, it adds to the immersion, and I saw earlier (in all sessions) that the AI was struggling with T2, sliding off the track quite frequently. I can remember T2 was pretty problematic for the AI even in the vanilla game, so I didn't pay too much attention.

After 3 laps of FCY the race finally went on. I messed up T2 (yep, it is a tricky corner...) and the AI behind me passed me, leaving me in P3. After that, a nice race went on with me chasing the two AIs in front of me, and the guy chasing me in P4. Seriously great race!

Things went downhill when we started to pass the slower cars. In T2, many cars went off the track, and I saw many bumps between the AIs if they were not fully aware of each other. Other then these issues, lapping the slower classes was pretty straigthforward, the GT cars did a good job overtaking them. Then came the catastrophy: the AI in P4 was getting closer and closer to me and after 30 minutes of hard racing he rammed into me with full throttle in T1, wrecking me out of the race. I wasn't happy but my first impressions were very good, regarding AI behaviour.

Then I set up a shorter race (20%) at Donington 2003, raising the AI to 102, to give a bit more challenge. I qualified 6th. The AI seemed very clumsy right off the bat in the practice session, and this behaviour continued in the race. The AI were all over the place, sliding off the track all the time, especially in T3 and T5. The pace of the AI was pretty good, but there were so many accidents, that it gave me an unfair advantage, gaining more and more positions until I found myself in pole. The race wasn't really fun but I did the whole race, finishing in P1.

After this race I reverted back to tha HQ AI mod, and did the same 30 min race at Doni. No problems at all. No sliding AI, no unforced accidents. Unfortunately, the HQ AI have problems with lapped traffic, the GT cars often slowing down behind the G2, NGT cars, hesitating with the overtakes, making these longer races pretty bland.

Sorry for writing a whole novel but I wanted to give you as much information as possible. So my observations with your AI mod are:

  • AI has lower awereness compared to vanilla AI and HQ AI,
  • AI goes off the track frequently (they look like they have lower grip, compared to vanilla and HQ AI)
Here's the AI section of my .plr file:

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

Could you tell me your AI Max Load and AI Min Radius settings? Have you experimented with these settings?

Other than these issues, your AI mod is very promising, I'm very grateful you shared it, and also I think this thread is probably the most valuable source when it comes to AI in GTR2. Thank you Shovas, and all the others who regularly contributed to this topic!

Cheers!
 
Thanks,
Hi Shovas,

yesterday I downloaded your Competition AI mod, and I'd like to share some of my experiences with you. First of all, thank you for the hard work you've put into the mod. As an offline racer, good AI is a must for me, and I think GTR2 is a pretty good base for singleplayer experiences - with the right modifications. This thread is a godsend as it gave me some very good ideas about how the AI work in GTR2...

Thanks, Vilmos, that's an incredibly valuable post and gives me a lot of good pointers about what's happening with the ai in the mod right now.

I guess there's a couple of issues, that I can see right away.

One is there is a separation between how AI are "trained" to drive around on a track with a certain path and other is the parameters that I modify that modify the way AI behave while driving that path (eg. aggressiveness, coolheadedness, brake/corner grip, all that).

So, my mod tunes for their behaviour and I never did get into AI training. Maybe that will be needed.

But it makes me wonder. Basically I modify PLR AI parameters and RCD (Talent) files. I imagine most track modders train their AI with original AI PLR params. If that's the case, then my adjusted parameters may cause the AI to be overly confident (thinking they have more brake grip than they do, for example) resulting in crashes in corners.

That means, maybe my next step will be to go back to original PLR AI params and simply tune with Talent files.

I came across an analogous scenario with tuning ffb: I was tuning FFB to a specific mod that I really liked and either hoped it worked with original and other mods or I would also create PLR FFB params for each case (ie. original cars, other mod cars).

I learned that I should be tuning against original cars because most modders design their cars against original PLR FFB params. If I tune the FFB so that it still feels good with original cars, then it has a higher chance of feeling good with mod cars, too.

Thanks for your input!
 
Check out my latest updates here for a new auto-calculation solution that I'm much more confident in because it accomplishes the ideals of what we've just been discussing (calculating based on original content cars and tracks and default PLR AI parameters):


I've finally got correct polynomial interpolation of AI strength vs laptimes and that allows me to find the correct AI strength for an arbitrary player laptime. That's the hardest part.

It's also based on a proportional metric instead of static time-per-ai-level metric I was using before which only applied to one car and track. Now, hopefully, the calculations will be more reliable across cars and tracks.
 
Last edited:
Hey Shovas,
thanks for responding! I did another test race with the SHO Competition AI. Original content (Ferrari 550 driven by me, full field of mixed class AI cars at Donington, 30 min race, Ai strength 100, agression real). Again, the AI was all over the place, rigth from the begining in the practice and the quali sessions. They ran wide in those corners I mentioned in my previous post. In fact, I didn't even attempted to run the race itself, because it would have been terrible again. Watching the AI, they look if they were way too ambitious in general and I'm wondering which setting/combo of settings control this behaviour? What I LOVE about your AI mod is that they are really racey and the GT cars deal with the traffic very well (I mean all cars, but it's much more important for me to have an AI that can drive the GT cars around lapped cars - and the lapped cars don't do anything stupid in the meantime). Probably my problem contradicts these traits, I mean there's a chance, that if I get rid of that over-ambitiousness, would kill their great race-ability... Still, any tips?

One more observation: using your mod creates quite monotonous grids, because the quali results reflect the performance of the cars, and not the drivers' skills. What I mean is I usually get a grid with the Saleens in P1-P3, then come the Ferrari 550s, then Ferrari 575s, followed by the Aston MC12s and the Listers, then the Vipers at the end of the GT class.

To be honest, my ideal AI mod would be something like a blend of the HQ AI and the SHO AI. I'll try to experiment with the talent files, as I think they are the key to tone down the AI to keep them on track. I'll report back if I come up with something useful.
 
Hi all,
just a brief update - I struggled with the AI since my last post. Even if I found many good things in both the HQ AI and the SHO AI mod, I still had many problems with the AI cars sliding off track and bumping to me and each other, regardless of the agro setting. I downloaded another AI mod (Kuckoo's mod) and even if the basic behaviour was different than the other two mods, I had the same issues. So much so, that the game was pretty much unplayable. This is why I decided to wipe GTR2 off my PC, and start it over.

Previously, I had a vanilla install from Steam, and I had the latest HQ Mod Collection, and I dropped only those mods on top of the vanilla game I really wanted. This time, I downloaded the HQ Anniversary Patch and after reinstalling GTR2, I did everthing as written in the readme. At the setup stage I chose the HQ AI. After starting the game and doing all the necessary setups, I started a race, and guess what, I had a fantastic race! After that I installed Shovas' AI mod with Setup.bat (I didn't even know it was part of the Anniversary Patch...) and I tried that as well. Same result: fantastic race! Now, I'm confident enough, to finally start a championship.

All in all, thank you guys for this great experience. To be honest, I'm kind of shocked that GTR2's AI puts new titles to shame, thanks to your works!

Salute, Shovas and GTR233!

(One more thing: Shovas, your FFB settings are incredible!!!)

Cheers!
 
I suppose that since there are no more updates to this mod ... it is because it is already well polished. or at least it's fine in general. :thumbsup:

sorry for being so annoying, this surely I have already asked,
this mod have aiw files for the default tracks.
..so I guess a race on a mod track doesn't apply ALL the AI enhancement.
also this mod have talent files for default cars.
...so:
If I use a car mod that does NOT have or brings any rcd talent file, you just cars ... will they use the game's default ia?
and if I also use a mod track ...
Will this mod use the AI upgrade?

I suppose that in that case, it will use the game's default ia, (which just has the SHO improvement) and nothing else.
It makes the question worse if I have a very specific mod like supertouring world 1.7 (specifically that ... the old 1.6-1.7) that brings its own AI for each year (folder by folder).
alter something or nothing?

Thank you
 
Okay I didn't understand most of that but thanks for your efforts. :whistling::D
Older Simbin games are getting a lot of love this weekend. :thumbsup:
Now will this work with P and G.
Sorry I guess I missed this a long time ago.

I later found out even this tool wasn't reliable. The main problem is a lack of evenly distributed Talent levels. For example, I test on single car races (ex. just a race of Ferrari 575s) but there's only 2-3 Talent files for that so you get huge disparities in performance. If you remove the Talent files it goes back to the Default.RCD Talent performance and then all AI on the grid are just super close together and it becomes difficult to qualify in the middle of the pack (because they're separated by 0.5-1.0s) you usually end up qualifying first or last.

The solution would be to have many more Talent files per car, like 20+ would be ideal, so that a grid would have more evenly distributed performance. Then you could expect grid gaps of 1-5s say where you could likely easily slot in during qualifying.

In a multi car or multi class race there's more Talent files available so less of a problem but still not where I want it to be.
 

What are you racing on?

  • Racing rig

    Votes: 528 35.2%
  • Motion rig

    Votes: 43 2.9%
  • Pull-out-rig

    Votes: 54 3.6%
  • Wheel stand

    Votes: 191 12.7%
  • My desktop

    Votes: 618 41.2%
  • Something else

    Votes: 66 4.4%
Back
Top