The Big Problem With A.I. In Changing Weather Conditions & Possible Solution

Small rain race.jpg
Many modern simulators now impressive weather and environment simulation systems, everything from sunny days with hot tracks to storm clouds and wet tracks with real time drainage, fog, drying lines, changing track temperatures and even seasonal foliage!

There are even sims now that have real-time weather so you can experience the actual weather in that location on the day you decide to race there, it really is quite amazing!

You can choose to race in the dry, race in the wet, or even have a race where the weather changes several times throughout your session, so you may experience all types of weather during the course of a race, this is great for long endurance races.

Having these changing conditions adds a whole new element to the experience, allowing you to plan your strategy, think about tires, wear, pitstops and adapting you're driving style to each different situation.
Feeling the difference between a very cold track and a hot track, gauging how long a change in weather might last and if it's worth staying out on slicks if it starts to rain, but may not last long.
There are even sims where you have to change your driving line as the rubbered in parts of the track go from grippy to slippery as the weather changes from dry to wet!

To be honest It really is quite astonishing to see how far the software has come over the years, and even older titles that do not yet have these capabilities are developing them for the future, for instance iracing announced last year that rain will be coming to the popular simulator at some point.

I love to jump into a server which has a varying weather forecast and seeing who turns into Ayrton Senna in the rain and who can't stand it (Like Ann Peebles).
It brings such an atmosphere to the race, just watching the transitions (especially with accelerated day to night transitions) can be spectacular by itself!
I remember doing a few one hour races with a full accelerated 24hr cycle and changing conditions in VR with my friend Pete, we were both just blown away by the experience!

The amount of time and work the developers must put into these amazing features must be absolutely mind boggling!
Just the artwork alone for the changing textures, seasonal foliage, rain, cloud and sky animations must be a monster task!


With some sims having real light sources and sun rays that beat down on certain parts of the track warming it up, where other parts are in the shade, are cooler and take longer to dry out after a shower. Even large tracks like the Nordschleife where it might be raining on one part of it but not the other, the level of variation is simply amazing!..........

But what if all these amazing features and hard work by the devs are rendered completely redundant and useless for anything other than hotlapping because of one major problem???

What if you can't race online due to an unsuitable internet connection or being just too far away from the servers you'd like to race on? What if you work unsociable hours and by the time you do get online there's hardly anyone around to race with, or you simply just prefer to race offline?

Have you ever bought a sim based on the fact that it has all these great weather capabilities? You're really excited for an amazing race with changing conditions and pitstops, so you've set yourself up a two hour endurance race. You've chosen your track and car combo, you've put in many practice laps getting to know the circuit, spent time tuning your car, planning your pit strategy and you are absolutely raring to go!

You put in the first hour of hard racing, you're doing pretty well and holding position, there's been some amazing moments already and you're feeling totally immersed in the competition!
As it gets to the end of the hour it starts to rain so you all pit for wet tires, you pull out of the pits and the track is now soaking wet but you are prepared and ready to concentrate!

Then all of a sudden, the car infront that you've been having a fantastic battle with all the way through is a bit slow through the first corner and you pass it with ease, you're feeling pretty pleased with yourself but now you're thinking about the challenge now in your rear mirror, but it never comes! Infact, you pass the next car, then another, and another, has there been some sort of problem?

Three laps later and you've overtaken the whole field like they were on a pace lap, the cars have disappeared and you're on your own, you've even slowed right down and they're still not catching. You're dumbfounded, all the challenge has gone from this great race you were having, the feeling of utter immersion has gone and you feel totally deflated! What's just happened???

Well, simple... You've just experienced poorly calibrated A.I.

This is a major problem affecting many otherwise great sims! It may not even be that as soon as it starts to rain the A.I. suddenly act like they've lost 20HP, it could be that they become unrealistically fast in the rain and no matter how well you drive you just can't get anywhere near them and off they go into the distance.

The difference in the A.I.s ability in different conditions can be so large that you are forced to ditch all of these amazing weather features and stick to just racing in one condition, unless you have the time to trawl through servers looking for an online race with changing conditions against other players.
Maybe you're a very busy person and you don't have time for that and just wanted to set up a race and go in your two free precious hours, but now you realise all that money you spent on the sim and it's amazing features has gone to waste, all because of bad A.I. Such a shame!

