A.I. tweaking

Discussion in 'Car Modding' started by 2slow4u, Mar 27, 2017.

  1. 2slow4u

    2slow4u Registered

    Joined:
    Nov 28, 2011
    Messages:
    117
    Likes Received:
    11
    I'm in troube with a converted mod.
    The car is hard to drive, very low grip.
    Humans are able to drive, AI don't.
    The issue manifests itself in the braking points, where the AI gets too aggressive and spun.
    How can I fix ?, on which parameters I have to work?
    I have zero skills on AI.
     
  2. DaREALMastaD

    DaREALMastaD Registered

    Joined:
    Sep 27, 2015
    Messages:
    90
    Likes Received:
    34
    You can go a couple different routes with configuring the AI. The first one I suggest is to try AI learning which is described here (Credits to MarcG)

    https://forum.studio-397.com/index.php?threads/ai-learning-step-by-step-guide.47657/

    If that doesn't fix the problem then you will have to edit the AIW which can be done in DEV mode for a specific track. This process can be more tedious and does take more time but it might be the only solution if the AI is not solved by the AI Learning. There are a few videos you can watch that relate to rFactor and they can also be applied to rFactor 2 as the AIW process hasn't changed too much.

    These videos have helped me to learn and reference back when I forget. These are rFactor videos but can be applied in the same manner as rF2.
    (Credits to Madcowie)
    Basics


    More Advanced Tweaking


    Here are some documents to help as well from the DEV Corner
    http://rfactor.net/web/wp-content/uploads/2011/05/rF2_Track_CheatSheet.pdf
    http://imagespaceinc.com/downloads/rf2/modsresources/rF2_AIW_Creation_Tutorial.pdf

    Hopefully this will get you on the path to what you're looking for.
     
    2slow4u likes this.
  3. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    Pretty hard to diagnose without seeing it but I would also add there are a.i. adjustments for driving technique in talent file. As well as a.i. physics adjustments in hdv and tbc.
     
    2slow4u likes this.
  4. 2slow4u

    2slow4u Registered

    Joined:
    Nov 28, 2011
    Messages:
    117
    Likes Received:
    11
    Thanks, but I would like to work on the car, not on the single track...
     
  5. 2slow4u

    2slow4u Registered

    Joined:
    Nov 28, 2011
    Messages:
    117
    Likes Received:
    11
    The car is "tail happy", and AI tends to loose the rear approaching the corners after the straight.
    If I add grip in the tbc file, I can fix the issue, but AI tends to become too fast.
    I thought to work on the AI parameters of the HDV file, but I do not know the parameters and don't know how they work.
     
  6. DaREALMastaD

    DaREALMastaD Registered

    Joined:
    Sep 27, 2015
    Messages:
    90
    Likes Received:
    34
    Ah got cha, I was thinking it was only at one or two tracks. I'm not sure how many tracks are specifically designed for multiple types of cars and if the AIW is configured for the global set of cars, they most likely will drive it like any other car meaning a F1 car will approach the corner the same as the skip barbers etc. You can actually create specific driving lines and approaches in the AIW for different vehicles (Page 9 in the rF2_AIW_Creation_Tutorial.pdf document) but you can try the method described by toebee if you want to try a more global fix to the AI. If you adjust those parameters though, you may find yourself adjusting other parameters to account for the extra grip (fuel usage, tire wear etc). Just things to consider when modifying the AI parameters.
     
    2slow4u likes this.
  7. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    In .HDV under [GENERAL] you can add following line (at the end of section):

    AIPerfUsage=(0.98, 0.97, 1.0) // brake power usage, brake grip usage, corner grip usage

    Edit the numbers for brake grip usage first. You can also try brake power. Like the title says, brake grip usage is the usage depending on grip. So that should be the first option.
    Also give them a working setup. What means: configure the base setup in terms of brake bias and brake pressure so that AI can work with it.
    With this line in hdv you have much more freedom in tweaking AI without altering .tbc.
    Or the other way around: you can give them more grip in .tbc, but make them slower then via AIPerfUsage.
     
    2slow4u likes this.
  8. 2slow4u

    2slow4u Registered

    Joined:
    Nov 28, 2011
    Messages:
    117
    Likes Received:
    11
    Perfect, this is exactly what I was looking for!
    Many, many thanks!
     
  9. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    If you need more adjustment I would check out this dev page. There is some good info on the current state of possible a.i. adjustments.

    https://www.studio-397.com/category/news/development/

    This particular part might be useful to adjust a.i. tail happiness.

    AIDownforceZArm=0.0
    AIDownforceBias=0.75
    In theory, these haven’t changed, but hopefully with some subtle improvements in the AI’s physics we might be able to change AIDownforceBias=0.75 to 0, which gives us a better correlation with player physics. Basically, it’s a hack to move the AI’s aerodynamic downforce distribution. AIDownforceBias 1.0 tells the game to put the aero distribution at a fixed hard-coded location, based on the weight distribution, for which AIDownforceZArm acts as an offset to. While AIDownforceBias=0.0 gives us the most human like aerodynamics. If AIDownforceBias is 0, then it’s irrelevant what you do with AIDownforceZArm, it has no effect. It can sometimes be useful as a tuning agent when AI experience either high speed understeer, or oversteer. High-speed understeer can often be cured or improved by moving downforce bias forward. If AIDownforceBias is set to 1 and AIDownforceZArm set to 0, it will place the center of downforce at the vehicles’ center of gravity. Generally race cars are designed and setup with the downforce behind the center of gravity, in the realm of 2-15% behind (with larger disparities possible in very low downforce, or positive lift vehicles). The AI may not always react perfectly to that, though as their suspension, despite improvements, remains simplified to reduce CPU utilization.
     
    2slow4u likes this.

Share This Page