A Gateway to the Future: Neural AI in Simracing

DrivATARS™

Those are great, aren't they... huh? ...No? ...ANYone?? :unsure:

Hehe, they're certainly not good in recent outings that's for sure! I'd like to think the Drivatars in Forza 1 (2005) were a lot better because I was on the team that developed them but maybe my rose tints are too strong ;-) We split the problem into 3 at the time: 1) learning to control the car based on a full physics simulation 2) learning racing lines and 3) "race craft". It was the racecraft aspect we didn't crack at all and that was 100% programmed. That's still the biggest problem and I don't think we'll see any great strides there for a while TBH
 
Hehe, they're certainly not good in recent outings that's for sure! I'd like to think the Drivatars in Forza 1 (2005) were a lot better because I was on the team that developed them but maybe my rose tints are too strong ;-) We split the problem into 3 at the time: 1) learning to control the car based on a full physics simulation 2) learning racing lines and 3) "race craft". It was the racecraft aspect we didn't crack at all and that was 100% programmed. That's still the biggest problem and I don't think we'll see any great strides there for a while TBH

On point 3. The challenge there is invoking human decisions under stress into code. You would need a running reposiroty of numerous drivers over the course of a real race season. Examining their biometrics, their inputs, decision making, consequences and success ratios. You'd need to translate that data into a decision making engine and assign these persona's to "driveatars" so the human driver now if they're up against a Kimi or a Max when fighting in close quarters.

What AI lacks is the decision making engine of the human factor.
 
What AI lacks is the decision making engine of the human factor.

Exactly and as you suggest it's important to include human "frailty" (errors in decision making) and emotion into the input vector space too otherwise the AI becomes too perfect and zero fun to race against. In Forza we introduced a form of hysteresis into the problem in order to simulate varying skill levels. For example, if the left front tyre started to lose traction we could introduce a delay in resonse of several frames before the Drivatar attempted to correct. You end up with a very complex layered model ... which can then begin to affect performance, testing capabilities and... predictability. Most replays are simply "re-simulations" of the race using the driver's recorded inputs to "drive" the replay.... so everything must be deterministic.... it's a deep deep rabbit hole
 
Last edited:
Exactly and as you suggest it's important to include human "frailty" (errors in decision making) and emotion into the input vector space too otherwise the AI becomes too perfect and zero fun to race against. In Forza we introduced a form of hysteresis into the problem in order to simulate varying skill levels. For example, if the left front tyre started to lose traction we could introduce a delay in resonse of several frames before the Drivatar attempted to correct. You end up with a very complex layered model ... which can then begin to affect performance, testing capabilities and... predictability. Most replays are simply "re-simulations" of the race using the driver's recorded inputs to "drive" the replay.... so everything must be deterministic.... it's a deep deep rabbit hole

Appreciate the insights!
 
At the end, who really cares that the AI is using the same physics than those applied to the player's car as long as the player feels as if he was racing humans in confidence (as trustful human racers can be)?
As example the human driver who in Raceroom get tired of AI cars crashing into his car and then when his car allways spinns completely out of track is able to drive on as nothing has happened.
Another example is when the AI cars are able to brake much harder (shorter distance) than even the best human car is able to brake.
A 3rd example cornering with your most grippy setup going inside an AI car - but the AI car is then able to hold its position by going even faster without any tendency to loosing grip.

NOTE: My example is from Raceroom but you can experience the same in rF2 and ACC.
 
Last edited by a moderator:
I remember winning some online races, and one epic league race due to smart decisions which I have done for a pitstops. It would not have been so awesome if those decisions were made by the AI. Simply less of experience, less fun, less rewarding.

well, if they were made by an AI then every driver would have been on your same strategy, thus you wouldn't have won those epic races.

EDIT: conditional sentence in the past, a nightmare for my english.. hope I got it right. :p
 
Yes, I thought about that, but also thought that maybe the AI engineer of other drivers would have less "strategy skill" or higher probability of mistake, more human factor :D

I also wonder what part of realism is taken away if you KNOW that you are racing AI.

Well... some AI are not that incredibly realistic, and especially if you spend quite some time racing against them, then you learn some patterns and limitations...

I remember having some trouble with AI in ACC in early build. Then I began to race them less like AI and more like other people and it worked out.

