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

This is not the ideal solution, obviously, but I actually really like the challenge that the decoupled weather physics and visuals provide in AC (w/ CSP).

I don't think there's any game where the AI has ever dealt well with changeable conditions, so this option to have the visuals (with all the spray and impairment) but without the physics changes affecting the AI is something I wouldn't mind seeing in other games.

Before people say "that's a horrible idea" - I mean, this is mostly why I don't bother with changeable conditions in so many of the games that have them, so just looking for the 'silver lining' here!
 
The solution for a perfectly balanced AI is fixed races scripted by the developer with 3/4 established difficulties . It allows the developer to adjust perfectly. Perfect for a career mod. Otherwise it's impossible or a huge waste of time to edit AI files.
 
:roflmao::roflmao:
Even more strange is that two simulators that are going to be 20 years old have excellent dry handling characteristics...and in the rain...they are even better than you doing your best...
maybe the only problem is the pit stop strategy (when and how)... but when the ai stops and changes to rain tires (or intermediate, rain, full wet) they are by far better than you driving.

I forgot to mention that these old simulators manage to draw a real "Dry Line", where the car can have better performance...and as the track dries, the dry line gets bigger. (20 years ago)

Also, recently modern sims have pit crew animation. and that modern sims are "lonely hotlap" for different uses (they feel weird for the ai and with races)..., and without full licenses (the ONLY exception is ACC)
(separate graphics)

tribute to F1 Challenge 99-02


