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. farcar

    farcar Well-Known Member

    Joined:
    Mar 10, 2016
    Messages:
    533
    Likes Received:
    1,128
    Quick note to say thanks for this. Just tested it with ARCs and it worked perfectly.
    Should be stickied at the start of this thread as it's a valuable time-saver.
    Were you planning to update it as new content comes in?
     
  2. Romeo Foxtrot

    Romeo Foxtrot Active Member AMS2 Club Member

    Joined:
    Apr 10, 2020
    Messages:
    166
    Likes Received:
    69
    Here's my updated spreadsheet for those that prefer Excel. It's updated for the F-Retro Gen3 and F-USA Gen3 liveries. The GTS liveries, as has been noted, have duplicate names so I've just added rows for the extra drivers but the effects are unknown unless you have custom liveries.
     

    Attached Files:

    • Like Like x 2
  3. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    329
    Likes Received:
    146
    @gian

    So the first post describes consistency like that:
    • consistency: Low consistency value means the driver skill can be randomly reduced a bit
    and the latest patch has the following line:
    • Added a per-weekend based consistency personality logic for AI
    Does that mean consistency is not applied during a session but rather for a weekend? If so, how does the consistency affect the skill values exactly? i.e. 100 qualifying skill with 90/80/70 consistency gives which range exactly?
     
    Last edited: Feb 4, 2022
    • Like Like x 2
  4. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    237
    Likes Received:
    197
    AMS2 is getting ever closer to being the best sim for single player enjoyment and challenge. The AI is much improved in the latest release, but I'm still hoping there's more to come.

    Specifically, the limited incidence of overtaking is currently a big realism breaker. My guess is it's at least partly down to slipstream effects either not working optimally, or perhaps not working at all. Another issue is the apparent lack of bravery on the part of the AI, for want of a better description. They keep backing out of overtaking moves when it looks like they could get it done. In fact, I think it would be incredible if there were a customizable parameter to influence this, so that some AI drivers could manage to make more passes than others. Ideally, if the bravery factor were high, in conjunction with a lower race skill, the result would be more errors by the AI. I think if Reiza could accomplish these things, it would put the AI in a class of its own.

    So please keep going Renato & team!! It's feeling like it's getting closer and closer to excellence!
     
    • Like Like x 3
    • Agree Agree x 2
    • Winner Winner x 1
  5. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    329
    Likes Received:
    146
    I have tested this before and they definitely have slipstream, they just don't make use of it unfortunately. They often get slipstream until they almost drive into the back of the car in front, lift and lose speed and then move out of slipstream (when they obviously can't overtake anymore).

    In theory the aggression and defending values should be what you mean, it just isn't working correctly (yet).

    But AMS2 is making big steps lately, I am sure this will be solved in a few months time :)
     
    • Agree Agree x 2
    • Like Like x 1
  6. Romeo Foxtrot

    Romeo Foxtrot Active Member AMS2 Club Member

    Joined:
    Apr 10, 2020
    Messages:
    166
    Likes Received:
    69
    I've discovered the F-USA Gen 2 cars have had some of the livery_names changed.

    The Ford cars are now Ford-Cosworth and the Mercedes cars are now Mercedes-Benz as they are in the new Gen 3 cars.

    This new spreadsheet reflects the changes.
     

    Attached Files:

    • Informative Informative x 2
    • Like Like x 1
    • Agree Agree x 1
  7. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    237
    Likes Received:
    197
    I know myself well enough to admit I have a proclivity for optimism, but..... tonight, theAMS2 main release seems to have improved noticeably in terms of AI overtaking and general performance. See what you think (there was a small workshop update).
     
  8. azaris

    azaris Well-Known Member AMS2 Club Member

    Joined:
    Aug 30, 2020
    Messages:
    1,178
    Likes Received:
    584
    Workshop updates are just online ratings and have nothing to do with anything else. It's the placebo effect.
     
    • Agree Agree x 1
  9. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    237
    Likes Received:
    197
    Probably. I'd had a couple of beers, too :)
     
    • Funny Funny x 1
  10. farcar

    farcar Well-Known Member

    Joined:
    Mar 10, 2016
    Messages:
    533
    Likes Received:
    1,128
    Agree with this.

    I'm brand new to tweaking AI files, but even from my limited testing I can see with consistency that even a driver with the highest race and aggression skills can't overtake a driver with the lowest race and defensive skill.

    As a result you end up with clusters of cars where faster drivers accumulate behind slower and/or less consistent drivers. You can kind of mitigate this to a degree by adjusting quali and race start skills so that the faster drivers are more likely to get ahead from the outset. This may help with the clustering, but then the races are quite predictable.

    Having said all that, I'm hooked on the system and feel that Reiza just need to tweak the AI's ability to overtake, and they're on to a winner. To me, it feels very close.
     
    • Like Like x 2
    • Agree Agree x 2
  11. kkdrummer

    kkdrummer Well-Known Member AMS2 Club Member

    Joined:
    Jun 25, 2016
    Messages:
    1,602
    Likes Received:
    771
    I agree with everything apart from the AI being nearly there. Imo there's quite a few things to improve or implement. I.e. Defensive lines, slipstream player vs. ai and AI vs ai. The chasing AI needs to follow the car in front even when the car in front goes off the racing line on a straight.
    The AI needs to stop diving too deep into the corner when chasing the car in front. It looks unrealistic from a racing and physics stand point. The AI needs to prepare an overtake and maximise their straight line speed to complete the overtake.
    Accidents by making realistic mistakes, small things like missing the apex or big ones like a spin. Also crashes between two AIs etc.
    I believe those things will be in game when oval racing is added to Ams2. I cannot image oval racing with the AI as is. Imo it would look pretty bad and the game would be heavily critise for it.

    I don't believe I'll say that but iRacing AI is the best atm. Really awesome! I've borrowed my friend's account over the weekend, he has all cars and tracks in iRacing, to test the AI. I was blown away. Especially considering the game focus is MP.

    This video shows how good the AI is in iRacing.
     
    • Agree Agree x 5
    • Informative Informative x 1
  12. sampopel

    sampopel Active Member AMS2 Club Member

    Joined:
    Mar 31, 2020
    Messages:
    339
    Likes Received:
    150
    Completely agree about the need for the AI to make realistic mistakes. Other than occasionally crashing into each other (and the player) and their (nearly always failed) attempts to overtake each other at corners, they essentially drive like error-free bots circulating the track on rails.

    I've watched a few AI-only races and my impression is:
    • they never miss a braking point.
    • they never lose the back end, not even a little wiggle when they put down full throttle coming out of corners on some the torque monsters (which is presumably why they're much faster than the player can be when accelerating out of corners in such cars).
    • they never lose any time when driving side by side or in a bunch for lap after lap
    • even at 5x tyre-wear, I've not see any visual evidence of them losing grip. They don't appear to get any slower after 20+ laps on the same tyres and if they do eventually pitstop, it seems more because the program code tells them to rather than because they're actually losing grip or time.
    • I've never seen them having mechanical problems other than when the single-seaters crash into each other and a wing or wheel comes off.
    • The races are essentially a procession where next to nothing happens except an occasional successful overtake.
    The AI in AMS1 has all of those things. You regularly see the back-end letting go a little as they power out of corners. They miss braking points. They go off. They visibly lose grip as their tyres wear. They spin. They have mechanical/engine failures. They crash. The overtake each other.

    For offline racing against the AI, I don't see any point in having tyre-wear or damage turned on when it seems to affect only the player's car (other than single-seater crashes).

    Hopefully there are still plans to introduce fallibility to the AI because without it, the single-player modes are going to be pretty bland.
     
    • Agree Agree x 9
    • Like Like x 1
  13. stlutz

    stlutz Active Member

    Joined:
    Feb 10, 2021
    Messages:
    194
    Likes Received:
    93
    I probably disagree more than I agree. I think one the main areas of progress with the AI in recent releases has been that their pace through corners is far more likely to be correct than incorrect. Raceroom has AI that make a lot of mistakes, which does add to the immersion. But that gets ruined by the fact that every track has a corner where you can make easy passes every lap. Those don't exist in AMS2 to near the extent it does in R3E. Given a choice between AI with the proper pace and AI that makes errors, I'll take the former. Passing 4 cars in a corner is more immersion breaking.

    AI pace does deteriorate through a tire cycle. And they will pit for tires with accelerated wear.

    The other thing we forget is that most sim races we do are much shorter than real-life races. In real life, it's very common for a pass to take multiple laps to complete if the cars are relatively equal in pace. In a sim race a few laps can be a significant portion of the race. Because we're running short races, this makes it seem the AI are taking too long to pass.

    That said, I do agree that the AI too often back out of passes that they have 80% done. If you're fully alongside another car on the inside lane going into a tight corner, that car completes the pass almost all the time IRL. That doesn't happen in AMS2 currently.

    The other problem is that although AI are affected by tire wear in terms of pace, they are perfectly able to calculate how much grip they have. This is a problem in wet races in cars without TC/ABS. Especially in lightweight formula cars.

    But for me the biggest issue currently is the AI's inability to do fuel calculations. If a car holds 100L of fuel and 250L are needed to complete the race, the answer to the question, "How many pit stops do I need to make" is not 4.
     
    Last edited: Feb 8, 2022
    • Agree Agree x 3
  14. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    Quoting all the questions I found about consistency and stamina.

    Before 1.3.3.0 consistency was only on a per-lap basis and had very little effect. Stamina too.

    On 1.3.3.0, we implemented also a per-weekend basis consistency effect. Its determined upon loading of a track. This means drivers can eventually have bad weekends.

    Also the per-lap basis consistency effect now is sligthly more noticeable, the stamina effect too is slightly more noticeable.

    Both the per-weekend and per-lap consistency logic use the same driver consistency value.

    Basically, the lower the consistency value of a driver, the more skill he can lose from the consistency logic (0.0 consistency drivers may lose up to a max of 85% of his skill in the per-weekend logic. In the per-lap logic he may lose just a bit of skill.).

    We also calibrated the consistency logic to be more realistic, so the randomness is biased towards not losing too much skill, so there is a higher probability for the drivers to lose few skill than to lose much skill.
     
    Last edited: Feb 11, 2022
    • Informative Informative x 11
    • Like Like x 2
    • Winner Winner x 1
  15. Marg

    Marg Active Member

    Joined:
    Dec 7, 2021
    Messages:
    127
    Likes Received:
    49
    "On 1.3.3.0, we implemented also a per-weekend basis consistency effect. Its determined upon loading of a track. This means drivers can eventually have bad weekends." Very good! This is what's necessary, there are really drivers who can be 1st, 3rd, and... just 12th, for example.
    But somehow I did not understand are there 2 consistency values, or one (per weekend and per lap)? If two, then what is syntax in AI.xml file?
     
  16. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    Only one value, its used for both things.

    "Both the per-weekend and per-lap consistency logic use the same driver consistency value."
     
    • Informative Informative x 3
    • Like Like x 1
  17. Rodger Davies

    Rodger Davies Well-Known Member

    Joined:
    Sep 16, 2016
    Messages:
    609
    Likes Received:
    642
    Really appreciate inside and transparency like that (as well as the effect itself!), thank you
     
    • Like Like x 2
  18. F1Aussie

    F1Aussie Well-Known Member AMS2 Club Member

    Joined:
    Mar 21, 2016
    Messages:
    2,423
    Likes Received:
    673
    And another thing, they are not affected by standing water. Whilst the players car will go sideways in puddles the AI just plow through it at full throttle without even a wiggle
     
    • Agree Agree x 6
  19. stlutz

    stlutz Active Member

    Joined:
    Feb 10, 2021
    Messages:
    194
    Likes Received:
    93
    I'd broaden this out to situations where grip in general is limited. AI are very good with the F-Classic Gen 3 and the F-V10-Gen1 cars, but with the F-V12 cars, the player is sliding around a lot while the AI are pretty glued to the track.
     
    • Like Like x 1
    • Agree Agree x 1
  20. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    237
    Likes Received:
    197
    @gian, it's great that you can share more details of the AI implementation, thank you. The consistency feature seems well thought through to me. Can you provide any insights into the overtaking issues and whether there is work being done in this area as well?
     
    • Agree Agree x 2

Share This Page