- Apr 18, 2014
I spent a lot of time trying to find an in-game method of determining the right AI, as well, just wasn't able to find one that produced good racing.This is an interesting read. I try to come up with a method to determine AI Levels for me and I am curious to see what you come up with. But I don't tweak any game files. I am just trying to predict race laptimes by the AI performances in qualification and warm-up and, by comparing it to my times, setting an AI level for each race that suits my level of driving. HQ tracks and with addon/mod cars. I'm not sure if what I am doing is valid or if I'm just lucky in hitting the right levels but after 10 rather boring races the last two were really good (I have one in progress that really demands my everything). Opposite to you I am doing mostly endurance races depending on how many cars are in a mod. Full grid 100% race length, half grid 50 % and likewise. I like doing endurance races. I made two observations during those races and wanted to share those. Maybe it helps.
First thing is consistency. An AI drivers times can vary dramatically within a race (probably not a factor in a 10 lap race). I discovered that several times during races. While I keep my times within a second over a couple of laps I gained about 5 secs on the car following me. Then, all of a sudden within one lap he made up that five seconds within one lap and overtook me on the next only to be overtaken be me again and falling behind rapidly. And this kept going on (Audi RG GT3 LMS mod). On my actual race I was within a second with another car for 10 laps fighting for position. Upon entering a corner I saw him going sideways in the mirror and the gap rose to 6 seconds. He was back at my rear within a lap. There is a consistency entry in the talent files but I've never touched them. I don't know if a higher number means more consistence laptimes or more variation. I have already won a race where my fastest laptimes was 2 seconds slower than the slowest AI time (on a 36 car grid). That makes it more difficult to set an AI level since only taking one best time from each AI driver doesn't give enough data I think. I am cheating here a little bit by adding a certain percentage to the difficult level. It's my personal performance penalty if you will. But it works for me. I am in the process of a 93 lap race in Dubai with BAC Mono and Ariel Atom 500. I'm in an Atom, started at 13th (random grid position). By the middle of the race I gained 1st due to varying pitstops and fell back to 3rd. But I had several exciting battles with different cars going back and forth. Most fun I had in months. As I mentioned maybe I am just lucky in hitting the right AI Level. I don't think I can win this. The Mono is faster but needs to pit more.
Talking about AI pitstops. Maybe not a factor in determining AI strength but it is unrealistic. I am certain AI always does 4 tires and full load of fuel. It sometimes happens that cars have to pit with only a couple of laps left and I was able to win races by just taking the needed fuel and no tires. AI was always pitting much longer.
Whatever, maybe you can take something out of it, if not I think I have taken enough of your time . I hope you will continue your work.
My main problems were that qualifying had no bearing on AI performance in a race session. No matter where you end up in qualifying, if you're not many seconds off pace, you have a good chance of winning the race. That kills the immersion for me. I'm familiar with iRacing, where your qualifying position tends to be where you end up at the end of the race, plus or minus a few positions. You typically don't end up winning the race if you didn't qualifying top 3. That's realistic. That's what I'm trying to achieve.
I've actually written down the goals for myself while I document my changes and they provide a little more detail:
I'm also trying to eliminate variables such as differing AI 'personalities' affecting performance. I've been baselining as much as I could find so that I could have a solid foundation on which to calculate that would produce reliable results.tl;dr I'm looking for realistic, close racing around my qualifying position.
Representative Qualifying Position:
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.
Realistically closer qualifying vs race pace:
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.
AI Qual/Race lap times differ by too much
For example, qual/race times may differ by multiple seconds and this can prevent hard, tight racing battles.
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.
AI Levels Not Granular Enough / Have bad hard-wired side-effects
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.
I'm doing short test races because there's a lot of round-and-round involved and I want even the short races to feel realistic with the AI drivers ready to go right from the start just like real-life, excepting first-lap jams and shenanigans, of course, but nothing artificial like limiting their speed, etc.