(he's glad he made a whole package of graphical "improvements" for the default game...there's a similar one on the game's discord)
 
Last edited:
unfortunately what most racers seem to ignore about the Sim is that it is supposed to be a simulation of real life, which means the driver of the car has a pit crew to look after all that stuff. once they've got that bit sorted out properly I'll go woohoo over weather changes too.
 
:roflmao::roflmao:
Even more strange is that two simulators that are going to be 20 years old have excellent dry handling characteristics...and in the rain...they are even better than you doing your best...
maybe the only problem is the pit stop strategy (when and how)... but when the ai stops and changes to rain tires (or intermediate, rain, full wet) they are by far better than you driving.

I forgot to mention that these old simulators manage to draw a real "Dry Line", where the car can have better performance...and as the track dries, the dry line gets bigger. (20 years ago)

Also, recently modern sims have pit crew animation. and that modern sims are "lonely hotlap" for different uses (they feel weird for the ai and with races)..., and without full licenses (the ONLY exception is ACC)
(separate graphics)

tribute to F1 Challenge 99-02


(he's glad he made a whole package of graphical "improvements" for the default game...there's a similar one on the game's discord)
Absolutely agree. I used to race "realistically" with random conditions in F1C and even more in GTR1 & GTR2 (with the changing weather patch). And it worked fine.

What I liked in GTR2 was that a 100% AI qualified and raced on real times (there was an amazing website with all the data from championships from all over the world) on the dey and on the wet. So you knew if you were competitive on the dry and too slow on the wet that the problem was your skill.

I don't know how simbin achieved that but it was and still is near perfect (although now the changing weather doesn't work anymore and you have to create a weather file before racing). The only issue is that if the rain lasts 2 laps, all AI will pit before and after (and as a player ypu can race these 2 laps on non rain tires).

Once you had found the right level of AI in F1 Challenge (as with GTR2, I used to search for the real times to set the AI level), in the wet it was the good level on the dry and on the wet.

I assume it was the same in the Grand Prix games, as I have never heard anything about an issue with the AI in the wet.

Same with simbin race series...

I remember not having this issue in rfactor2 with the enduracers mod. This was before the AI was unfortunately broken, I don't now how it is now.

I wonder how all these titles can do something that most modern sims can't. During years, night & day cycle and rain were dropped because only a minority of players used these features (which must be really hard and expansive to achieve). As simracing became a thing, they came back, rfactor2 first, pcars absolutely promising. I must admit I like driving in wet conditions in pcars1 and 2 but the racing wasn't that great because of this AI issue between dry and wet (and the puddles in pcars2 which does not affect the AI ; even if you can race on the same pace you can't keep with them as you suffer.from.the huge puddles).

I think the idea of a secondary slider is interesting but it seems to me like a hack. I want the AI with the same skill on dry and on wet surfaces like in the old titles. This slider seems to be what should be coded in the fame by the developpers. I mean, if your AI at 100% drives realistic times on dry tarmac, you may be able to, at least, simplify the thing on the wet by cutting by 10-15-20% the performance, with different levels of rain. Even with driving lines not suited for the wet (another issue with sims, even the player uses the regular dry driving line on the wet, another problem), it can do the trick.
Then you're not able to do that because the AI performance is inconsistant between tracks, which in fact is the first issue, before the wet.

I haven't been simracing a lot for quiet some time, and I haven't been able to race a lot on ACC (GT3 aren't my thing but the game is amazing), so I may be wrong, but it seemed to me that this sim had a good pace on dry and wet, I was competing at the same level in both situations. The thing is that you can easily compare lap times between the game and the real drivers to check, which is also the advantage of a one series sim, the developpers have a real reference for each track.

What is still interesting is that in GTR2, as soon as the racing line was quiet well implemented in the track, the cars were doing real lap times, whatever the track was (I've checked so many tracks thanks to that webste I can't remember the name). So with this AIW file for each track, the lap times of the cars were consistant (and the AI on the wet was not an issue). On that aspect I don't know whether it was their respective communities or just GTR2 and the race series, but rfactor1 and F1C were quiet inconsistant on different modded tracks. That's why GTR2 was my sim for the mods (well, some mods in F1C provided the tracks and the cars, which provided much more constancy).

Anyway, there is still a lot of work to do with modern games, they are not as competent as really old games, there must be an explanation but it makes indeed some features unuseful. And, it's been around 3 years I almost haven't been racing online and when I did, setting a wet race, on public sessions, was unsuccesful, most players did not want rain. So if the rain experience offline is bad, the feature really is a loss of an amazing work.

I vote ok for the secondary wet slider, although I think it is not the way to go, just as a temporary solution.

And I vote for a Race On reinstallment for a better experience ;)
 
Last edited:
You know those stories about AI that beat games like Chess or Pong by repeatedly forcing them to play games until they're smart enough beat the best humans?

That's the answer to appropriate laptimes in the dry and wet - or any driving conditions for that matter, including temperatures, wind speeds, you name it.

And sims already do this to a degree. They train AI on tracks. Make them run lap after lap. That's how we get AI lines.

But it's not good enough. It's not enough laps. It's not enough AI line options for AI to pick from while driving. It's not enough weather condition variability. Even the lower-frequency, lower-complexity AI tyre model comes into play in many games: Lower resolution AI data means less accurate AI choices and predictions in-game at the millisecond level.

You've got to crank up the complexity of the AI training model in order for the AI to have the information during a race to have appropriate race times.

But my suspicion is that with everybody thinking multiplayer and esports is the thing right now not enough resources are put into training AI and improving the training model, itself.

You get some games claiming they do like GT7 or GRID but they're not exactly hardcore sims so it matters a whole lot less in those races.

Watch what iRacing does for their AI when they introduce rain. That will show us best-in-breed, at least for its time.
 
Last edited:
GP4 has a myriad of editable 'magic data' that allows you to adjust AI speed independently in both wet and dry, AI default setups, crossover onto dry/wet tyres (how long they'll stay out before pitting), driver error frequency and consistency on a per driver basis.
As a nice bonus, they block and slipstream pass better than any other sim currently available (looking at you rF2)
 
D
  • Deleted member 217114

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. However, there are circumstances the AI and rain for example aren't properly configured into the tyredata, etc. To be concluded: People should drive more into non-clear weather to build up experience in such conditions.
 
I acknowledge the premises.

However, when reading text describing AI issues under changing weather, it strikes me retrospectively that I in the majority of really huge amount of offline events really haven't taken notice during decades as a primarily offline simmer with exact this starting point.

It might be due to my POV of simracing for many years have been immersion over competition. I.e. if the AI's drop pace from dry to wet, my spine tells me to hold back a bit on the throttle to have a real delightful time of immersion, trying to sense why AI's were a bit slower at some corners, just my imagination of invicible elements just adds to the total immersion to me.
And on the opposite, where AI's all of a suddwn gets some extra AI percentage, I just have had fun competition immersion by this.

But rightly, there are some circumstances of maybe less good AI modeling, where the AI's turn to impossible aliens in full wet.
But through my experience that's more the exceptions than the rule. Especially regarding GTR2 mods changing weather, hundreds of mods and even the original turned out to be quite credible.

On the contrary participating online events of mixed weather or just full wet I've experienced likewise flaws by human beings. In some occations clearly on the pit strategy to blame or wrong tyre decicions. Other events with dry race and consistent onliners followed by completely incondistency in the next full wet race.

But I accept the critics and good with focus on AI for the newer sims, opens for refimements;)
 
If are using AMS 2 as an example (the video attached to this article does), then first we should wait for the devs to make the AI at least minimally believable in the dry (not 1s faster than the player in one sector then 1s slower in the next) and also capable of doing basic strategies (not filling half of the tank in a long race and then doing twice as many pits stop than needed) before expecting that AI to make any sense driving in wet conditions and choosing the right type of tyres for each weather condition......

Big and full of hopes fan of REIZA/AMS here before anyone gets the wrong idea.
 
Last edited:
GP4 has a myriad of editable 'magic data' that allows you to adjust AI speed independently in both wet and dry, AI default setups, crossover onto dry/wet tyres (how long they'll stay out before pitting), driver error frequency and consistency on a per driver basis.
As a nice bonus, they block and slipstream pass better than any other sim currently available (looking at you rF2)
Funny, I was just playing GP4 today, and was thinking the exact same thing! :roflmao: The way AI defends a position is very impressive in GP4. As is (usually) their ability to know when to give up and fall behind the overtaking car. :)
 
Like others above, I'm unconvinced by the 'hack' secondary slider solution suggested by @Tarmac Terrorist - although it could be a good stopgap given the current state of things, I suppose - but I applaud Paul and others here for thinking open-mindedly and creatively about AI, while also recognizing where past sims (especially those from around 20 years ago, it seems, for whatever reason :confused:) did AI in a much more consistent, well-dialed-in, and feature-complete way than many sim racing games nowadays.

Some of today's games might possibly have a better door-to-door racing experience in the dry in a sprint race without pitstops required. Maybe. But games like F1C, GTR2, GP3, and GP4 shine once you remove those constraints - especially if you view them in the context of what was out there 20 years ago, but even to some extent they shine by modern standards in terms of AI and how they deal with weather :redface:.

My thinking is, in one way, much like @Tarmac Terrorist though. In my opinion, the next major 'frontier' that remains for improving simulation value in 'next gen' sim racing games is some combination of AI driving and pit strategy, various racing rules, race weekend formats, weather, and car wear/damage/mechanical sympathy. And rFactor/AMS-style contact-friendly netcode, for multiplayer racers. This requires talented and imaginative programmers in the mould of Geoff Crammond, instead of the physics text file tweakers, texture artists, and 3D modellers that seem to be more prevalent nowadays. IMO the last thing we need are yet more polygons, yet fancier lighting, or yet higher res textures.
 
Last edited:
I haven't been simracing a lot for quiet some time, and I haven't been able to race a lot on ACC (GT3 aren't my thing but the game is amazing), so I may be wrong, but it seemed to me that this sim had a good pace on dry and wet, I was competing at the same level in both situations. The thing is that you can easily compare lap times between the game and the real drivers to check, which is also the advantage of a one series sim, the developpers have a real reference for each track.
I have played a TON of ACC in the past week after getting it on sale, and can confirm the AI seem to do a pretty good job. Including in the somewhat wet to very, very wet. Most of the issues I've had were my own skill issues :roflmao:

I was particularly impressed with the gradual emergence of a dry line in ACC and how you (the player) can drive on still-wet parts of the track to cool your tyres. Aris from Kunos has said ACC also simulates the extra-slippery nature of rubber on a wet track (which is why you might want to pick a 'wet line' in low-medium wet conditions, before the rubber washes away) and being able to increase slick tyre grip on a wet surface by driving over marbles. The wet line and tyre cooling stuff I believe is also simulated in rF2 and Gran Turismo 7, which is great. BUT... in ACC (like in rF2 and GT7, I believe) the AI do not change their lines in the wet to account for these features... I get that'd be an enormous amount of work for little payoff, but that would be fantastically cool to see one day.

There is one annoying oversight in setting up a quick race (without a quali session) with random dynamic weather in ACC, though. The starting track surface must be set manually, even if weather is random. So you can have specified a dry track to begin with, but then the game gives you randomly generated wet conditions... in which case the AI start on dry tyres, because that's the optimal choice, then in the middle of the first lap the crossover point occurs and they all pit for wets. But as long as you run a quali or practice session, this issue doesn't occur, so that's good. :thumbsup:
 
If the AI is not representative of the car / track / driver / environment it is simulating that is a developer programming issue to resolve. A simulator shouldn't need sliders or other gimmicks as reality only runs at 100%. The simulator because of this is also simulating the players performance to that reality. If the players only objective is to win and not compare themselves to reality in a simulation they are only deluding themselves. Get an arcade racer. Developers of simulators or arcades racers should choose their sides and stop driving the road that delivers on neither.
 
The only thing needed is one talented and passionate individual who cares about about offline racing. Well, and company/investors to finance her/him :)

What we have is not what is possible. What we have is what brings the most profit. And that is not physically accurate racing with offline AI, it's what modern racing games are. Demand drives the offer.
 
Last edited:
What we have is what brings the most profit. And that is not physically accurate racing with offline AI, it's what modern racing games are. Demand drives the offer.
You're right, I think. Especially if you limit yourself to today's 'hardcore' sim racing niche (which has been trained, in a way, by recent sims that AI racing is not fun).

Here's the biggest thing that baffles me about that logic. Want to sell OODLES of copies of a PC and console racing title? Like today's Codemasters F1 games, or what Motorsport Games was hoping to do with various licenses, or past NASCAR titles like Dirt to Daytona or NASCAR Thunder? You'd best have a well-balanced, engaging single player AI racing experience! Because even today, that's a major part of what the larger audience of buyers (i.e. the 'mainstream' audience of 'casual' players) will be looking for. An engaging single player experience to fire up and have fun with, be it quick races or a championship or a career. But to get this cash cow, innovation (or just more effort, frankly) in racing AI and rulesets is essential, given the current state of things. Especially once you factor in weather changes and such.
 
Last edited:

Latest News

Article information

Author
Paul McCaffrey
Article read time
7 min read
Views
17,898
Comments
55
Last update
Back
Top