I have quite a bit of online racing experience. I don't think that people without good online racing experience can judge AI objectively for replicating real human being.

I wonder if experiment would be made where you would be given a race, and not have been told if you are racing AI or real people. Especially if you don't know the people, and you don't know the AI well. Should be complaining about AI just like about real drivers, also thinking that you are racing real people would probably cause in greater awareness, less confidence, and this should contribute to better quality and more immersion.

There are some racers who can be recognized by their driving and racing. So you should really race someone you don
 
Last edited:
As example the human driver who in Raceroom get tired of AI cars crashing into his car and then when his car allways spinns completely out of track is able to drive on as nothing has happened.

Completely in agreement here - IMO the AI simply MUST adhere to the same physics as the player or the frustration sky rockets. In the original Forza every AI car used the same physics model as the player and was only ever controlled by the same 3 inputs (throttle, brake, steering (we ignored handbrake and had no clutch)) that the player could provide. The downside is of course that when you have a large field of AI you have to run the full physics model across all cars and you have to share the available time with the graphics whores :) using up most of the frame time with rendering! This gets even more complex if you have a physics engine running at a higher frequency than the rendering engine for example...
 
Last edited by a moderator:
Completely in agreement here - IMO the AI simply MUST adhere to the same physics as the player or the frustration sky rockets.
() The downside is of course that when you have a large field of AI you have to run the full physics model across all cars and you have to share the available time with the graphics whores :) using up most of the frame time with rendering!
Glad at least one person got my point(joke :))
But Im quite sure that the reason racing games use another (allways more simple) physics/TM for AI cars is absolutely NOT because PC resources is to low to run the same physics/TM (and rendering) as the human driven car.
Its solely because the algoritms controlling AI has to be more advanced if the physics/TM is more advanced.
The simple fact is that its supposedly because the game devs skip the easy way - if they can.

Why I absolutely do not believe in the PC ressource thing is because good old NR2003 used the full physics for the AI cars!
You could even create setups for the AI drivers just like you could for yourself.;)
 
I’m not quite sure about this »GP4 and Nascar 2003 had the best AI« thing. Perhaps it was easier for the devs because the physics were not that complex back then? Don’t know.
 
Live for Speed had learning AI 15+ years ago. And it used the same physics as the player as far as I remember.
Yes.
Unlike AC which has a cheating AI and is still slow as hell anyway.

so we can expect a mess on the first corner ? Nice.
It's really no different in reality either. People behave stupid and make mistakes be it in a sim or in a multi million car on a race track.

Never had this issue in a sim on that track yet:

