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

Question for Devs: Automatic Performance-based AI Difficulty

Discussion in 'General Discussion' started by Shovas, Oct 28, 2019.

  1. Shovas

    Shovas New Member

    Joined:
    Oct 28, 2019
    Messages:
    4
    Likes Received:
    2
    Have you considered a system that would intelligently set AI difficulty based on actual performance data from practice and/or qualifying sessions and instantly set that for the next session, whether that is qualifying or the race?

    My experience with RaceRoom Racing Experience Auto AI has always been frustrating. I want it to adjust every single lap I run, or at least for the next prac/qual/race session, but the current system only adjusts for the next race, if I'm not mistaken. That's a lot of junk races to get the right AI level and it still won't be right for the next track because AI level for one track doesn't mean much for another track.

    The main technical problem with AI Difficulty levels is that they are not granular enough to ensure close driving. AI are either getting ahead of you more and more or falling behind more and more.

    I've been investigating a simple idea for a straightforward laptime-based calculation that would adjust AI difficulty instantly to a given laptime, your best practice or qualifying laptime, for example.

    You can see some discussion, details, notes, spreadsheets, etc. over here:

    How to find the right AI level without trying them all? - Latest Formula 1, Motorsport, and Sim Racing News

    How to find the right AI level without trying them all? - Latest Formula 1, Motorsport, and Sim Racing News

    It's basic and my investigation is sophomore at best but I don't think I'm wrong that a simple formula based on actual performance could provide competitive, hard-fighting, clean-driving AI (I know it can from experience when I get the numbers just right).

    The formula simply adjusts AI laptimes to suit a given grid position. Do you want to compete for top spot then plug in the #1 Practice AI's laptime and adjust is up or down to meet your own best laptime. Do you want a good top 5 battle? Adjust to AI #5's laptime. And so on. You could even plug in a fuzziness to it to avoid always ending up in a certain grid position.

    My work has been with GTR2 and playing with low-level config file AI params that have more granularity than AI Difficulty levels. Those params follow a logarithmic or similar curve, unfortunately, that I need to map out for different AIs across different cars across different tracks. It's super tedious but I'm confident such a system could be automated if implemented in-game with all the data at hand in the code as you are running a race day.

    I've been trying this on and off for a year or two and when the numbers work out the AI are incredible to drive against, even in a 2006 game like GTR2, but so far it has been relative guess-work due to the unknowns in the AI performance curves.

    Thanks for taking a look. I'd love to hear your input.
     
    • Winner Winner x 2
    • Like Like x 1
  2. 88mphTim

    88mphTim New Member Reiza Backer

    Joined:
    Oct 1, 2019
    Messages:
    4
    Likes Received:
    1
    I totally agree with this, really it's something I'd love to see in way more sims just for the sake of gameplay. I just recently saw a really good working example of this with KartKraft. If you put the AI on adaptive they run to match your sector times and it just provides THE best racing. The most difficult AI setting is too slow as well, adaptive was faster once I put in a few laps.
     
    • Like Like x 1
  3. Salvatore Sirignano

    Salvatore Sirignano Active Member Reiza Backer

    Joined:
    Sep 14, 2017
    Messages:
    108
    Likes Received:
    54
    I don't think it's a good idea really. A percentage slider is enough I feel. In AMS you have a slider that goes between 70-120%, and which pretty much catches the whole variation of human ability, I think that's enough.
    Speaking of which, humans are not consistent! Having AI that rubber band, or speed up or slow down according to my varying sector times sounds dreadful to be honest, like a fix for people that want to win all the time but don't want to put in the effort to really learn a track or master a car... On some tracks I'm not as quick, so I'll finish in the midfield rather than the podium - so what? Such is life, racing against humans is the same.
    What is important is that the AI can slipstream overtake(they can't in GTR2… ) and take all the corners at correct racing speed, scaled according to the difficulty setting.
     
    • Agree Agree x 6
    • Like Like x 1
  4. Msportdan

    Msportdan Well-Known Member Reiza Backer

    Joined:
    Mar 8, 2016
    Messages:
    1,212
    Likes Received:
    287
    Agree they need better race craft like attack defend maneuvers. Then the challenge will come. Not just giving them more corner grip or brake power
     
  5. Shovas

    Shovas New Member

    Joined:
    Oct 28, 2019
    Messages:
    4
    Likes Received:
    2
    This is interesting I'll have to give that game a try.

    Are they rubber-banding, like updating AI strength even in races?

    My idea is get players to practice or qualify and then calculate a fixed AI difficulty based on their actual realistic performance level.
     
  6. Shovas

    Shovas New Member

    Joined:
    Oct 28, 2019
    Messages:
    4
    Likes Received:
    2
    While you're right that the traditional sliders cover the whole range, it's common-knowledge that finding the right AI level has been a problem forever. That's why RaceRoom and KartKraft and maybe others try to do some automatic calculation of it.

    I'm not suggesting rubber-banding, though. My idea is run a practice or qualify then calculate a fixed difficulty for the race based on your actual realistic performance.
     
    • Like Like x 1
  7. Apolo27

    Apolo27 New Member Reiza Backer

    Joined:
    Oct 21, 2019
    Messages:
    8
    Likes Received:
    5
    You have done a fantastic job for years, congratulations.Although I think that Ai de ams is one of the best, I play 95% and it is incredible to see that after the first 7/8 classification we barely get a tenth of a difference, and the races are super competitive, Still your work is fantastic, congratulations again
     
  8. 88mphTim

    88mphTim New Member Reiza Backer

    Joined:
    Oct 1, 2019
    Messages:
    4
    Likes Received:
    1
    No I didn't notice them actually speeding up, it just felt natural. In fact there was an update (it's still early access) where they deleted previous laptimes and by the end of the first race they were on my pace. I assume it uses a 'best possible lap' to set the AI, but they were still beatable somehow. Maybe they set it to 99% of best possible or something lol

    On the hardest setting (which I assume would be over 100% in most sims) they were way too slow for me, especially under braking.
     

Share This Page