The new adaptive AI

Discussion in 'General Discussion' started by Paradox Agi, Apr 18, 2016.

  1. DustySticks

    DustySticks Member

    Joined:
    Feb 8, 2017
    Ratings:
    +11 / 0 / -0
    So after you do this will the adaptive AI work with other car/track combos correctly or are you saying you need to do this for every single car/track combo?
     
  2. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Well, that post is almost a year old and contains a few errors, plus the method is a little inefficient.
    You may want to take a look here instead, or Superminis summation of it here.
    But yes, you need to train the AI for each track combo. However, they all interact meaning each combo will get up to speed faster than the one before.
    Not to mention that if you've been running against fixed AI for a given combo, you can pretty much switch to adaptive without doing anything else.
     
    • Like Like x 2
  3. DustySticks

    DustySticks Member

    Joined:
    Feb 8, 2017
    Ratings:
    +11 / 0 / -0
    Thanks appreciate the reply. It looks like on average if I'm familiar with a car/track combo the best level for me to race at is around 115.

    The issue I've had with the adaptive AI is I'll be competitive for a few races and then it starts destroying me by 2-3 seconds a lap and I have no chance to even compete for a top 10 spot.

    I'd like to keep the AI at a level where winning is very very difficult, but I'm still competing for a top 3-10 spot if I run a clean race.
     
    • Dislike Dislike x 1
  4. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Sounds like the same problem I had.
    Assuming your lap-times are consistent, what I suspect is happening is that the AAI decides it isn't competitive enough at its current level, and jumps up maybe 5 levels to find a new lap-time.
    Which is all fine and groovy, but one issue I've discovered with the AAI is that it's fairly reluctant to switch levels unless it knows where it needs to jump to.
    So, for illustration purposes, let's say you ran against the AAI at 112, and your actual level is 114. After the AAI has had a few races to collect data it decides 112 isn't quite fast enough, and jumps to 118.
    After a few races it knows that 118 is probably a little too fast, but the AAI is reluctant to move down unless it knows it can find a time closer to the true level. I'm assuming that there's an algorithm somewhere that decides how far away you have to be in order for it to switch, but that's a part of the encrypted files.
    It is fairly easy to cure though, if you don't mind looking into the index-file.
    Simply look up the combo, and find which two levels you're stuck between.
    Then you can either edit in the intervening levels, simply inserting approximate lap-times. Doesn't have to be exact, all you do is take the difference in lap-times, divide that by the number of levels and add that incrementally to the lap-times, and you're good to go.
    If you're uncomfortable with editing the index-file, you still need to look up the levels you're stuck between.
    Once you know those, run 2 lap races against fixed AI for each level missing, and the AAI will write new entries for it.
    And once it has lap-times to compare with, it's much more likely to jump to a new level.
     
  5. DustySticks

    DustySticks Member

    Joined:
    Feb 8, 2017
    Ratings:
    +11 / 0 / -0
    Pretty much this I think. I just watched the AI on different tracks last night to see what their times were. I tested levels 114-120. The AI started posting faster times than me around 117/118, so what I think what happened is the AI jumped to 120 on me, because 120 was usually on a very short track (Norisring) almost a second faster than my best lap and 1.3 faster than my average.

    I deleted my AI file last night so I'll tinker around with it over this next week when I find time to play.

    The biggest headache with the AI jumping up in speed like that for me is I found accidents were nearly unavoidable because I was unable to keep up with them and the AI was unwilling to change their lines so they would just destroy me from behind or bump me off track from the side if I was at all partially on their line.
     
  6. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Yeah, the R3E AI is very sensitive to having the correct AI level set. Something I suspect is the cause of many of the AI complaints recently.
    I've found that a 5 level spread usually does the trick.
    So any new combo, start with adaptive and let it find a lap-time.
    Next, switch to fixed AI, and jump it 5 levels up if the first was too slow, down if too fast.
    Repeat until your lap-time is somewhere between those two levels, then jump into the index-file and insert the missing levels.
    Once you have 3-4 tracks done for each class, the odds of it starting somewhere very close to your actual level are very good.
    By now, I've pretty much got it down to a science, and usually only do 4, maybe 6 laps and then it's ready to actually race.
     
  7. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    @Christian Göpfert @nate @Andi Goodwin Whoever sees this first.
    Could one of you pass a request up the line?
    Could we have the game report which AI level was used when running Adaptive AI?
    Either on-screen or in the results.txt file or whatever may be easier.
    That, combined with a tool that resets the counters in the index-file, would make it much easier to get the AAI to adapt even after major AI updates.
     
    • Like Like x 3
    • Agree Agree x 1
  8. Paul Bennett

    Paul Bennett New Member

    Joined:
    Nov 9, 2015
    Ratings:
    +3 / 0 / -0
    @CheerfullyInsane , if the Devs were working as hard as you to fix this maybe we could all have better racing. Has anyone from S3 really explained whats going on ?
     
    • Dislike Dislike x 1
  9. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Yep, they have.
    I'm still trying to figure out the practical applications though. :D
     
    • Like Like x 1
  10. Andi Goodwin

    Andi Goodwin Moderator Beta tester

    Joined:
    Jan 16, 2015
    Ratings:
    +791 / 0 / -0
    nice muppet post ,
    How do you know the devs arent working hard on it ? i personally spent over 4O+ hrs driving around in circles with various tracks and cars , to get data for it ...;

    maybe what you should ask is "what can i do to help " : if not , its over there your rock

    Andi
     
    • Winner Winner x 2
  11. Mr_Mints_Taboo

    Mr_Mints_Taboo Well-Known Member

    Joined:
    Jan 19, 2017
    Ratings:
    +152 / 0 / -0
    [​IMG]

    I guess we have to accept you as an expert.:D

    Apart from the new tracks and cars and tweaking the AI and Multiplayer Ranking system, the return of car packs and probably DX11 advances, what ARE the Devs doing for us?*

    *I'm too lazy to look it up on either the regular roadmaps or patch notes.
     
  12. Paul Bennett

    Paul Bennett New Member

    Joined:
    Nov 9, 2015
    Ratings:
    +3 / 0 / -0

    Thanks for your help in solving this issue maybe do another 40 hours driving an you'll have it cracked !
     

    Attached Files:

  13. Mr_Mints_Taboo

    Mr_Mints_Taboo Well-Known Member

    Joined:
    Jan 19, 2017
    Ratings:
    +152 / 0 / -0
    That's Andi treating your post with the attention it deserves......
     
  14. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    It is perhaps also worth mentioning that I'm not doing anything exactly.
    All I'm doing is reverse-engineering something that others have already made.
    Plus I get to focus on only that, as I want and when I want. Nor do I have any deadlines to meet or any financial consequences should I fail.
    And if an angry mob should materialize asking why I haven't done this or that, and why progress isn't instantaneous, I can calmly tell them to STFU and no-one will object.

    So....
    People may want to ease up on the devs a bit. :)
     
    • Agree Agree x 3
  15. Kevin Baird

    Kevin Baird Member

    Joined:
    Jan 31, 2017
    Ratings:
    +10 / 0 / -0
    Hi.
    I checked in the locations suggested to find the adaptation.xml and I don't have one to delete?
     
  16. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Documents\My Games\SimBin\RaceRoom Racing Experience\UserData\Player1
    And the file name is aiadaptation.xml.

    Although it only gets generated once you actually race against the AI.
     
  17. Kevin Baird

    Kevin Baird Member

    Joined:
    Jan 31, 2017
    Ratings:
    +10 / 0 / -0
    Ah, I'm sorry, I thought it was generated in a practice session, that's why its not there.
    Thank you
     
  18. Supermini

    Supermini Member

    Joined:
    Mar 31, 2016
    Ratings:
    +21 / 0 / -0
    Brought peace?
     
    • Love it! Love it! x 1
  19. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Yeah, but it's the wrong colour. :D
     
    • Funny Funny x 1
  20. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Okay guys, I need some help with this one.
    Some may remember that @pixeljetstream created the Adaptive AI database tool for people to find and insert the 'right' AI levels for each user.
    The database was actually coming along rather nicely, and then the AI got updated making the whole thing moot.

    I've still been using it though, mainly to keep track of which combos I've already trained.
    Which means I've got a fairly decent sample-base for the new AI........
    So that got me curious as to whether you can actually extrapolate data from a single user, and still get decent results.
    And in order to test that, I need other people to run races using the lap-times generated by my AI.

    So the task is fairly simple; attached is a HTLM list of the combos I've got this far.
    Mainly GTR3 since everyone and their sister seems to run them, plus they can carry over to the GT Masters classes.
    What you do is take your average lap-time, find it in the table and run a race or two against fixed AI at the corresponding level.
    If you're unsure of your average lap-time, use your fastest lap-time, and then back the AI level off by maybe 3 levels.
    (Don't worry if you're already running Adaptive, this won't affect your database)
    After that, simply post back here whether the AI setting was close enough to race, or complete rubbish.

    If it works, it's a simple task to upload the new database and assets files, and people can go back to using the tool to insert appropriate lap-times.
     

    Attached Files:

    • Like Like x 1