So, what can you do to solve this?

Well, if your A.I. skill slider goes from say 50% to 120% and you are as fast as the A.I. in the dry at 100%, when you want a race in the wet but you know the A.I. are too slow or fast in the wet, you can then adjust the slider up or down by up to 20% either way to compensate, problem solved, but it's not ideal.
What if you are really fast and your slider is already at 120% in the dry but the A.I. are slow in the wet, there's no further you can turn it up to compensate for that. Not only that you can't change the slider value mid race for a session with changing conditions, so racing with varying conditions is completely out of the window anyway!

The problem is further compounded by different players abilities in the wet. You may be an absolute God in the wet, or you hardly race in the wet at all, so on the odd occasion you do fancy a race that changes from dry to wet it's not possible as you just can't keep up with the A.I. in the wet, even if the A.I. in that sim are pretty well calibrated.

Custom A.I. files

There are certain sims that offer custom A.I. files (like Automobilista 2). These are files within the games program folder that allow you to change certain values of individual A.I. driver's attributes, such as their ability in the rain, usually called something like "Wet Skill". These files can be opened and edited with Notepad.
In AMS2 this ranges from 0.0 to 1.0 and is good for fine tuning, for cars that are only slightly faster or slower in the wet this value is very good for fine tuning, however in cars with large differences between the conditions it is not enough.
There is information on how to do this here.

Rfactor 2 has something similar but its a lot more complex and involves MAS files, information on the process can be found here.

As already mentioned, this may not be useful if the range of changeable values is too small. Also, if you are not prepared to go digging around in program files this may not suit you, or you may simply not have the time as usually values would have to be changed for each individual A.I. driver.

It must be an absolute nightmare for developers to program how fast the A.I. are in different conditions in the first place, let alone taking into account the problem of a players individual skill level mentioned above, they of course have no idea what your individual skill in the wet is!
One might suppose all they can go on is the cars level of capability in either condition, but with many sims using A.I. that don't use the same physics as the players car this again must make things rather difficult.

Even with great calibration, because of varying abilities between players in such conditions, one player may still find the A.I. are a bit out of whack with them when it rains where as another might find them fine, so how do the developers please everyone?

How about this.... Let the player decide!
In the video below there is an idea for a possible solution to this problem, the video is fully time stamped so you don't have to watch the whole thing, you can go straight to the idea by clicking on the timestamp titled:

"Idea for possible solution to the big problem!"

