HOW TO: Fixing common AI problems with rFactor 2 Tracks

Discussion in 'Track Modding' started by matf1, Jul 14, 2015.

  1. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    Work in progress so feedback is welcomed!

    New version uploaded. There is some cleanup and another testing phase I want to perform but as that may take some time, here's what I have so far.
    View attachment 17412

    Also, huge thanks to all of you guys for the input. It's really helped me, but more importantly the guys and girls that will pick up this document in the future.
     
    Last edited by a moderator: Jul 20, 2015
  2. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Looking good!

    I think some sidebars for "Why should I do XXX" would be educational with, maybe, examples from the ISI tracks. Or... "Why shouldn't I do YYY". For instance, certain things people might want to do are better left to the talent files or the mod rather than the AIW.
     
  3. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    Yep that's good Emery and something I'd be looking for in a guide.
     
  4. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Good document so far mat!

    Some comments/suggestions:
    For the kink at start/finish-line, I recommend to highlight quite a lot waypoints of both sides of start/finish
    like 10 before and 10 after (when possible and straight is long enough even more), then "normalize curve". That makes it much smoother/lifelike.

    Never noticed problem with offset of start/finish. Maybe a few meters but that´s because modder didn´t set Xfinish correctly.

    FineTuning:
    Interesting one is "acceptabledriverlinenoise": When the track is wide enough and corridors are ok, than you can crank up
    this value to 2.0000 or so, what gives the AI more "space" to "play" with the line.
    That means that the AI - while in learning process - varys more, what can end up in very interesting behaviour! It is possible that
    - after training session (standard learning)- all AI do a different line!!!! Great effect!! Test it!
    (used it on Euscotracks Gotham Hills for example)

    AIdraftstickiness was important back in rF1 days where cars stuck behind each other instead of overtaking.
    Seems not that important these days, but I never played around with it in rF2, because no need to....

    You should mention that
    WorstAdjust=(0.8000) / MidAdjust=(1.0000) / BestAdjust=(1.2000)
    is very sensitive!!! Don´t do more than +/- 0.01 at one time. 0.01 can make half a second! Saw it at feels3 croft where someone offered a "better AIW" as an update.
    Then I wondered why the heck AI is waaaaayy too fast (absolutely over the top like 3 sec or so). Then noticed that modder of this update
    cheated MidAdjust=(1.1000) = crap!! Beware!!

    AISpec=(0.0000,0.0000,1.0000,0.0000) comes into play when player uses AIstrengh <100%.
    So here you can dispose (right word?) in which regard AI slows down. If all is at 0.0000 then grip-level of AI will be altered by game.
     
  5. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    Good find! Wondered myself for ages why the AI is so fricking fast at Croft.

    Some notes from my side.

    Corridors define the drivable surface for the AI. The AIW editor can create corridors by using the "find corridors *" option in the main menu. Every object marked as racesurface (racesurface prefix in the gmt name, for instance racesurface01.gmt) is included. If you work on an older track make sure the gmt's for curbs (or any other drivable surface) have this prefix, otherwise they are not included and you have to extend the corridors manually.
    To extend or reduce the corridors you have to make them visible in the "show/hide menu". Make sure that no driving line is visible/actionable (path sub menu) at the same time. You can mark every main waypoint you want to change and use the Ctrl-key + Cursor up/down to change the left (white) corridor and Ctrl-key + Cursor left/right to change the right (red) corridor. For small adjustment use Ctrl + Alt + Cursor. If you have modified the corridors you should not use the "find corridors *" option again because it overwrites all your changes. I usually create a backup of the AIW and rename the copy after each step.

    You can use the same principle to finetune the paths. Just mark the path in the path sub menu as visible/actionable and hide everything else. Use the "show Speed Text" option in the path submenu to give you an indication how your changes affect the AI speed. The smoothest path is not always the best. At some places it might be a good idea to add a small kink (slowdown) before a curve or a chicane to give the AI a better position and weight balance at the entry of the curve (depends on the mod. F1 cars behave differently than GT's or FWD cars) .
    When you testdrive your AI in Devmode you will notice different colored indicator lines in front of the car. The blue line shows in the direction of the waypoint with the slowest speed for that part of the track (max corner speed).
     
  6. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    I was wary of adding too much as I really want it to be an easy reward for those that try. But I'd have to agree Tosch.
    Maybe I'll make a trilogy... Noob/Gamer/Pro!


    @peterchen. Thanks buddy.
    I feel the same with AIdraftstickiness but I'm sure I saw positive results in an early F3 test at Austria, needs a recheck.

    The offset was on a few tracks, but yeah I just worked around it. Will check again with new build.

    This is the most curious thing I've read for a while.
    Are you certain of this?

    The reason I ask is my install is tuned for 100% for everything and I'm positive reducing that cornering one from 1 to 0 works at that strength.
     
    Feralarri likes this.
  7. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Mh, interesting,- no, not really certain. Seems just logical to me, as an explicit division wouldn´t make sense at 100% or above
    and my experiences with rF1 seemed to confirm this. At this >=100% settings AI has nothing but more grip. Do they maybe
    brake later when over 100 ?
    Never used it in rF2 though.

    Sorry for confusion.:eek:
     
  8. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Tosch, you should post this also here (just behind in the list):
    http://isiforums.net/f/showthread.php/25630-Fastest-AIW-line-not-so-fast

    Thanks!
     
  9. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Worthwhile to emphasize this. AIW editing can unintentionally be very destructive!
     
  10. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    Yeah, I'll likely add a preparation summary at the beginning of the document and include it there.
    It is mentioned, but in a paragraph.

    Hopefully some time will open up today for another push on it.
     
  11. Satangoss

    Satangoss Registered

    Joined:
    Jun 2, 2011
    Messages:
    1,123
    Likes Received:
    7
    Any word on AI speed at wet condition?

    Some tracks they're too slow, others they're unreasonably fast.

    Thanks for the PDF documentation.
     
  12. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    I'd have to look into that and am happy to. Can you give me some example tracks where this problem is evident?
     
  13. Satangoss

    Satangoss Registered

    Joined:
    Jun 2, 2011
    Messages:
    1,123
    Likes Received:
    7
    ISI São Paulo (Interlagos) = AI slow in wet
    Sebring = AI extremely fast in wet

    If it was a simple variable it would be very handy to fix it. But you always can be tricked by some tyre file aspect more than track AI (I've tested with Meganes). I'll do the same test with other cars just in case.
     
  14. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    As soon as you mentioned tyres, I took the Indy for a spin:

    Sao Paulo
    AI=1:29.708
    Me=1:29.599

    Sebring
    AI=1:56.270
    Me=1:55.869

    Nothing scientific, just about 20 mins at each. (that sebring lap was red hot ;) )


    If there was a car too slow, I'd reduce the AISpec=(0.0000,0.0000,1.0000,0.0000) cornering attribute to 0.
    Too fast and I'd reduce their braking effectiveness.
     
  15. Satangoss

    Satangoss Registered

    Joined:
    Jun 2, 2011
    Messages:
    1,123
    Likes Received:
    7
    Yeap, it could be a specific Megane issue with rain tyres. I'll test some stuff and give you a feedback.

    Thanks for the effort on improving offline racing so far.
     
  16. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Matf1, could you please tell us in detail your experiences with AIpec including conclusion?
     
  17. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    Yep. I put in a few hours late last night, massaging in all the great info you guys provided. Some of the things I've observed casually will need to be verified, and that's my next step. Every 2 or 3 days I'd expect to have time and motivation for it, so maybe over the weekend I'll have a good update out.
     
  18. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    2
    New version uploaded. There is some cleanup and another testing phase I want to perform but as that may take some time, here's what I have so far.
    *see OP

    Also, huge thanks to all of you guys for the input. It's really helped me, but more importantly the guys and girls that will pick up this document in the future.
     
  19. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Well done, matf1!

    The document is long enough now that a table of contents would be helpful, with, maybe an initial summary of the steps.

    A friend who isn't on the net so much, but is familiar with basic rF1 AI editing had a suggestion when I mentioned being able to use replays to record a path. His suggestion was, if you've got a basic AIW file that's not optimal yet doesn't have any hideous errors in (e.g. it's just slow), apply standard AI learning to optimize it, and then make a replay file of the AI driving.

    The other common problem that came to mind this morning when I loaded Silverstone was the problem on AI not being able to get out of the garage. I recall a discussion of how to fix that problem and it would be appropriate for this document :)
     
  20. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    Garage locations deserve an extra chapter! :D

    ...especially the part where you create the garage spots, save the AIW, leave track, load track and save AIW again. :p
     

Share This Page