AIW tweaking

Am having difficulty getting the AI cars to drive the same lines as I drive. This makes them slower in some corners, whereas generally they're quite fast and I have a hard time keeping up..!! I try to 'draw' the lines that I drive, but on some corners I just can't get it right. I am using the BTB AIW controls.

Is it better to get my hands dirty and use the rFactor tools method? Read the rFactor Devcorner pages and it seems like it's quite a bit of work.

Any advice most appreciated! :)
 
Different mods respond differently. Keep that in mind whenever you put together the AIW.

Fewer nodes work better. Make use of the corridors (just under the full width of the racing surface most of the time). Perfect lap times with the standard ISI cars and then tweak for other mods. Your own driving may not take the same lines... what's best for the AI is not always what's best for you as they often have more cornering or acceleration capabilities than you (plus they don't like sliding around corners, so keep their lines smooth). When testing, remember that the talent files and track's AI parameters can really mess with their lap times.

One of the better mods for fine-tuning AIW once the standard ISI cars are making it around as quickly as they can, in my opinion, is the AE86 Club mod.

Oh, yeah, that last question... I find the BTB tools are excellent up to the point of needing a non-standard pit layout or an inside path in addition to the fast path.
 
Thanks alot Emery.

A few questions:

- Can you explain a little more about the talent file and track AI parameters?
- Why are ISI cars better to test with? How does a mod change AI driver abilities?
- What is the inside path? Is it the same as the centre line? Or is it something that BTB does not cater for?

I have tried reducing nodes and this works very well.

I have noticed that I do drift/slide to certain parts of the track as I drive the circuit. If I then draw this line as a path, the AI car tries to literally follow it, resulting in a different line again. I guess it's just a question of iterations of refinement (isn't everything in BTB...?!)... Maybe I should test it online against a few people and see if they drive the same lines as me!

Will keep persevering.
 
I'm going to make several posts to answer your questions because otherwise I'll never get them answered...

Why are ISI cars better to test with?

The AI was designed before there were any independently developed mods. ISI had a certain expectation from the AI (that they didn't match until v1.250) and that serves as the overall benchmark. Meet that benchmark and you'll be 95% finished. If, instead of using the ISI cars for your testing, you started with a mod like 1971 Formula 5000 which has low grip, then you'd have a very conservative AIW for all other mods.


How does a mod change AI driver abilities?

I can think of three ways for a mod to alter the AI's driver abilities: talent files, grip multiplier, and default AI setup.

Talent files are used to mimic a driver's ability to put the hammer down in crunch time, surging through the pack in the final laps, and then petering out. You'll see this reflected in lap times in a long race. Talent files also dictate how aggressive a driver is for passing and how often they crash and make mistakes in their line. Most mods, including ISI's, have too much variability built-in to their talent files (if they have talent files) in my opinion.

Grip multipliers are in the mod's TBC files (tire files). The grip multiplier is probably the single largest influence on AI capabilities and compensates for a player's sliding the car through turns. The line in the tire file looks like:
AIGripMult=1.144 // Grip multiplier for AI vehicles (due to tire model simplification)
So this tire has 14.4% more grip than you, as a player has! Typical tire multipliers add 10-12% more grip for the AI. An extreme example can be found in V8Factor, where the AI cars have over 20% more grip.

Finally, a mod creator can specify a completely different default setup for the player and the AI. In practice, I don't think this is done much, but a savvy mod creator might create a setup that isn't overly loose or compensates for massive inherent understeer. It's best to just keep in mind that the AI doesn't drive the way you or I do and thus you have to cater to how it does drive.
 
What is the inside path? Is it the same as the centre line? Or is it something that BTB does not cater for?

The inside path is not available in BTB and is different from BTB's center line (fast path). You must use the ISI AIW editor (or a vanilla text editor like Notepad if you're a masochist) to create the inside path. The inside path is primarily used on oval circuits to provide the classic high line and low line plus making double-file rolling starts function correctly.

In asking around, I've not found anyone who has tried using the inside path on road circuits. Everybody agrees that it's possible and might provide some benefits, but none of us have experimented with it. Overall, it's one of those things that's not terribly important to a functioning AIW.
 
Can you explain a little more about the talent file?

The following is from an old racesimcentral post (author credit is lost) concerning talent files:
Ok here's the current situation with RCD files:

Aggression 0 - 100 (%)
As this number increases the AI will give other cars less room, both while passing and while following. It also increases the frequency at which they try to pass and the increases the threshold they are willing to endure before giving up a pass (or crashing, as the case may be...)
The aggression slider in the UI also affects this directly. RCD Aggression * UI Aggression = final....and should always be between 0-100%.

Reputation:
Courtesy:
Recovery:
All but worthless or no longer used.