This section is only a couple of minutes long and should not take up much of your time (but hey, if you've managed to make it this far through the article, I guess times not too much of an issue!).
There are other points in the video however that you may find useful, such as why I personally find that Assetto Corsa Competizione (you may of course disagree) has the best A.I. calibration between conditions, out of all of the examples used
Also, there are two examples of how big the difference between dry and wet can be in the same sim, using exactly the same skill level.

I would love to hear your thoughts on the idea as Sim racers. Maybe you know something about A.I. programming and could expand on whether it's a feasible idea or not. Maybe you even have a better idea?
Also, which sim (or car class within a sim) do you find suits you best when it comes to racing against the A.I. in the wet and changing conditions?

Any discussion is good as at the end of the day, a problem solved is beneficial to all of us!

About author
Tarmac Terrorist
If I can drive it, I'm Rocking it!!! Besides writing sim racing articles I am running my own YouTube channel called Tarmac Terrorist

Comments

The problem with AI is.......it's all rubbish. ACC makes a fair stab at providing believable and competent computer opponents but most everything else is just dire.
 
I don't think it's about the skill slider per se. Its mostly that people run AI that enough so they can always be pole/podium and get easy wins. Thus they never really learn how to race during changing weather or/and rain, etc. Cause they never have to because they always win. If people tend to pick an AI-skilllevel around midpack then they actually have to learn how a car drives when the weather changes and learn how to adapt or even how to tune, thus they can battle better against the AI and see if they can go midpack or even beyond midpack.
This claim is presented without evidence and is probably false. I have not heard anyone who races offline vs. the AI set it so that you lead from start to finish. What would be the point of that? It's extremely boring. What people don't want is AI that rockets off into the distance in the wet because they have magical extra grip.

An optimal AI race is very difficult to achieve in modern smorgasboard sims because they don't have the ability to calibrate every single car-track combination, let alone in variable weather. It was easier in old-school sims because they typically had one car with one physics model, a handful of tracks, and AI that ran on completely fake/no physics. Plus the "wet weather" simulation in old sims is laughable compared to what we have today, it was just dry driving with 80% grip. Nostalgia has clouded our views and we don't realise how difficult the problem actually is.
 
Training the AI is for sure the best way to go but it's a lot of investment. Gran Turismo pretends to train an AI, great, but that's a big company there. I' more convinced by the opportunity of getting a license from developpers of AI used in real race cars, adapted to the sims. I may be wrong, it could.be the contrary.

But in all cases, training an AI means the AI is racing with exactly the same physics as the player does. Which, if I'm not wrong, only ACC has achieved. So it won't happen in our current other sims, which have been in developpment for years.

The traditionnal racing line preset in a file, which was the way to make the old sims so convincing, is probably still the best way to go at the moment, with a % applied to different weather conditions. The racing line will be wrong (as in ACC it seems) but the difficulty in the continuity of the dry conditions.
The issue is firstly knowing what is the right lap time for each car on each track. You have to collect these data for all combinations (an impossible job for AMS2 for example) or recruiting some solid and consistent drivers (not aliens), who make the same lap times than those IRL, and use them on all combinations to get the lap times of reference.

There may be other factors that make this process harder than it seems. But trained AI is not for today, maybe for the next sims generation... in 5 or 10 years? While waiting for that, I'm ok with the slider :D

Edit : I forgot to mention one interesting feature, Raceroom adaptative AI. For sure it may sounds strange because you do not know if your performance is realistic (but, at the end, nobody knows on most combinations), but if you're quiet consistant and competitive on most tracks, it's ok. I don't know how the game does that (maybe by adjusting each of its lap after calculating the medium of the 3 lap times of the player? Or just the last one? Which isn't relevant if the player is consistant) but is really interesting and less frustrating. I wonder how it could be adapted to changing conditions. Not a lot of complains about Raceroom AI in general, whatever the combination. That's time for the rain! ;)
 
Last edited:
This claim is presented without evidence and is probably false. I have not heard anyone who races offline vs. the AI set it so that you lead from start to finish. What would be the point of that? It's extremely boring. What people don't want is AI that rockets off into the distance in the wet because they have magical extra grip.

An optimal AI race is very difficult to achieve in modern smorgasboard sims because they don't have the ability to calibrate every single car-track combination, let alone in variable weather. It was easier in old-school sims because they typically had one car with one physics model, a handful of tracks, and AI that ran on completely fake/no physics. Plus the "wet weather" simulation in old sims is laughable compared to what we have today, it was just dry driving with 80% grip. Nostalgia has clouded our views and we don't realise how difficult the problem actually is.
You mean, it was driving with minus 80% grip, right? :) before GTR2, even on dry the grip was ridiculous in most of sims.
 
You mean, it was driving with minus 80% grip, right? :) before GTR2, even on dry the grip was ridiculous in most of sims.
Well, the friction coefficient of rubber on wet asphalt is 73% of the dry value, and on ice it's 20% of the dry value. I don't think even GPL v1.0 was quite that bad.
 
Both GP3 and GP4 worked well. 20 years later everything about sim racing has got massively better, yet AI has stagnated. Imagine if AI had of improved at the same rate as graphics, sound, physics and FFB.

I always laugh when I see hype about self driving cars being allowed on the roads. We can't even get Ai controlled cars in sims to act sensibly. God help us all.
 
Both GP3 and GP4 worked well. 20 years later everything about sim racing has got massively better, yet AI has stagnated. Imagine if AI had of improved at the same rate as graphics, sound, physics and FFB.

