Training the adaptive AI

Lars Hansen

Buggered if I know.....
We all know that racing fellow humans is more fun, but sometimes there aren't any around when you feel like racing.
Which is why sims come with an AI.
The R3E AI has a rather bad reputation, which in my opinion is ill-deserved.
It works just fine, assuming you treat it right.

First off, forget about the percentage settings.
Nobody is equally adept at all car/track combinations, so you can't use one setting for all of them.
You could in theory write down the settings for each combo, but.......
So use the adaptive AI.

As you may have surmised, the adaptive AI adapts to your skill-level.
But it needs a baseline in order to work properly.
Here's what you do:

Step 1: Start a race with the desired combo, and run qualifying. The AI skill varies with the combos, and we need to find out whether you're faster or slower than the AI baseline.

Step 2: Quit out, and start a series of 10 minute races without qualifying. If you were faster than the AI, start at the front. If you were slower than the AI, start at the back.
The idea here is to be able to run consistent laps without interference from the AI.


EDIT: Scratch the above. I'll rewrite it once I figure out the best way to train it.

How many races you need to run in Step 2 is actually up to you.
The more consistent your lap-times are, the faster the AI will find your pace, and adapt to it.
For me it usually takes 2-3 races, and then I can get a good fight out of the AI.

Couple of things to note.
It's still an AI, and it's not perfect. Like most other AIs (and most sim-racers btw) it doesn't do particularly well in a crowd, so you need to be a little careful on the first lap.The further back you start the worse it is.

The adaptive AI constantly adapts. Which is good, because as you gain experience and improve your lap-times the AI will follow suit.
But if you've been down at the local for a few pints and a bit of a sing, and then run a race with adaptive AI, not only will you not be able to catch it, the next sober race will be ridiculously easy because it has adapted to your now slower lap-times. :D

But to show-case what it can do, here's a short 10 minute race for illustration purposes.
I've done 3 races before this one to get the AI to adapt to my pace, and put myself in 6th position.
Look out for:
1. The AI is not robotic, it makes mistakes. Observe the blue/red car in 4th position, and watch it fishtail as he locks the brakes.
2. The AI doesn't give up after being passed. Near the end I screw up, the AI takes advantage and I lose P2.
3. The only time there is contact (when I move to P2) it is my own fault. Not once do I get dive-bombed or rammed in to.

So if you're willing to do a little 'homework' to get the AI to adapt, R3E can certainly provide single-player entertainment.
EDIT: Fine-tuned the OBS settings.
Much improved video-quality.
Driving still sucks though. :D
 
Last edited:
A few final observations on the AI system, and after this I'm going to leave it alone and spend my time doing....you know, actual racing. :D

First a bit of good news; once you've got a tightly grouped AI index, the adaptation works beautifully.
I set up FRJ @ Nürburgring, and made an index running through 107 - 112, which I knew was a little too high for me.
Then I did a 30 min race (and had my ass handed to me) and afterwards the index ran 106 - 111.
So once you have a good index, it'll slowly adjust up and down based on your current level.
Although this obviously also means that you have to be fairly precise when setting the initial level.

The longer race showed something else. The integer attached to each AI level isn't as simple as the number of laps it used that particular level. Adding them together after the FRJ race, I still only had 7 in total.
It is however some kind of weighting of each level, and in some way controls whether the AI should adjust up or down.
After the FRJ race I had a 2 in level 107, and a 1 in everything else. And then it shifted the levels down.
So the assumption on my part is:
The AI, during the race, compares your lap-times to each level in its index, and then assigns a value to each level.
If there's a high value in either of the two lower AI levels, it shifts down a notch for the next race. Vice-versa for the two top levels.