Composure:
The lower the number, the higher the frequency of "intentional" mistakes. (if AI Mistakes is > 0 in the playerfile) If AI Mistakes in the playerfile is set to 0.0, then the AI drivers never make mistakes. *cough* Well, mistakes that I planned. "intentional" mistakes are things like, taking a turn too wide, or missing a breaking point.
Increasing composure also decreases the time between bad driving zones. (also affected by the playerfile variable AI Limiter, see MinRacingSkill below)

Speed: 0-100
How close to "optimal" this driver drives a track. This number directly interacts with a variable in the AIW file called "AIRange" AIRange tells us how wide the gap, from 0-100% (expressed as 0.0 to 1.0 in the AIW) The default is 0.1 meaning that the full range of Speed RCD values from 0 to 100, are directly mapped to the top 10% of the max speed = 90-100% For example a driver with 100% speed will drive at (0.9 + 0.1 * 100%) = (0.9 + 0.1 * 1.0) = 100% of what he thinks the track can handle, while a driver with speed = 0 will drive at (0.9 + 0.1 * 0%) = (0.9 + 0.1 * 0) = 90% what he thinks the track can handle. There is a random fluctuation in this value, but it's much less than in previous version where the random fluctuation was so great that it made the original value meaningless.

Crash: 0 - 100 %
CompletedLaps: 0 - 100%
Only used in auto completing laps (skipping practice/qualifying)

MinRacingSkill=0 - 100%
When the AI Limiter variable(from the playerfile) value is > 0.0, the AI drivers go through cycles of optimal driving and sub-optimal driving where their driving skill falls to MinRacingSkill * Speed. (Set the AI Limiter variable to 0.0, and the AIs will always drive to the best of their ability...every lap) So for example if you have a driver with Speed = 50, a AIRange in the AIWfile = 0.2), and MinRacingSkill = 90 This AI guy will usually drive around at (0.8 + 0.2 * 0.5) = 90% speed (really very very slow....but this is just an example), but will sometimes dip as low as (this speed * MinRacingSkill = (0.9* 0.9) = 81% while having a bad lap.....that is extremely low, but this is just an example with easy numbers.

 
Can you explain a little more about the track AI parameters?

In your AIW file, near the start of the [waypoint] section, you'll find three lines that control AI random performance:

WorstAdjust=(1.1000)
MidAdjust=(1.10500)
BestAdjust=(1.1100)

These lines control the variability of the AI's worst, typical, and best laps. In theory, one strives to get them as close to 1.0000 as possible. I do this through an iterative process, concentrating on the best laps first, then the worst, and finally bringing the typical laps into line with my expectations.

Realize that talent files combined with where the player has set the AI Skill slider are creating the worst, typical, and best laps. During my iterative process, I make sure the AI skill slider is at 100%. I also fill up the grid (to ensure a broad assortment of talent files are used) and run a long race, exiting immediately to the monitor once the race has started, then clicking on the "finish session". Go down through the results and jot down the times, make adjustments to AIW as needed, and repeat.
 
One more thought: I draw my initial AIW in the classic late apex manner from an overhead view. This will get the AI to an 80-85% performance level because it does not take into consideration rough spots in the track, up/downhill terrain, passing & blocking strategies, nor handling characteristics. Subsequent iterations of tweaking waypoints and corridors then get you to the 95% mark where you start looking at specific mods. If you need the AI to get orderly as they come into a chicane, gradually tighten the corridor in the braking zone.

As I've been making Continental Divide Raceway (CDR) AIW, I got to the 95% mark and started in on the other mods. Historix is an obvious choice with a historic track, so the TC65 sedans were high on my list. They all fell into line except the Mustang, which was way slow and far too tail-happy. I was beginning to feel like it was just the way things were. Then I had an aha! moment while watching the AI and, after a few more trials, I had it performing much better -- still a touch slow, but not agonizingly slow compared to the other cars. [Regretfully, I didn't write down what I did, so I can't pass on the tip... likely I lengthened the late apex so the AI could keep the tails in line when they got on the gas or smoothed the braking zones so they weren't pitching the car sideways on corner entry]

And this is the biggest point with the AIW: you only have one AIW for each track, yet it has to work for all cars, so it is extremely unlikely to be perfect. If a better AIW is needed for a particular mod, you're probably better off training the AI for that specific mod rather than trying to fix your AIW as long as the mod is only 1 out of 20. I don't drive formula cars very well, so I perfect my AIW in AE86, NAGT, & Historix. When I'm satisfied with them, I mostly watch the AIW in other mods to see that the AI are not doing something evil and trust that the performance is where it should be (e.g. if I switch to F3, then I better not be quicker than the AI at 100%!).
 