I always laugh when I see hype about self driving cars being allowed on the roads. We can't even get Ai controlled cars in sims to act sensibly. God help us all.
Just been reading through the comments and there are some really interesting points being made, i've been totally engrossed reading them today, but I gotta say, this one really did make me laugh! Self driving cars, God help us all..:laugh: Brilliant! Cheers!
 
D
  • Deleted member 217114

This claim is presented without evidence and is probably false. I have not heard anyone who races offline vs. the AI set it so that you lead from start to finish. What would be the point of that? It's extremely boring. What people don't want is AI that rockets off into the distance in the wet because they have magical extra grip.

An optimal AI race is very difficult to achieve in modern smorgasboard sims because they don't have the ability to calibrate every single car-track combination, let alone in variable weather. It was easier in old-school sims because they typically had one car with one physics model, a handful of tracks, and AI that ran on completely fake/no physics. Plus the "wet weather" simulation in old sims is laughable compared to what we have today, it was just dry driving with 80% grip. Nostalgia has clouded our views and we don't realise how difficult the problem actually is.
This is not false. I know people doing it because they asking for a rewardscreen/video, etc when they won something. Also most people in racingsims want instant satisfaction, see online for example. So in offline its usually 3 / 6 laps races against the AI. With the AI set so the player races them at pole / podium then in the end of the race of the season they need that dopamine-shot when the rewardscreen/podium/etc show up. Ofcourse it's not all people, and they are people who race any pack in all kind of conditions to build up their skill, knowledge, racing, and then slowly but sure the experience of that lets them built up their skill and thus the AI-setting.

I know it's hard to set every AI for every track and every conditions, but there are ways to sort of achieve that. Is it perfect no, but it works. The only good AI that impressed me as the AI of F.E.A.R and that's from 2005.
 
This is not false. I know people doing it because they asking for a rewardscreen/video, etc when they won something. Also most people in racingsims want instant satisfaction, see online for example.
First, asking for a screen reflecting that something just happened in a video game, or possibly indicating progression, is not necessarily for "instant gratification". Second, "most" people wanting a "dopamine shot" from winning dominantly against AI in racing sims? This seems preposterous to me :confused: I can't speak for others, but this is not how I race against AI.

So in offline its usually 3 / 6 laps races against the AI.
Don't forget that one reason for this is that modern sims have struggled mightily with anything involving pit strategy. So there's, in many cases, no ability to do anything convincing beyond a sprint race, even if you wanted to.

it's not all people, and they are people who race any pack in all kind of conditions to build up their skill, knowledge, racing, and then slowly but sure the experience of that lets them built up their skill and thus the AI-setting.
I bet this is closer to the truth than your first statement. Especially in sim racing titles amongst people on a site like RaceDepartment. What you say is IMO precisely the beauty of AI racing.

The only good AI that impressed me as the AI of F.E.A.R and that's from 2005.
I'm curious - why is this? Would it have any bearing on Tarmac Terrorist's article about rain, AI, and racing sims?
 
It was easier in old-school sims because they typically had one car with one physics model, a handful of tracks, and AI that ran on completely fake/no physics.
Yes, absolutely. :)

Just to be devil's advocate... what if the old school games had it right? For AI racing, at least? A single series of cars running on a similar physics model optimized for that style of car, a season or two worth of tracks, and AI with lots of pre-programmed detailed behaviours running either with (a) simplified but well-calibrated physics that yield real-enough-looking racing or (b) player physics but a deterministic, computationally lightweight driving and pathfinding algorithm (allowed by the physics model)? Hmm. Maybe this would work surprisingly well, even nowadays.

Also... the one car-one model comment is aimed at Papyrus (e.g. ICR2, NR2003) and Microprose (GP3, GP4) sims, I believe, yes? Because it's certainly not true in GTR2, for example. Whereas the fake AI physics is a reference (in particular) to isiMotor1 and 2 games like F1C and GTR2? Because to my understanding, Papyrus AI in NR2003 ran on player physics but were controlled by a quasi-deterministic algorithm drawing from recorded inputs in LP files.