Then there are the lap-times themselves. They are most definitely used in some way by the AI, I'm just not entirely sure how.
My initial idea was that if it compares its lap-times to yours, then the important thing would be for the lap-times to be fairly equal, but whether they are slow or fast shouldn't make a difference.
Hmmmm.....
So I thought, if that's true, then you should be able to use the indexes of one car/class combo in another car/class combo.
Or in other words, I should be able to copy over my FRJ/Nürburgring index over to NSU/Brands Hacth.
Obviously the lap-times will differ wildly, but if the AI thinks that both myself and the AI are running at the same speeds, then it should simply use the AI levels in the index, right?
Well....no. ;)
What I got was an AI that looked like it started from scratch (i.e. 80%). So the lap-times are used for something.
Not entirely sure what or how, but you can't do without them.
I even tried deleting the lap-times themselves, and just leave the AI levels for each index.
Same result. :rolleyes:
You can however, copy over your index from GTR3s to the ADACs, and that'll work beautifully.
So in theory, you should be able to copy over an index if the lap-times are fairly equal.
Maybe something like DTM'92s to Touring Classics.
And (again, in theory) it should be possible to manually insert both lap-times and AI levels assuming you have a rough idea of each. But I would be very careful with using that technique.
 
STOP THE PRESS!
(I always wanted to say that.)
My initial post was correct, you can train the AI in 6 laps.

Gawd.....
Okay, it's official. I really AM a f*cking moron.
Cletus the Slack-jawed Yokel, that's me. :D

You can get by with doing 6 laps, not 12.
The thing that threw me was that earlier I had been using the adaptive AI to get my initial settings.
And the adaptive AI needs two laps, so it has something to compare to, and thus figure out if it should speed up or down.
Which means it'll take two laps before it'll write a new index.
However, being a little slow on the uptake, I failed to consider that we're doing the initial races with FIXED AI levels.
And since fixed AI doesn't need to adapt (well, duh) it only needs one lap to write an index. *facepalm*

So, the technique is the same as before.
Find your AI level for the car/track combo.
Then do one lap with fixed AI, rolling start, no qualifying, and one opponent at that level and one more each at level -2, -1, +1, +2, +3.
Your lap-times don't matter*, but it is important that both you and the AI cross the finish-line.
And that's it, six laps and you're done.
So even something like the Nords should only take you about an hour.

Proof of concept:
Training Aquilas at Monza Jr in 11 minutes.

*Probably don't matter. Maybe. I think. well.....
But just in case, don't slack off too much.
 
But just for you:
Raceroom raceway
Grand Prix: 263
Bridge: 266
Classic: 264
Classic Sprint: 265
National: 267

Monza
Grand Prix: 1674
Junior: 1672

Mid Ohio:
Full: 1674
Chicane: 1676
Short: 1675

Zandvoort
Grand Prix: 1678
National: 1680
Club: 1679

Lakeview Hillclimb
Full Run: 1682
Reverse: 2181

Zolder
Grand Prix: 1684

Nürburgring
Grand Prix: 1691
Short: 2011
Sprint: 3377

Hockenheim
Grand Prix: 1693
National: 1763
Short: 1764

Raceroom Hillclimb
Full Run: 1705
Reverse: 2214

Portimao
Grand Prix: 1778
National: 1783
Club: 1784
Club Chicane: 1785

Suzuka
Grand Prix: 1841
East Course: 2012
West Course: 2013

Bathurst: 1846

Indianapolis
Grand Prix: 1852
Moto: 2014

Sonoma Raceway
WTCC: 1854
Sprint: 2016
Long: 3912
IRL: 3913

Mazda Laguna Seca: 1856

Hungaroring: 1866

Salzburgring: 2026

Shanghai
Grand Prix: 2027
Intermediate (WTCC): 4041
West Long: 4042

Slovakia Ring: 2064

Macau: 2123

Motorsport Arena Oschersleben: 2384

Eurospeedway Lausitz
Grand Prix: 2468
Automobilsport: 3291

Moscow Raceway
Sprint: 2473
Full: 3383
FIM: 3683

Norisring: 2518

Brands Hatch: 2520

Red Bull Ring Speilberg: 2556

Paul Ricard
Solution 3C: 2867
Solution 1A: 4246
Solution 1C-V2: 4247
Solution 2A Short: 4248

Sachsenring: 3538

Spa-Francorchamps
Grand Prix: 3870
Classic: 4542
Combined: 4543

Chang International Circuit
Full Curcuit: 4253
D Curcuit: 4252

