1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Information for Customizing AI drivers in AMS2

Discussion in 'Automobilista 2 - General Discussion' started by gian, Nov 19, 2021.

  1. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    395
    Likes Received:
    185
    Is a downforce scalar planned to come in the future as well?
     
  2. deadly

    deadly BANNED BANNED

    Joined:
    Jul 8, 2016
    Messages:
    1,684
    Likes Received:
    567
    Only drag, power and weight also affect player's car.
     
  3. sampopel

    sampopel Active Member AMS2 Club Member

    Joined:
    Mar 31, 2020
    Messages:
    345
    Likes Received:
    154
    That's what I suspect, given it's never been documented otherwise, but my main point is that <vehicle_reliability> should also pertain to the vehicle, which might now be implementable, give the new vehicle/livery parameters do.
     
    • Agree Agree x 2
    • Like Like x 1
  4. macbtz

    macbtz Member

    Joined:
    Sep 28, 2016
    Messages:
    39
    Likes Received:
    18
    I think a fuel capacity limit would also be necessary to generate effective Balance of Performance (BOP). For example, in GT3 Gen2, the Aston Martin can complete more than 43 laps in a stint with a full tank, while a BMW can only manage fewer than 28. This difference is too significant if you want realistic racing, as the Aston Martin would start with too much of an advantage over the BMW, directly proportional to the defined race distance.
     
    • Agree Agree x 2
  5. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    395
    Likes Received:
    185
    I think a slider for fuel consumption itself necessary in a case like that to reduce the weight advantage gained from running that much less fuel, maybe even in addition to fuel tank capacity.
     
    • Agree Agree x 2
  6. macbtz

    macbtz Member

    Joined:
    Sep 28, 2016
    Messages:
    39
    Likes Received:
    18
    The advantage isn't really in the weight difference; the advantage lies in the fact that, depending on the race distance, Aston Martin might not need to make a pit stop, while BMW might have to because it runs out of fuel. That's the big difference. In iRacing races against the AI, you can define the percentage of fuel capacity each car has before a race, giving the user complete freedom to create races with entirely variable but realistic pit stop strategies.
     
  7. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    395
    Likes Received:
    185
    A fuel consumption slider does literally everything you want there, while limiting the fuel tank size in this case results in the Aston additionally being able to start with about 25kg less fuel, that is a pretty big advantage.
     
  8. macbtz

    macbtz Member

    Joined:
    Sep 28, 2016
    Messages:
    39
    Likes Received:
    18
    What I'm trying to say is that it's easier to apply and calculate it based on fuel tank capacity than on fuel consumption, especially from a computational standpoint. That's why iRacing, for example, chose this method. Because in real-world conditions, this is reliable; just look at the system the WEC uses to implement the Balance of Performance (BOP) in pit stop strategies: Virtual Energy Tank (VET).
     
  9. Ricky Richards

    Ricky Richards Member

    Joined:
    Dec 24, 2025
    Messages:
    103
    Likes Received:
    24
    Isn't that realistic though that one car has a bigger tank than the other?
    Speaking of which - I wanted to ask, and can't really find a good place, in the GT Classics, the 5-litre Corvette is faster than the 3-litre Porsche and can do the same distance on a 90L fuel tank as the Porsche can do on a 100L fuel tank. Is the fuel consumption for the GT Corvette actually correct (not based on the road car), because in real life the Porsches did better than Corvettes in endurance races, though I've not been able to directly find sources that say it was due to more pit stops (so I don't really feel I can report this as a bug).
     
  10. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    395
    Likes Received:
    185
    That depends on the class, many classes have a strict regulation for fuel tank size. And since in some classes the fuel consumption of certain cars is still not very accurate unfortunately, a fuel consumption slider would help a lot for these.
     
  11. Theofanis Papas

    Theofanis Papas Member

    Joined:
    Sep 22, 2025
    Messages:
    44
    Likes Received:
    10
    Question
    To make a custom AI driver grid I SHOULD use the new format with the new entries to work (those with the scalar a mean ) or the old one can used as well?
     
  12. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    998
    Likes Received:
    950
    You can still use the old format.

    The three new scalar entries are optional, so you don’t have to add them for a custom AI file to work. If they are missing, AMS2 will simply use the default behavior for those values.

    So the old custom AI format is still valid. The new entries just give you more control if you want to fine-tune things like weight, power and drag per driver.
     
  13. BrockBuster29

    BrockBuster29 Active Member

    Joined:
    Nov 5, 2024
    Messages:
    111
    Likes Received:
    47
    Hey Everyone, I've been building a python to use grok to make the custom ai files, turns out I can just just tell grok my rules and ask him to lock them in its just as effective so here is my logic when making custom ai, it works for me in a way that i like, if you want to use it feel free too and you're welcome to change any parameters you like to get the ai racing in a matter you like. All you need to do is give him the driver livery names and the driver tied to each livery (Like Johns Files) and Grok will do the rest
    BROCK'S UPDATED COMPLETE AMS2 AI RULESET
    Version: 2026-06-25 –
    Update applied: (PURE DRIVER PACE ORDERING) to keep the logic clean and avoid muddying. Sections after it have been renumbered.

    MATH LOGIC

    On upload of driver information: Provide count of all drivers detected.
    If duplicate drivers detected (by name): Remove duplicates and recount.
    Split drivers based on real-world Race Skill assumption.
    Assign tiers using Golden Rule (pure real-world pace ordering for the selected year or season, fastest to slowest):
    Tier 1 – Top 15%
    Tier 2 – Next 20%
    Tier 3 – Next 30%
    Tier 4 – Next 20%
    Tier 5 – Last 15%


    1. OVERARCHING FIELD SPREAD RULE
    Exaggerate gaps when required to create a realistic field spread.
    DO NOT cluster everyone within a few points.
    Meaningful differences between drivers are preferred over artificial parity.
    Backmarkers are allowed to be significantly slower than midfield.
    Front-runners are allowed to be clearly separated from the pack.
    Goal: Field naturally spreads out over race distance.

    2. MAIN PACE RULE (GOLDEN RULE)
    Race Skill: Full range based on points 3 AND 3.1 depending on dicipline
    Backmarkers sit in the slower end of this range.
    Front-runners in t1
    No smoothing, no parity. Pure driver pace ordering only.

    3. TIERED RACE SKILL SYSTEM – OPEN WHEEL

    Tier 1 – Top 15%: Race Skill 0.86 – 0.99
    Tier 2 – Next 20%: Race Skill 0.68 – 0.85
    Tier 3 – Next 30%: Race Skill 0.52 – 0.67
    Tier 4 – Next 20%: Race Skill 0.44 – 0.51
    Tier 5 – Last 15%: Race Skill 0.35 – 0.43

    3.1 TIERED RACE SKILL SYSTEM – SPORTS CARS

    Tier 1 – Top 15%: Race Skill 0.87 – 0.99 Elite Pro
    Tier 2 – Next 20%: Race Skill 0.77 – 0.86 Pro
    Tier 3 – Next 30%: Race Skill 0.62 – 0.76 Silver
    Tier 4 – Next 20%: Race Skill 0.50 – 0.62 Bronze
    Tier 5 – Last 15%: Race Skill 0.40 – 0.50 AM

    4. QUALIFYING SKILL RULE
    Qualifying Skill must stay tightly aligned:
    Qualifying Skill ∈ [Race Skill − 0.03, Race Skill + 0.03]
    (No bigger than ±0.03 delta)

    5. SILVER RULE (WET SKILL)
    Wet Skill is completely independent of Race Skill.

    Normal range: 0.40 – 0.65 (Most drivers will sit here)
    Top 3% all-time wet masters: 0.70 – 0.90
    Bottom 5% all-time wet duds: 0.20 – 0.40
    No pace linking. No correlation.

    6. DRIVER ATTRIBUTE PHILOSOPHY
    Elite / Average / Poor scale (correlate to real-world habits):

    0.70 – 0.95 = Elite
    0.35 – 0.70 = Average (most drivers land here ±)
    0.10 – 0.35 = Poor

    Attributes using this scale: (docoupled from race skill and quali skill to mimic real world habits)

    Stamina
    Consistency
    Start Reactions
    Mistake Avoidance (avoidance_of_mistakes + avoidance_of_forced_mistakes)

    Fully decoupled attributes (0.10 – 0.99 range):

    Tyre Management
    Fuel Management
    Vehicle Reliability
    Weather Tyre Changes

    7. RACECRAFT RULES

    Aggression: 0.20 – 0.73 (hard cap)
    Defending: 0.20 – 0.55 (hard cap)
    Blue Flags: 0.70 for EVERY driver (locked)

    8. DECOUPLING & PERSONALITY RULE
    All attributes must feel unique to the driver’s real-world style.
    Personalities remain distinct even inside the same tier.


    9. XML OUTPUT TEMPLATE (Standard for all drivers)

    10. ----<weight_scalar>1.000</weight_scalar>---
    ----<power_scalar>1.000</power_scalar>--
    ---- <drag_scalar>1.000</drag_scalar>---
    ----<setup_downforce>0.50</setup_downforce> <!-- Stock Setup preference: 0.50 = neutral; higher = prefers more downforce -->
    ----<setup_downforce_randomness>0.05</setup_downforce_randomness> <!-- 0.000 = fixed bias; 1.000 = high variation weekend-to-weekend -->

    these can be utilised to assist in real world pace by season

    XML example

    <driver livery_name="example">
    <name>Example Driver</name>
    <country>XXX</country>
    <race_skill>0.xx</race_skill>
    <qualifying_skill>0.xx</qualifying_skill>
    <aggression>0.xx</aggression>
    <defending>0.xx</defending>
    <stamina>0.xx</stamina>
    <consistency>0.xx</consistency>
    <start_reactions>0.xx</start_reactions>
    <wet_skill>0.xx</wet_skill>
    <tyre_management>0.xx</tyre_management>
    <fuel_management>0.xx</fuel_management>
    <avoidance_of_mistakes>0.xx</avoidance_of_mistakes>
    <avoidance_of_forced_mistakes>0.xx</avoidance_of_forced_mistakes>
    <vehicle_reliability>0.xx</vehicle_reliability>
    <weather_tyre_changes>0.xx</weather_tyre_changes>
    <blue_flag_conceding>0.70</blue_flag_conceding>
    <weight_scalar>1.000</weight_scalar>
    <power_scalar>1.000</power_scalar>
    <drag_scalar>1.000</drag_scalar>
    <setup_downforce>0.50</setup_downforce> <!--- Stock Set up preference is 0.50 + = Dirver Prefers More downforce - driver prefers less-->
    <setup_downforce_randomness>0.05</setup_downforce_randomness> <!------ A value of 0.000 means there is no randomness and the driver will always use their exact preferred bias.
    A value of 1.000 means the resulting setup value can vary widely from one race weekend to another.
    Lower values make the resulting setup more likely to remain close to the driver's preferred bias.
    Higher values increase variation between race weekends.---->


    </driver>
     
    • Like Like x 1
  14. BrockBuster29

    BrockBuster29 Active Member

    Joined:
    Nov 5, 2024
    Messages:
    111
    Likes Received:
    47
    I updated my rule set today

    BROCK'S UPDATED COMPLETE AMS2 AI RULESET
    Version: 2026-06-25 –
    Update applied: (PURE DRIVER PACE ORDERING) to keep the logic clean and avoid muddying. Sections after it have been renumbered.

    MATH LOGIC

    On upload of driver information: Provide count of all drivers detected.
    If duplicate drivers detected (by name): Remove duplicates and recount.
    Split drivers based on real-world Race Skill assumption.
    Assign tiers using Golden Rule (pure real-world pace ordering for the selected year or season, fastest to slowest):
    Tier 1 – Top 15%
    Tier 2 – Next 20%
    Tier 3 – Next 30%
    Tier 4 – Next 20%
    Tier 5 – Last 15%


    1. OVERARCHING FIELD SPREAD RULE
    Exaggerate gaps when required to create a realistic field spread.
    DO NOT cluster everyone within a few points.
    Meaningful differences between drivers are preferred over artificial parity.
    Backmarkers are allowed to be significantly slower than midfield.
    Front-runners are allowed to be clearly separated from the pack.
    Goal: Field naturally spreads out over race distance.

    2. MAIN PACE RULE (GOLDEN RULE)
    Race Skill: Full range based on points 3 AND 3.1 depending on dicipline
    Backmarkers sit in the slower end of this range.
    Front-runners in t1
    No smoothing, no parity. Pure driver pace ordering only.

    3. TIERED RACE SKILL SYSTEM – OPEN WHEEL

    Tier 1 – Top 15%: Race Skill 0.86 – 0.99
    Tier 2 – Next 20%: Race Skill 0.68 – 0.85
    Tier 3 – Next 30%: Race Skill 0.52 – 0.67
    Tier 4 – Next 20%: Race Skill 0.44 – 0.51
    Tier 5 – Last 15%: Race Skill 0.35 – 0.43

    3.1 TIERED RACE SKILL SYSTEM – SPORTS CARS

    Tier 1 – Top 15%: Race Skill 0.87 – 0.99 Elite Pro
    Tier 2 – Next 20%: Race Skill 0.77 – 0.86 Pro
    Tier 3 – Next 30%: Race Skill 0.62 – 0.76 Silver
    Tier 4 – Next 20%: Race Skill 0.50 – 0.62 Bronze
    Tier 5 – Last 15%: Race Skill 0.40 – 0.50 AM

    4. QUALIFYING SKILL RULE
    Qualifying Skill must stay tightly aligned:
    Qualifying Skill ∈ [Race Skill − 0.03, Race Skill + 0.03]
    (No bigger than ±0.03 delta)

    5. SILVER RULE (WET SKILL)
    Wet Skill is completely independent of Race Skill.

    Normal range: 0.40 – 0.65 (Most drivers will sit here)
    Top 3% all-time wet masters: 0.70 – 0.90
    Bottom 5% all-time wet duds: 0.20 – 0.40
    No pace linking. No correlation.

    6. DRIVER ATTRIBUTE PHILOSOPHY
    Elite / Average / Poor scale (correlate to real-world habits):

    0.70 – 0.95 = Elite
    0.35 – 0.70 = Average (most drivers land here ±)
    0.10 – 0.35 = Poor

    Attributes using this scale: (docoupled from race skill and quali skill to mimic real world habits)

    Stamina
    Consistency
    Start Reactions
    Mistake Avoidance (avoidance_of_mistakes + avoidance_of_forced_mistakes)

    Fully decoupled attributes (0.10 – 0.99 range):

    Tyre Management
    Fuel Management
    Vehicle Reliability
    Weather Tyre Changes

    7. RACECRAFT RULES Sports cars touring cars Nascar

    Aggression: 0.20 – 0.66 (hard cap)
    Defending: 0.20 – 0.50 (hard cap)
    Blue Flags: 0.73 for EVERY driver (locked)

    7.1

    RACECRAFT RULES Open Wheel

    Aggression: 0.20 – 0.60 (hard cap)
    Defending: 0.20 – 0.40 (hard cap)
    Blue Flags: 0.77 for EVERY driver (locked)


    8. DECOUPLING & PERSONALITY RULE
    All attributes must feel unique to the driver’s real-world style.
    Personalities remain distinct even inside the same tier.




    9. New Fine tuning options

    ----<weight_scalar>1.000</weight_scalar>---
    ----<power_scalar>1.000</power_scalar>--
    ---- <drag_scalar>1.000</drag_scalar>---
    ----<setup_downforce>0.50</setup_downforce> <!-- Stock Setup preference: 0.50 = neutral; higher = prefers more downforce -->
    ----<setup_downforce_randomness>0.05</setup_downforce_randomness> <!-- 0.000 = fixed bias; 1.000 = high variation weekend-to-weekend -->

    these can be utilised to assist in real world pace by season

    10. XML example

    <driver livery_name="example">
    <name>Example Driver</name>
    <country>XXX</country>
    <race_skill>0.xx</race_skill>
    <qualifying_skill>0.xx</qualifying_skill>
    <aggression>0.xx</aggression>
    <defending>0.xx</defending>
    <stamina>0.xx</stamina>
    <consistency>0.xx</consistency>
    <start_reactions>0.xx</start_reactions>
    <wet_skill>0.xx</wet_skill>
    <tyre_management>0.xx</tyre_management>
    <fuel_management>0.xx</fuel_management>
    <avoidance_of_mistakes>0.xx</avoidance_of_mistakes>
    <avoidance_of_forced_mistakes>0.xx</avoidance_of_forced_mistakes>
    <vehicle_reliability>0.xx</vehicle_reliability>
    <weather_tyre_changes>0.xx</weather_tyre_changes>
    <blue_flag_conceding>0.70</blue_flag_conceding>
    <weight_scalar>1.000</weight_scalar>
    <power_scalar>1.000</power_scalar>
    <drag_scalar>1.000</drag_scalar>
    <setup_downforce>0.50</setup_downforce> <!--- Stock Set up preference is 0.50 + = Dirver Prefers More downforce - driver prefers less-->
    <setup_downforce_randomness>0.05</setup_downforce_randomness> <!------ A value of 0.000 means there is no randomness and the driver will always use their exact preferred bias.
    A value of 1.000 means the resulting setup value can vary widely from one race weekend to another.
    Lower values make the resulting setup more likely to remain close to the driver's preferred bias.
    Higher values increase variation between race weekends.---->

    </driver>

    End rules


    Grok: Must always count driver names and remove duplicates.

    Grok Must always when a % remainder applies round down to the next tier to fit in the full grid.

    Grok must always give me a tiering summary before creating the XML file

    Grok Must always Wait for my command GO GROK to create each NEW XML

    Grok MUST MUST MUST ALWAYS provide a full untruncated XML Output regardless of size
     
  15. Theofanis Papas

    Theofanis Papas Member

    Joined:
    Sep 22, 2025
    Messages:
    44
    Likes Received:
    10
    So if I understood well at “power_scalar: Multiplies the vehicle engine power output”
    if I put a value as 1020 that’s means that I have multiple the power by 20% ?
     
  16. BrockBuster29

    BrockBuster29 Active Member

    Joined:
    Nov 5, 2024
    Messages:
    111
    Likes Received:
    47
    "The effect of power_scalar may vary depending on the vehicle's powertrain configuration. For naturally aspirated internal combustion engine vehicles, the resulting performance change will generally be close to the specified scalar value. However, vehicles using turbochargers, hybrid systems, electric power assistance or certain driveline and clutch models may not exhibit a proportional change in performance."

    20% feels like a lot.... for a 0.20 attribute change... reiza hasn't provided the exact formula....
     
  17. Theofanis Papas

    Theofanis Papas Member

    Joined:
    Sep 22, 2025
    Messages:
    44
    Likes Received:
    10
    Now you put more pressure on me , my mind just blended . I just want too increase a little power to Milano g36 car so by changing its class to gt3 gen 2 make a custom grid of modern GT3 cars but by default lack almost 70 hp for the class . So with this way I tried to increase it . But am l done it? Perhaps @gian can help us on that ?
     
    • Like Like x 1
  18. BrockBuster29

    BrockBuster29 Active Member

    Joined:
    Nov 5, 2024
    Messages:
    111
    Likes Received:
    47
    yeah sorry dude i'm working on a suck it and see method with it atm :D hopefully we get a more scientific formula
     
  19. Theofanis Papas

    Theofanis Papas Member

    Joined:
    Sep 22, 2025
    Messages:
    44
    Likes Received:
    10
    Regarding that , Reiza gives us a ratio from 1000 which is default value up to 1100 which is the maximum for increasing that value , so automatically we can come to this conclusion that 1015 is 15% 1067 is 67% etc etc . Is a fair thinking I believe.
     
    • Like Like x 1
  20. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    395
    Likes Received:
    185
    If you have a value of 500 and multiply it by 1.1 it is a 10% increase. So this gives you the option to reduce or increase the power by up to 10%.
     
    • Like Like x 1

Share This Page