AI Slipstream

Discussion in 'General Discussion' started by BirnenRubber, Oct 19, 2021.

  1. BirnenRubber

    BirnenRubber Registered

    Joined:
    Aug 23, 2021
    Messages:
    22
    Likes Received:
    7
    Is there a way to increase the effectiveness of AI overtaking during a slipstream?

    I have the AI strength and aggressiveness set quite high - 95/80. I've been trying to create a GTE race at Le mans where the AI behave fairly realistic. However down the straights they seem very reluctant to attempt an overtake. It kind of ruins my race when I can overtake an AI from 50m away quite easily while they are tailgating the car in front and haven't moved during my approach. Even with aggression set that high they still conga line quite a bit.

    I understand from searching there is an option somewhere called AI draft stickiness. However I couldn't find it in any ini files and I'm not sure how to edit this. I also would have no idea what kind of value to set.

    Thanks!
     
  2. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    7,454
    Likes Received:
    4,369
    It is one of the known AI issues that unfortunately have been seen for years. Another symptom is the AI will attempt a pass, pulling out, but then be unable to complete the pass and return to the draft position.
     
  3. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    In the RCd file there is a line called ‘draft stickiness’ you can add in. I think that helps a bit from my experience, but still the rf2 AI are not very good.
     
  4. philrob

    philrob Registered

    Joined:
    Jan 12, 2012
    Messages:
    572
    Likes Received:
    1,204
    My understanding of it is this:
    AIDraftStickiness: use "4" for for tracks with long straights, use "3" for street tracks or narrow tracks (like Monaco, Montreal etc.) (This controls when tha ai duck from slipstream and attempt to pass, the lower number means that the AI will start to pull over from sliptream earlier) add or found in the AIW file.

    [Waypoint]
    AIDraftStickiness=(3.0000)
     
    atomed likes this.
  5. atomed

    atomed Member

    Joined:
    Jul 9, 2019
    Messages:
    1,332
    Likes Received:
    1,342
    I read somewhere that they used 1 for narrow and short tracks and 2.5 for fast and long ones like Monza. That and lowering the slowwhenpushed to 0.7-0.8 creates nice battles between AI cars.
    Edit: I think AI behavior in general is brilliant, the only issue is tuning each track to behave properly.
     
    88mphTim, memoNo1 and pkelly like this.
  6. ThomasJohansen

    ThomasJohansen Registered

    Joined:
    Dec 27, 2019
    Messages:
    948
    Likes Received:
    2,171
  7. atomed

    atomed Member

    Joined:
    Jul 9, 2019
    Messages:
    1,332
    Likes Received:
    1,342
    Iirc the LeMans issue was more on the AI coding side, with the behavior in lapped + on pit entry/exit lap cars in different categories not overtaking. If so the issue is everywhere but not as evident as in LeMans because of the length of the track + the ease of overtaking there.
     
  8. SharD

    SharD Registered

    Joined:
    Apr 17, 2019
    Messages:
    374
    Likes Received:
    437
    In the .rcd driver file or the .aiw file?
     
  9. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    DraftStickinessMulti = 90.0

    This is in my RCD file. I find this setting I see the AI pull out of a slip steam more often.
     
    SharD likes this.
  10. SharD

    SharD Registered

    Joined:
    Apr 17, 2019
    Messages:
    374
    Likes Received:
    437
    I tested this a little bit, giving Vettel and Stroll their own .rcd file.

    Vettel had DraftStickinessMulti = 100 and Stroll had DraftStickinessMulti = 0.

    Vettel overtook like he should, not aborting overtakes until he really had to brake, whereas Stroll kept being stuck behind slower cars. The Vettel car should therefor being racing the player much harder than the Stroll car will. The Vettel car crashed, though. :D
     
    Maarten Nauta, GertjanD and RoboCAT10 like this.
  11. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Both
     
  12. shiet

    shiet Registered

    Joined:
    Nov 3, 2014
    Messages:
    455
    Likes Received:
    217
    I've read a lot of comment about AIDraftStickiness and what it does. I googled it. It's present in every gmotor game and everybody say different things about it since ~2006. :)
    Some say set it low so AI cars overtake in slipstream.
    Some say set it high so AI cars overtake in slipstream.
    I've read 0.1 is good, others say 4 is good and I've seen 20 in AIW files.

    I've been updating oval tracks AIWs and I tested this AIDraftStickiness thing (among other AIW parameters) _A LOT_, every possible combination with Stock cars, Indycars and Porsches. I literally watched AIs for hundreds of laps (time accelerated ofc...)
    What I concluded is no matter how you set it it doesn't affect that the AI overtakes in slipstream or not. The code is broken, Marcel said it himself.
    But I figured out what this parameter does.
    What I'm sure is that it tells the AIs to follow the car ahead and from how far behind. If you think about it the name of the parameter (draft stickiness) itself suggests this.
    I'm not sure about the number but I think it's in meters. For example:
    If I set it very low (0-1) then the AIs don't intentionally stay behind other cars to get slipstream (on long straights ofc). They just follow the fastpath.
    If I set it to 25 then they follow cars from very far behind disregarding the fastpath.
    So that's it.

    Another parameter coming up in these "slipstream is not working" discussions is the slowwhenpushed.
    This is basically a pretty stupid option and it should be set at 0 at all times in every single AIW file ever created instead it's 1 by default.
    And it has nothing to do with drafting or slipstreaming.
    It tells the AI to basically brake check when the car behind is very close "simulating" that he is scared or something. I don't know the purpose of this but it's certainly stupid.
    This was a long standing issue with the rF2 AI for me and setting this parameter to 0 fixed it for me.
     
    Last edited: Jul 27, 2022
    Emery, GTClub_wajdi, memoNo1 and 3 others like this.
  13. Hazi

    Hazi Registered

    Joined:
    Jan 15, 2012
    Messages:
    917
    Likes Received:
    146
    O I have seen this on many laps. When I got very near the just break and start swerving left and right. Don´t remember the tracks but had it very often.... good find.

     
  14. BirnenRubber

    BirnenRubber Registered

    Joined:
    Aug 23, 2021
    Messages:
    22
    Likes Received:
    7
    How can I edit that second parameter you mentioned?

     
  15. memoNo1

    memoNo1 Registered

    Joined:
    Apr 13, 2019
    Messages:
    1,895
    Likes Received:
    2,708
    Damn MSG fix that pls soon..
     
  16. shiet

    shiet Registered

    Joined:
    Nov 3, 2014
    Messages:
    455
    Likes Received:
    217
    Both parameters are in the AIW file.

    Btw I learned other things too about the AIW parameters.
    The acceptabledriverlinenoise by default is set to 0.5, it "says" to the AIs that they can alter their line from the fastpath by x meters to the left and the right. On wider ovals it's a good idea to increase it so the racing looks more realistic because the AIs don't drive in a long train-like formation. For example I set it to 7+ on Auto Club Speedway. On a track like Fuji or Barcelona I may set it to 1-1.5. The problem is this can alter their line in a way they will make more mistakes, going offtrack or hit the wall. So it depends on the track and the fastpath.

    The AIRange is 0.1 by default, this works in tandem with the AI limiter in the game telling the game what's the speed (talent) difference between AI drivers. Again if you don't want to see all the AI cars bunched up set it higher (and set the AI limiter lower). I've set it to 0.4 on Bristol because the AIs couldn't spread out on the track at all, when I tried to race there I was two wide all the time even after 10 minutes which is totally unrealistic. This fixed it with the next parameter which is the

    AISpec. The default is 0,0,1,0 in every single AIW I've ever looked into.
    The four numbers are referring to the acceleration, max speed, cornering speed and braking of the AIs and how much do you want to limit these when you change the AI strength.
    Changing the acceleration makes the AIs throttle inputs more human-like (progressive) in short they will be slower coming out of corners and this also mitigates the AIs throttle on/off behavior.
    Changing the max speed changes their max speed, they don't press the throttle to 100% (at value=1 they press it to ~90%). I can see this useful if you want to simulate a race in which there are people who don't know car setups but other than that I leave it at 0.
    If you want closer and better racing with the AI set the cornering to low (0.1-0.2). This will let the AI to use their almost full potential in corners and they won't slow down artificially by much. The difference in slow corners is more noticable.
    Setting the cornering to 0 seems to almost completely eradicate the difference between the drivers so I wouldn't use 0.
    Setting the braking from 0 to 1: well, there is not much difference at first glance. What I noticed is that with 0 they brake lightning fast and (always?) use 100% pressure and the brake timing is in the ms range at a time, you can only see this with the Tinypedal because that runs at 60 Hz. You can see this in action when the AI brake lights are flashing very fast in corners (I'm sure you have seen this before).
    Setting this to 1 the braking is still very fast but noticably slower and not always at 100% pressure. I'm not 100% sure about this yet.

    AIBrakingStiffness is 1,1,0.9 by default, this sets the braking distance for the rear/4WD/front wheel drive cars. And if you lower it the braking distance will increase for the AIs so they will be less likely to divebomb you. This may require you to finetune the paths (fast, block) before turns.
     
    Last edited: Jul 27, 2022
  17. dosequis56

    dosequis56 Registered

    Joined:
    Dec 24, 2021
    Messages:
    133
    Likes Received:
    48
    Thanks for this info to help validate some of the experiments I have been running. I am mostly playing with SpeedStep values in an attempt to make the AI make more passes and also enter the corner in a 'sane' fashion vs. the insane swerving and dive bombing. Initial experiences were to get a course like Monaco working where the AI would cut corners and slam walls. I still have yet to get the AI to be 100% consistent on the first lap into tight corners with respect to not rear ending each other; but lap 2 is usually pretty good at most tracks.
     

Share This Page