The same crappy behavior we know from sims is done in real racing too :( Purposeful crashing for points, bumping, pushing off, blocking, ...
Crashes in T1L1 I'm sure are well documented.

The biggest problem with AI right now is that they either cheat grip or are way too slow unable to drive on a limit of grip and use every last bit of it and of the track. The other problem is they drive like idiots, braking too soon, pushing players off, etc. and if you set the aggressiveness lower they drive even more too slow. They don't really want to drive side by side a few corners, they either leap in front or stay behind. They don't bluff, they don't probe, they don't plan ahead, nothing.
 
The biggest problem with AI right now is that they either cheat grip or are way too slow unable to drive on a limit of grip and use every last bit of it and of the track. The other problem is they drive like idiots, braking too soon, pushing players off, etc. and if you set the aggressiveness lower they drive even more too slow. They don't really want to drive side by side a few corners, they either leap in front or stay behind. They don't bluff, they don't probe, they don't plan ahead, nothing.
I agree more or less fully with you here.
Hehe but I can assure you that in my 5+ years in iRacing I met a lot of drivers who day after day did drive exactly that way(drive like idiots, pushing players off and don't plan ahead, etc).;);)
 
I’m not quite sure about this »GP4 and Nascar 2003 had the best AI« thing. Perhaps it was easier for the devs because the physics were not that complex back then? Don’t know.

Ultimately it's a compromise. In simplistic terms you have a time (and memory) budget that is divided up between graphics, physics, AI, audio etc. Most people want beautiful graphics 1st (though atypically this forum would probably prioritise physics) and then realistic physics, AI and audio to follow. These days we also want to throw in dynamic weather and track surfaces along with much larger grid sizes. AND we all want super high fps so that we can run our VR HMDs and 144Hz screens. AI typically doesn't get a huge chunk of this time budget and so it has to compromise and we get boring static line following AI.
 
Last edited:
The Neural AI concept sounds interesting, but whether it can be done right and make the AI feel like we are racing other human drivers, we shall see in the future. Right now the AI in some of the games are too predictable, and we as human drivers take advantage of that when we practice or race against them. AI seem to interact fairly well with each other, but not with a human driver thrown into the mix. Some games are better than others for AI/Human interaction racing.
 
I'm not an avid rF2 driver, but sounds like I may need to take another look :thumbsup:
So I take it this neural Ai's storage behavior will be the same as what we have in sims currently?
Let me make it clear that rF2's Type 2 AI training is not neural net. The files are called Wisdom files with the extension WIS. Largest one I see is about 200k for historic Belgium GP, most are <20k, and you get one for each AI car trained. They contain a list of AI commands that look like this when the AI have had training time:

{
CorneringCaution
{
test = 0
{
0.750000 = 2.601025
{
off right = 1.767339
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.827951
rear right grip = 1.000000
}
1.000000 = 2.602075
{
off right = 1.764295
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.815385
rear right grip = 1.000000
}
1.250000 = 2.601166
{
off right = 1.770547
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.833030
rear right grip = 1.000000
}
UnderSteerEffectOnThrottleMulti = 0.975000
UnderSteerEffectOnLineMulti = 1.000000
SPEED = 1.000000
}
test = 1
{
0.550000 = 2.604553
{
off right = 1.750407
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.818755
rear right grip = 1.000000
}
0.750000 = 2.604858
{
off right = 1.739768
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.808268
rear right grip = 1.000000
}
0.950000 = 2.605072
{
off right = 1.750516
off left = 0.000000
front left grip = 1.000000
front right grip = 1.000000
rear left grip = 0.819231
rear right grip = 1.000000
}
UnderSteerEffectOnThrottleMulti = 0.731250
UnderSteerEffectOnLineMulti = 1.000000
SPEED = 1.000000
}
 
Last edited:
Let me make it clear that rF2's Type 2 AI training is not neural net. The files are called Wisdom files with the extension WIS.
()They contain a list of AI commands that look like this when the AI have had training time:
Thank you Emery for letting us get some insight into this.
When I saw this I suddenly recalled that good ol NR2003 also give out some "inside" info from one of its ini files.
Hehe I used to publish custom inis for people who wanted the AIs to drive a bit more "intelligent" :whistling:

pace_speed_limit_mph = 70 ;
ai_accel_modifier = 0.48 ; acceleration grip efficiency
ai_decel_modifier = 0.89 ; braking grip efficiency
ai_fuel_use = 1.12 ; > 1.0 = more fuel consumed (1.12 = 24-25) (player = 25-26;Tires@19-26Laps)
ai_grip_modifier = 0.9645 ; > 1.0 = more grip
ai_drag_modifier = 1.000 ; > 1.0 = more drag, which is slower
ai_line_modifier = 1.000 ; dangerous hack, don't use unless you are a trained professional
ai_qual_modifier = 0.99 ; > 1.0 = faster during qualifying
ai_tire_wear_left = 0.66 ; left tire wear adjuster for ai
ai_tire_wear_right = 0.66 ; right tire wear adjuster for ai
strategy_lap_time_wear_loss = 4.9 ; lap time loss from totally worn tires
strategy_lap_time_fuel_use_gain = 0.334 ; lap time gain from low fuel
strategy_base_pitting_cost = 50.0 ; time lost to a stop & go pitstop
ai_pacing_distance = 2.0 ; car lengths behind while pacing
ai_bunching_distance = 2.0 ; car lengths behind while bunching for start
ai_drafting_distance = 1.09 ; car lengths behind while racing
ai_panic_decel = 4.0 ; G's of extra deceleration inducing panic
ai_dlongpad_scale = 0.4 ; scales padding in braking zones (smaller=more scaling)
ai_dlat_pad = 0.65 ;
ai_wall_offset = 20 ;
ai_inverse_slipcurve_k = 0.63 ; how much slip angle AI need to corner.
ai_squeeze_pcnt = 0.00 ;
 

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top