Plus the "wet weather" simulation in old sims is laughable compared to what we have today, it was just dry driving with 80% grip. Nostalgia has clouded our views and we don't realise how difficult the problem actually is.
This got me thinking. What if we could have better simulation of racing, potentially at the cost of depth of physics simulation and driving realism? For example, if some well-calibrated hacky solutions for wet racing like 80% grip with some extra features (puddles, drying line, grippy marbles for slick tyres, rubber slipperiness) and an extra AI wet line can provide an experience for the end user similar enough to real life (even without super detailed 'simulation' of all the parts) does it matter?

As long as it doesn't yield super implausible car or AI behaviour, for a racing simulation (as opposed to a car or driving simulation) it wouldn't matter.
 
Last edited:
ACC AI actually is not well calibrated. They are quicker in the wet than they are in dry conditions. Before 1.8 it was well calibrated. After 1.8 wet physics were changed slightly but only for player I think. Biggest issue with ACC AI is that they are very slow in the dry as they do not use proper lines because for whatever reason they can't use kerbs.

Another issue with ACC AI is that they leave a lot of space when running side by side so they go really slow when running side by side. Also another issue with simulating all the physics for AI is that while this is cool, it doesn't always make the AI driving look natural(ACC AI brakes in the middle of the corner sometimes) and this is computationally expensive. I hope they fix these issues(especially the AI lines) but I am not too hopeful. Everybody these days cares mostly about online and say things like "just get gud and play online bro".
 
Last edited:
"You can argue through 1000 comments, to have an interesting AI, it will need computing power and where is the computing power these days, in the cloud.

Goodbye"

 
Last edited:
Also... the one car-one model comment is aimed at Papyrus (e.g. ICR2, NR2003) and Microprose (GP3, GP4) sims, I believe, yes? Because it's certainly not true in GTR2, for example. Whereas the fake AI physics is a reference (in particular) to isiMotor1 and 2 games like F1C and GTR2? Because to my understanding, Papyrus AI in NR2003 ran on player physics but were controlled by a quasi-deterministic algorithm drawing from recorded inputs in LP files.
The games you mention (let's say post-GPL) are actually where the AI started to get more advanced and started falling apart. Before that they were just dumb bots on rails that were hand calibrated to sort of have the same pace as the player and a hardcoded pit strategy. Anyone who has tried to race vs. the ICR2 AI knows you need to memorise their lines and braking points and then stay far away from them or get punted into a wall.

Most of those games didn't model wet weather back then, only GP3/4 which are so hard to get running these days that no one really plays them any more so we mostly have just nostalgic memories of how "good" the AI was (it was nothing special compared to modern games).

GTR2 had "wet weather" where the AI had extra grip compared with the player, but also had its share of AI problems in the dry. I distinctly remember running 1-hour races at Spa where the AI would steadfastly refuse to pit and just cruise around with worn tyres multiple seconds per lap off pace until you passed all of them.

NR2k3 may be celebrated today after 20 years of community AI tweaking, but it took Papyrus several iterations to get it to an even functional level. The previous iterations, NR4 and NR2k2, had terrible AI that would crash constantly with itself and made some tracks, like Bristol or Martinsville, utterly unplayable even after major patches.

Plus ça change, plus c'est la même chose.
 
Buuuut... aren't most simracers always playing in the summer, at 2pm, with clear blue sky (in a red car at Spa or Monza) ? This is the only scenario AI needs to be optimized for !
Who plays in the rain at night in Winter with fog and 200% damage in a 60's car ?
 
Last edited:
Anyone who has tried to race vs. the ICR2 AI knows you need to memorise their lines and braking points and then stay far away from them or get punted into a wall.
Oh my Lord, yes! :roflmao:

Most of those games didn't model wet weather back then, only GP3/4 which are so hard to get running these days that no one really plays them any more so we mostly have just nostalgic memories of how "good" the AI was (it was nothing special compared to modern games).
GP4 is easy to install nowadays (see here) but not straightforward to get modern controls mapped. I've been playing it with a gamepad recently (since it's not a sim by today's standards anymore, it's no big deal) and the AI has... um... quirks :p BUT is really impressive in a number of ways. Especially in how they defend positions. I'd suggest giving it a go, even with a gamepad, if you're at all curious how it stands up today.