Emery - wow, what an amazing set of posts, awesome - thank you! :thumb: Alot to get through here and to play with, but man thanks alot, it's opened my eyes to this part of the track design process. I'll no doubt have more questions as I work through the various elements you discuss. But a couple already:

you only have one AIW for each track
With reference to your point below regarding one AIW for ALL mods,
my track is intended for Le Mans / sportscar/ endurance racing. I have been testing it with the Serie International Du Mans 2.77 (all categories), and had intended to go to Enduracers mod also as I find this mod is more difficult to drive (which affects my track designing in terms of establishing what is a difficult corner or not, but thats a separate story...!)

I will give the ISI cars a go on this curcuit to see how they perform. Since my last post I have corrected some of the corners where the AIW was not so good (where the AI was slower than me) but some still remain... will keep tweaking. In this respect your strategy of placing the AIW line with the 'classic late apex' path is interestng to read about. Presumably the line is somewhat specific to the intended racing type/category? Is there a wet line facility in the AIW in the ISI tools?

AI grip multipliers
This was interesting to read. So basically they have better grip through a corner? You say its to compensate the player's sliding. Does this potentially make things unrealistic in certain situations? For example on a long corner, surely you'd never be able to catch the AI if they had 20% extra grip as V8Factor has - 20% is a lot! Most racing drivers would love even 2% in real life!

How does rFactor simulate tyre degradation over a race? I would try to minimise slipping and wheelspin to preserve my tyres... presumably the AI cars have some sort of variable built in to reduce the grip over time. Is this separate to the slowest laptime variable (presumably this is about a reduction in driver ability)/

ps - does rFactor simulate slipsteaming / drafting?

Cheers :)
 
Presumably the line is somewhat specific to the intended racing type/category?
Yes, the optimum line for a given mod will be dependent on the mod. I think the reason the classic late apex path works well for the AI has to do with how ISI expected it to work best given "what we all know" about racing.

Is there a wet line facility in the AIW in the ISI tools?
Not that I'm aware of. I don't know if GTR2, which supports weather effects, has a wet line. Presumably if it does, then what you'd have to do with the ISI tools (or BTB) is explicitly create a wet line and save it into a separate file and then you could copy and paste it into a section titled something like [wet line]. When RF2 is released, we'll probably have to start all over again...

For example on a long corner, surely you'd never be able to catch the AI if they had 20% extra grip as V8Factor has - 20% is a lot! Most racing drivers would love even 2% in real life!
Exactly, you are now understanding the AI grip multiplier and its effects correctly.

How does rFactor simulate tyre degradation over a race?
That's not something I've explored. It's likely set by the mod maker. For the player, I think it's a combination of several factors including heat & air pressure in addition to how much sliding is done and the AI likely has a simplified model. NAGT has one of the most extreme models if you want to explore the TBC file further and compare it to, say, Niels & Some1's Corvette C6 mod which models a relatively long-wearing street tire. [Personally I have some quibbles with the NAGT tire model's wear rate since even if you nurse the tires they'll still catastrophically fail in 90 minutes, but I understand from a game dynamics point-of-view why they did it. My choice would have been for the tires' grip to fall off dramatically in the timeframe they were aiming for, but maybe that's not possible to model properly.]

Is this separate to the slowest laptime variable (presumably this is about a reduction in driver ability)?
Yes. It's worthy to note that most tracks have the slowest lap times multiplier incorrectly set at 0.8000, which means the AI's slow laps are only 80% of what the slow laps should be based on the driver's talent file! This seems to be a mistake copied from the ISI tracks; presumably someone thought the multipliers meant "what percentage of the average lap time should the slow lap be" instead of "if a lap is classified as slow, how slow should it be compared to this driver's calculated slow lap" and since the majority of races are against other people, it's pretty much been left in place.

ps - does rFactor simulate slipsteaming / drafting?
Yes. But now you're straying pretty far from track design :)
 
AI uses their default setup (configured by the mod maker) unless you create one for them that is track-specific. The setup file then needs to be placed somewhere for them to find it. Here's the best description I could find in a quick Google (sure wish the old rsc forum were still around):

"First, I've changed the 2 lines in my PLR file that are related to "Fixed Setups" and "Fixed AI Setups" to value "1'. So it means that when I have a setup, and I've assigned it to be my favorite setup, AI is supposed to look for it and use it."

 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 88 12.8%
  • < 2 years

    Votes: 63 9.1%
  • < 3 years

    Votes: 71 10.3%
  • < 4 years

    Votes: 44 6.4%
  • < 5 years

    Votes: 95 13.8%
  • < 10 years

    Votes: 93 13.5%
  • < 15 years

    Votes: 60 8.7%
  • < 20 years

    Votes: 38 5.5%
  • < 25 years

    Votes: 33 4.8%
  • Ok, I am a dinosaur

    Votes: 105 15.2%
Back
Top