Nordschleife
Nordschleife: ???
VLN: ???
Tourist: ???
24 Hours: ???
 
The 6 training laps are to be done without qualifying.
Well, you can qualify if you want, but it won't change anything so it's a waste of time.
After that, the AI is fully trained. Whether you want qualifying or not is entirely up to you.
Won't change a thing.
 
Thanks Lars for your trick ... it's working fine :thumbsup:... when you have time. :laugh:

When you don't know your own laptime ... driving to get it ... then try with AI to know at which difficulty you're 3d or 4th on grid.
Then drive 6 times 2 laps with each 6 levels as described.

Once done ... and it can take much more than half an hour ( including game load times )... sure you'll let the AI sleep a bit till the next day.
And the big problem is .... it has to be done for each car on each track.

A bit a pity that the Adaptive AI cannot consider this calculated level as a good average for most cars and tracks. ( and of course adapt itself afterwards according to your own best driven cars and less quick driven cars.)
Sure it isn't ?

Time is not always on our side. ;)

NB: finally always better online when it can be of course, but not always easy for everyone ( Internet connection or time of day ).
 
Last edited:
Something I did was.......

Once you train your AI, if you have a bad race and AI slows down........
Start a new short race, run a few fast consistent laps, then exit. race. Next time, AI will be faster again. Make sure to start on pole, so AI doesn't impede you.

Or you could Initially train them that way too. Drive your laps, but if AI crashes you, exit immediately. Restart race......do again. This way, you don't have to actually drive the entire races.
------------------------
 
impressive thread, lars. for me it means: throw out the adaptive ai. i play raceroom on evenings where i do not find time for more than maybe 25 minutes of playing, with more time available i do iRacing. training them for each track/class combo would mean i'd never get past the training, lol. so, i will just take a car track combo i know a little and run small 3 lap races at levels 90% 95% 100% etc., see which race was the closest and then use that number for eternity. i've been playing sim racing games for more than 10 years, so my level should be quite consistent (slow). thx for all your work, saved me a lot of hassle :)
 
impressive thread, lars. for me it means: throw out the adaptive ai. i play raceroom on evenings where i do not find time for more than maybe 25 minutes of playing, with more time available i do iRacing. training them for each track/class combo would mean i'd never get past the training, lol. so, i will just take a car track combo i know a little and run small 3 lap races at levels 90% 95% 100% etc., see which race was the closest and then use that number for eternity. i've been playing sim racing games for more than 10 years, so my level should be quite consistent (slow). thx for all your work, saved me a lot of hassle :)
You're welcome. :)
And if you're only using the AI for the odd short race here and there, you're not really in the target demographic for this sort of thing, I quite agree.
For me it's the other way around. I find that doing a race in iRacing takes a lot more time.
There are too many car/track combos that I'm unfamiliar with, so a lot of practice is necessary if I want to make a decent performance.
And since the default set-ups (IMO) are useless, that means even more work in MoTec.
In R3E I can just jump in and whack away. Doesn't matter if I make a complete arse of myself (which is usually pretty likely).
For me, the main advantage to adaptive AI is in the championships. My skill-level varies quite a bit from track to track, so I can't use a set AI level for a championship. But if I have the AI trained for all the tracks in question, I can use adaptive and I'll get a decent race in all of them.
 
NOTE!
After the November patch, nothing in this thread has the slightest relevance any more.
WITH THE NEW PATCH THE TRAINING-METHOD WILL NOT WORK AS IT IS DESCRIBED ABOVE.

I'll try to see if I can figure out an updated version in the near future.
Good news for those who already have the AI trained is that you can continue using the same file with no problems.
With one possible exception, the Audi TTs may need some more adapting since the physics have changed.
 
I dun care, all I know is after 20 laps of practicing with the ai, the ai has trained up just as much if not more...makes me happy in single player ai races :), RRE = BEST Experience + worst pay system EVER
it's the pay system in this game that stops it becoming one of the most accessible, if not enjoyable racing games on the PC at this time, and yes, I have AC, ams, PCars etc, only sector3 or the sponsors hold this game back by it's archaic and frankly mind boggling payment system.
 
Last edited:

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top