The definitive AI Settings Thread

Discussion in 'General Discussion' started by MarcG, Jun 15, 2013.

  1. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    First post updated with a WARNING as I'm "washing my hands" of any responsibility now, it was fun to tweak & fiddle but those days are behind me as RF2 has become simply good enough "out the box"....in fact it always was good enough but it's fun to play around with stuff isn't it!? :)
     
  2. Voodoo Pizzaman

    Voodoo Pizzaman Registered

    Joined:
    Jul 12, 2012
    Messages:
    102
    Likes Received:
    0
    Oh I'm doing just fine on my tires...it's the AI that probably needs to be pitting more frequently lol. Eventually they start dropping 2-3 seconds a lap to me.
     
  3. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Made a find yesterday:

    The Player.JSON setting:
    "Auto Line Smoothing":
    Is definately broken! I´ve used to set this on "7" but I noticed now that AI with these setting is going funky.
    They don´t follow the line, going wide totally destroying a good AIW-line. This behaviour change only minor with several laps driven.
    I noticed that in actual build as in older build 1098.

    Leave that at "0" !!!
     
  4. Pales

    Pales Registered

    Joined:
    May 9, 2017
    Messages:
    389
    Likes Received:
    405
    The AI are broken after this update. They 0.1 break and stagger in corners constantly which before was a seemless drive. PLEASE ALLOW US TO REVERT YOUR BUILD
     
  5. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    If someone does not like AI blocking behavior (which can sometimes lead to AI applying braking when player is right behind), you can turn AI blocking off in player.json, set "AI Logic Override" to 1. For me its much better without blocking, AI maintaining predictable speed and lines.
     
    Last edited: Apr 27, 2018
    The Iron Wolf likes this.
  6. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Well yeah, if BLOCK-path is bad its propably more negative than an advantage.
     
  7. machine

    machine Registered

    Joined:
    Jan 31, 2011
    Messages:
    399
    Likes Received:
    295
    Gday all. I have finally read through all the pages!
    I see most stuff here is angled from the users side. I am a modder, and have access to edit the tracks AND the car!
    Machine tracks on Steam and N-a-s-c-a-r 2016 Skins Mod.
    I have been working on tuning AI the last month or so. I have come up on some issues.

    ALL QUESTIONS AS RELATES TO OVAL RACING!
    I see talk of Multiple DrivingLines: Fasest, Fastest2, Fastest3 > What is the full story, can I set a preferred of the 3? Do the AI randomly choose from those you set? I know you can set individual drivers, but I dont want that.

    Speed & QualifySpeed are exactly what I was looking for, as the qualify speeds are always very slow. I could lower race speeds, and increase qual speeds to make AI qualify faster. But the gap between fast and slow cars is already too small, and adjusting the speed numbers will make the gap smaller. Is there some other adjustment for AI speed? There was also talk that if QualifySpeed was more than Speed for AI, they would not pass during race!
    Example: As per below, If I change this adding qualspeed, this would give faster qual speed v racespeed, but difference between fastest and slowest driver is less. (now 70)
    Driver1
    {Speed=100}
    Driver2
    {Speed=0}

    Driver1
    {Speed=70, QualSpeed=100}
    Driver2
    {Speed=0, QualSpeed=30}
    This is all in RCD!

    How to force AI setup - Not always working. I have setup in gdb and same setup in the car mas, but does not always seem to work.

    How to Change AI tyre wear on a per track basis. Some tracks I get virtually no time dropoff in AI, some others 1 sec slower after 15 laps.

    PitStopStrategies just did not work. Is this possible in rF2? It is supposed to go in RCD!


    And some other comments from what I read in the thread.
    CorneringCaution works well to stop AI overrunning corners (larger number - from 30 to 80 - in RCD)
    Slowwhenpushed=0 means AI are now not pushovers in Oval racing, they race you hard. (in AIW)
     
    Last edited: May 3, 2018
  8. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Quick answer to things I know instantly:
    PitStopStrategies doesn´t work in rF2. No chance at all here.
    For forcing AI setup set "Fixed AI Setups":true, in player.json. Maybe "Fixed Setups":true, must be set also dont remember by now.
    Then make a setup for them and save it in the track subfolder. Load AI and assign given setup to them.

    As far as I know AI only follows the Fastest path. Multiple lines don´t work.
    For tyre wear: In the .TDF file theres a "roughness" setting. Maybe that has influence on wear? You have to test.
     
  9. nurogize

    nurogize Registered

    Joined:
    Jul 1, 2018
    Messages:
    54
    Likes Received:
    22
    I would like to add that lowering the AITorqueStab parameter, will increase the likelihood of the AI going off the track if you run into them or they run into you. I find 0.85 far more enjoyable than SimBin's 1.25...

    If there's a quicker way to adjust this, rather than unpacking and repackaging the files it would be appreciated.
     
    Hazi likes this.
  10. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    132
    Likes Received:
    39
    AITorqueStab parameter is obsolete and hardcoded to 1.0 according to this page:

    https://www.studio-397.com/2016/05/updating-hdv-and-tbc-files/

    I think AI going off track has to do with track's AIW and paths, HDV parameters are for AI car setup/physics and performance.

    Tire wear rate is in the tbc file , along with AI grip multiplier line which if very low AI is slow, it should be very close to 1.0.

    I play mainly open wheel and I ve noticed that when u increase ai aggression (35%) they hit you like your not in their path while lowering aggression (30% or less) they brake effectively to avoid collision BUT they dont change path to easily overtake they just brake in a fixed path.In toban however if you accelerate side by side exiting a corner and you dont leave enough room for ai, they go off track (default 25% aggression, FR3.5) , but i haven't repeat that to be able to conclude something certain and make sure i didnt gently push AI off track (my impression is that we didnt touch).

    That's important for when u spin and remain inside the track even partially and on the fast path, AI usually collides with you wrecking your car and theirs.

    It would be nice for developer to make a guide for advanced AI behaviour and the AIW file/ AI in general.
     
    nurogize likes this.
  11. nurogize

    nurogize Registered

    Joined:
    Jul 1, 2018
    Messages:
    54
    Likes Received:
    22
    Just as in GTR2 & rFactor, the only way to have a coherent race at the Nordschleife, is to set the tire wear to a value that is 2x high than the fuel usage.

    There's a value in the AIW labeled "FuelUse=", I'm wondering if this would have any positive effect?

    I wonder how reliable the following article is: http://simtrackipedia.wikidot.com/fuel-usage-how-to

    It says to multiple the track/lap length by 16 and place the value in parentheses.

    Edit: this seems to have fixed the problem, after going ahead and setting the fuel & tyre wear to 2x. "FuelUse=" was increased by around 18%.

    Updating the .mas file containing the AIW file, follows the same logic as the following guide:
    https://forum.studio-397.com/index....tte-c6-gt2-and-10-gt4-370z.60681/#post-953677

    And of course make sure .mas file is the same as the one in the base version folder, you're trying to override.

    Also assigning "PitGroup=" to each of the participants works. One set of the group pit at once, then the next lap, the next set of the group pit. No AI car waiting to in the pit lane for the box to free up.
    Make sure the AIW has "TeamIndex=" entries designating at least 2 garage position.
    Note: 28 cars were ran on circuit, instead of the maximum of (18 × 2=) 36

    If one knows, how I can tell if I my pit spot is available, it would be appreciated. Only logical way I can think of, is pause the game, and if I can't pass my 'teammate', pull back a quarter mile or so, and see what they do... lol.

    2nd edit:
    I went ahead an did the 3 hour race as a spectator with 18 c6rand 10 370z w/2x fuel use and tire wear.

    1 c6r & 1 370z retired in the middle of the race due to fuel.

    On the last lap, 9/17 remaining corvettes ran out of fuel on the last lap. This wouldn't have been a problem had the AI in the lead slowed down in the last 20 seconds, as commonly seen in the 24 hours of le mans and other timed races.
    • Instead of pitting the usual every 2 or 3 laps, they were stretching it out to 4 laps, at the last 7 minutes of the race which is impossible.

    8 out of 17 c6 that did finish and get classified couldn't make it back to their garage as they ran out of fuel.

    9 out 9 remaining 370z did get classified, but only 3 made it back to their garage.

    Again this problem goes back to rFactor 1.

    I'll try simulating 3 hour race with 2x fuel & 3x tyres.

    Since the AI were bunched up and too close together in the pit stops, during refueling & such, I changed the order of the PitGroupOrder in track's GDB. The higher & lower class cars are now more likely to have their pitspots next to eachother. This is ideal because due to the speed difference, they're more likely to go to the pits at a different time, and not collide with eachother.

    By default the ISI created .veh files don't have a space between the 'Group' and 'integer value'; so keep that in mind when updating them.

    The following works
    Code:
    PitGroupOrder
    {
      PitGroup = 2, Group1
      PitGroup = 2, Group11
      PitGroup = 2, Group3
      PitGroup = 2, Group13
      PitGroup = 2, Group5
      PitGroup = 2, Group15
      PitGroup = 2, Group7
      PitGroup = 2, Group17
      PitGroup = 2, Group9
      PitGroup = 2, Group10
      PitGroup = 2, Group2
      PitGroup = 2, Group12
      PitGroup = 2, Group4
      PitGroup = 2, Group14
      PitGroup = 2, Group6
      PitGroup = 2, Group16
      PitGroup = 2, Group8
      PitGroup = 2, Group18
    }
    

    Edit: In examining the AI, bottom 9 out of 18 corvette c6, will opt to head to pits first; which is 'smart' by their standard. 2x fuel and 3x tyre wear is used, 1st pit started at end of 2nd lap.
    One thing certain, AI will not try to fight over the same pit box. Two AI on the same group were 3rd & 5th position. 3rd position decided pit, and 5th position continued on to the next lap.

    AI in the lead finished 2 hour race with 25 seconds spare. Ran out of fuel on victory lap. 50% greater tire wear has no effect. Only 4 out of 27 ai opponents made it back to the pits during the victory lap.
     
    Last edited: Jul 28, 2018
    Hazi likes this.
  12. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    132
    Likes Received:
    39
    For fuel calculation i have consulted this thread and indeed 13x (AIW) works much better than 16x:
    https://forum.studio-397.com/index.php?threads/fuel-consumption-formula.44300/

    But i only have tested heikki's eastern creek so far where the AIW fuel multiplier was ~16 and it was showing excessive fuel consumption in the track menu calculation (i guess thats what AI is using), compared to real time one when driving (proper one and the place to start). I changed "FuelUse=" with 13x and i did a 30 lap race with an edited ASR Ferrari F641-2 (F1 1990) / "Fixed Setup" and "Fixed AI Setup" off (default), works well BUT:

    It worked for my own car (default setup with only fuel amount changed to last the race), which at race start i switch to AI control and accelerate the race... AI with my car goes to re-fuel at the last lap as the fuel indicator lights up although he can make it to the finish line.
    I also drove 30 laps and completed the race with just enough fuel, so 13x works fine.

    Rest of the AI showed slower pace compared to my car driven by AI which is the reason for this test, tested with both soft (default) and hard tires (AI same always), so maybe FuelEstimate =1.35 (engine.ini) is too much (" // fudge factor for differences between vehicle types (used for lap estimates and AI pit scheduling"). On the other hand i cant be sure what happens when u give the car to AI and if its leveled with the rest of the AI, and only difference is coming from FuelEstimate as opposed to setting fuel amount manually for my car before the race, i will have to test again and see with FuelEstimate = 1.

    So from what i understand FuelEstimate parameter can effectively deal with these issues:
    - AI pits as soon as fuel indicator shows up even in the last lap like a dummy
    - Race start revving and first lap being much slower overall requires more fuel
    - Pace car, flag rules, stop&go penalties
    (^increase cases)

    -Help AI not to carry too much fuel and be on a different race when mod value is sky high!
    (decrease case)

    Probably thats why ASR LC92 AI is slow (another suspect), i thnk it has 1.7 fuel estimate! errr

    Also it would help to see AI fuel amount and consumption, tire compound used, such minimal info could help setting better offline races and are hidden.
    AI needs tire change strategy too , take into account total race laps and divide /1, /2 or /3 depending on race length and location, randomize a few laps +/- for variety in teams planning.


    However, since real time fuel calculator when driving works accurately and updates every 2 laps, game could calibrate these fuel consumption multipliers itself, especially the one in the AIW, either automatically or by having a calibrate start-stop option and do as many laps as you like, save, don. FuelEstimate hardcoded to 1 or 1.05 or whatever works best. Maybe AIW multiplier hardcoded at 13 and calibrate FuelEstimate......... :confused:
     
    Last edited: Jul 28, 2018
  13. nurogize

    nurogize Registered

    Joined:
    Jul 1, 2018
    Messages:
    54
    Likes Received:
    22
    The default FuelUse was at 13x and the track lap distance was close to the real world value.

    Edit: Raising the FuelUse from 16x to 18x and 20x made no real difference, in that half the top class of cars ran out of fuel on the victory lap. It seems the best solution is see how the AI race.

    If they cross the finish line 20-60 seconds after the timer runs out, then you're better off making it a 58/59 minute race instead of a 60 minute race; when it comes to really long track like the Nordschleife. Important thing here is see how they end the race you've set up the fuel and tire wear to your liking.

    Another alternative is reloading the replay, resuming the game, then booting the AI in first place for refusing to slow down as seen in most real life 24 hours races during the 'last lap'... lol, to ensure most of the field gets classified.

    2nd Edit: In setting the FuelUse to 20x, it seems the AI team mates are more likely to find themselves wanting to use the pit at the same time, causing one of them to refuse to wait, and continue on to the next lap instead, despite there not being enough fuel in their tank.

    For those wishing to do 2 hour race with the c6 gt2, it seems setting the race to 125 min is the way to go. The race winner at least made it back to the pits. 11/18 of the C6 ran out of fuel on the victory lap.
     
    Last edited: Jul 28, 2018
  14. Johngrim64

    Johngrim64 Registered

    Joined:
    Jul 12, 2017
    Messages:
    18
    Likes Received:
    4
    Just tried the new Sebring track with 15 ai and the LMP cars crash on the first lap and the ones that don't crash just drive off the track and stop .This is the endurance cars gte and lmp together .Has anybody else had ai problems on thus track ?
     
  15. LokiD

    LokiD Registered

    Joined:
    May 3, 2017
    Messages:
    1,282
    Likes Received:
    1,216
    did 15 laps with the endurance cars 22 cars, was a great race, nothing wrong my end
     
  16. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Nope all good here with a variety of cars, try with a fresh player.json (backup first) and see if that helps.
     

Share This Page