GTR2 had "wet weather" where the AI had extra grip compared with the player, but also had its share of AI problems in the dry. I distinctly remember running 1-hour races at Spa where the AI would steadfastly refuse to pit and just cruise around with worn tyres multiple seconds per lap off pace until you passed all of them.
Interesting! Doesn't surprise me the GTR2 pit logic has its weaknesses. Even with vanilla content. But that's unfortunate to hear.

You know, thinking about how one might fix the issue you encountered suggests something that might help AI pit strategy (in the dry or wet). If the AI had lookup tables of lap times for new tyres, worn tyres, dry tyres on wet track, wet tyres on drying track, you could calculate the time loss from staying out versus pitting with reference to time/laps left in the race. Then AI would 'intelligently' select the option with minimal time loss. And you wouldn't get 'dumb' behaviour like you saw.

NR2k3 may be celebrated today after 20 years of community AI tweaking, but it took Papyrus several iterations to get it to an even functional level.
This is a great point, thanks for telling me. Wasn't around in sim racing back then, so I didn't know that about earlier Papy NASCAR iterations. Must say that even most vanilla NR2003 tracks and cars are impressively well-optimized by default, in my experience.
 
"You can argue through 1000 comments, to have an interesting AI, it will need computing power and where is the computing power these days, in the cloud.

Goodbye"
Have to say I can't disagree more, but you're entitled to your own opinion!

IMO the sorts of AI things we're mostly talking about are not demanding w.r.t. computing power - they're sets of heuristics, for example to switch to a 'wet line' or handle changing weather pit strategy. That takes developer ingenuity and imagination to design robust decision rules, but not computing power.
 
ACC AI actually is not well calibrated. They are quicker in the wet than they are in dry conditions. Before 1.8 it was well calibrated. After 1.8 wet physics were changed slightly but only for player I think. Biggest issue with ACC AI is that they are very slow in the dry as they do not use proper lines because for whatever reason they can't use kerbs.
I've been assuming I was just having skill issues in the wet :D so this is interesting to know. Yeah, I've noticed the occasionally suboptimal racing lines in the dry as well, but I'm still slow enough it hasn't bothered me a ton yet :p

Another issue with ACC AI is that they leave a lot of space when running side by side so they go really slow when running side by side.
Yes, absolutely. I also find that they are scared to run side-by-side with the player - they tend to just pull out and let you have the position, which is possibly realistic for the beginning/middle of an endurance race, but not otherwise IMO.

I hope they fix these issues(especially the AI lines) but I am not too hopeful. Everybody these days cares mostly about online and say things like "just get gud and play online bro".
I hope so as well! :)
 
Last edited:
I know it's hard to set every AI for every track and every conditions, but there are ways to sort of achieve that. Is it perfect no, but it works. The only good AI that impressed me as the AI of F.E.A.R and that's from 2005.
And, if you do some research, you'll realise that this impressive AI is not complex at all. It is a simple AI used in a really clever level design which made it impressive. Yes it is still great nowadays but level design in FPS has been an issue for many years.

I wouldn't compare FPS AI and racing AI though. While the quality of the FPS AI is a combination of scripted AI, level design and gameplay, in racing there's no choice, the AI has to race and react to particular situations in a realistic way, all the possible situations must be taken in account. In a good FPS, AI has to react only to situations the game design chosed to represent, which is a lot easier (and which explains sometimes in a FPS, a uncommon situation breaks the AI ; if it happens a 5 or 10 times in a whole game, considering you shoot thousands of enemies, it's not a big deal, but in a simracing game, it's a deal breaker, it either ruins the immersion or ruins your race).
 
Last edited:

Latest News

Article information

Author
Paul McCaffrey
Article read time
7 min read
Views
18,006
Comments
55
Last update

Shifting method

  • I use whatever the car has in real life*

  • I always use paddleshift

  • I always use sequential

  • I always use H-shifter

  • Something else, please explain


Results are only viewable after voting.
Back
Top