racingtracks.net
May 20, 2012, 12:21:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: RacingTracks.net now join Stop Forum Spam! Sorry we have to do this because you, spammers, ruin our forum.
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: AI Physics Settings  (Read 2686 times)
TP
CWG Mk2
God Member
***
Posts: 981



WWW
« on: February 24, 2008, 09:23:44 PM »

In HDV files (rFactor 1.150 and up) there are several AI lines that related to physics. To force the AI to use vehicle physics as designed by the physics expert - I suggest this AI physics setting to be enabled by default and don't forget to use proper talent files (RCD)! Otherwise rFactor will assign random performance to AI drivers. In most of the time this would be fine, but can result an unrealistic race if you're creating a close to reality mod such as F1 racing. I don't want to see Spyker out-perform McLaren Grin. I'll post how to enable this AI physics soon.
« Last Edit: February 10, 2012, 06:02:56 PM by TP » Logged

smart people innovate, smarter people 'borrow' their ideas, smartest people got all the money
TP
CWG Mk2
God Member
***
Posts: 981



WWW
« Reply #1 on: February 24, 2008, 10:03:00 PM »

The line below is the most important line. This is how we enable the AI true physics:

AIMinPassesPerTick=2
Comment in HDV: Minimum passes per tick (can use more accurate spring/damper/torque values, but takes more CPU). In short, this parameter will force rFactor to 'guestimate' AI action and reaction in order to save some CPU cycle. Change this to 0 to enable AI true physics. Todays processors are powerful enough/quite capable, and there's no real reason to not using this little gem. Another reason why we should set this to 0 is to prevent (at least minimizing the tendency) AI from cutting a tight corner. Also AI tendency to go understeer (due to cold tyres) in the first few laps seem to decrease a bit as they're now driving more carefully.

AISlipReaction=(500.0, 30.0)
The first value (500) : AI sensitivity on front tyre grip loss. Higher value equal high sensitivity. Each type of vehicle need different value. Porsche 917K and 917L shouldn't have same value, for example.
The second value (30.0) : how quickly AI to hit the gas pedal to reduce 'coasting' time. The higher the sooner AI will accelerate. Using high number will make AI more prone to spin I think, especially in oversteery cars such as Porsche 911. Just like the first parameter, different vehicle type need different value.

AICornerReductionBase=50.0
The speed point in AIW divided by this number equal to percentage of deceleration we can expect thru a waypoint. Higher number equal less deceleration. This will affect AI during corner entry.

These three parameters below, I really don't know how they work, but these lines will force AI to use averaging value of spring/damper as defined in HDV.
AISpringRate=1.0
AIDamperSlow=1.2
AIDamperFast=0.4


AITorqueStab=(1.0, 1.0, 1.0)
This is my guestimation, 1.0 is quite reasonable to me. ISI FBMW07 is using 0.6 for the third value though.
« Last Edit: February 25, 2008, 01:08:00 AM by TP » Logged

smart people innovate, smarter people 'borrow' their ideas, smartest people got all the money
TP
CWG Mk2
God Member
***
Posts: 981



WWW
« Reply #2 on: February 25, 2008, 01:24:11 AM »

There are several lines in AIW file that will affect AI performance as well

AIRange=0.1000
The default value, 0.1, will cause AI to do a close racing even on circuit with long straights such as Paul Ricard, Le Mans, or Sebring where in theory faster cars should be able to left slower cars further behind. I think the default value is for oval racing where close racing is very common. Using 1.0 will cause AI to spread out more in tracks with long straights, but in circuit with lots of slow turn, the slower AI usually manage to peform as good as the faster AI. So for circuits other than oval, I suggest to use 1.0 as it will give us better offline racing experience. I haven't try value higher than 1.0 though.

AIBrakeStiffness=(1.0, 1.0, 0.9)
Lowering the value (to 0.5 for example) will cause AI to brake better in tight corners or hairpins as AI can brake harder now, and as the result, reduce their tendency to hit cars in front of them. The default value is good for oval circuit, where braking hard is uncommon. From Mike_Z (AI programmer for rFactor): "Tells the AI how aggressively to brake into a corner for the 3 drive types (rear, 4 wheel drive, & front). When set to 1.0 the AIs wait until the last possible moment to brake and then brake as hard as they can. As that number decreases, they start their braking earlier and don't brake as hard". So, my guesstimation is not too far from his explanation Wink. Anyway, using lower value will cause AI to take a longer braking zone. And these three values are for three drive type: rear wheel, all wheel, and front wheel drive. That's why the third value has to be lower than the first two, because it's for front wheel drive vehicle.
« Last Edit: March 02, 2008, 05:32:06 PM by TP » Logged

smart people innovate, smarter people 'borrow' their ideas, smartest people got all the money
TP
CWG Mk2
God Member
***
Posts: 981



WWW
« Reply #3 on: March 02, 2008, 05:48:28 PM »

These lines (found in PLR file) must be placed in TBC and HDV file as well, so PLR file won't override AI performance and causing 'why AI is doing so bad?' and 'Wow, the AI is great! I can't beat them easily!' Cheesy

AI Tire Model="1.00000" // 0.0 = use AI peak slip, 1.0 = use player's dynamic slip, or a blend between the two (can be overrode in TBC with AITireModel)

AI Brake_Power Usage="0.98000" // Fraction of theoretical brake power that AI attempt to use (can be overrode in HDV)
AI Brake_Grip Usage="0.97250" // Fraction of theoretical brake grip that AI attempt to use (can be overrode in HDV)
AI Corner_Grip Usage="0.97000" // Fraction of theoretical cornering grip that AI attempt to use (can be overrode in HDV)
AI Max Load="40000.00000" // Maximum total load to set up theoretical performance tables (can be overrode in HDV)
AI Min Radius="20.00000" // Minimum radius turn to set up theoretical performance tables (can be overrode in HDV)

The unit for AI Max Load is Newton, and the unit for AI Min Radius is meter I suppose. I think they will affect AISpring and AIDamper in HDV. Haven't test this further though.. Real Life is stealing much of my free time now :-(
Logged

smart people innovate, smarter people 'borrow' their ideas, smartest people got all the money
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!