AI Behavior

Discussion in 'General Discussion' started by Frost, Sep 16, 2019.

  1. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +736 / 0 / -0
    "AI lies in the eye of the beholder."

    And in my eyes it shines when driving those cars that I drive.
     
    • Agree Agree x 1
  2. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +300 / 0 / -0
    Rude but fitting I think, I won't be apologising.

    I also bought the game, all the content in the game I own and pay for myself.

    You are by far the most vocal on this subject and we've already seen from your videos you can't drive anyway.

    The reason AI is constantly being worked on is because all of the game is constantly being worked on. Every change in physics has a knock on effect on everything else.
     
    • Like Like x 2
    • Agree Agree x 2
    • Disagree Disagree x 1
    • Winner Winner x 1
  3. Alex Hodgkinson

    Alex Hodgkinson Sector3 Developer

    Joined:
    Jun 5, 2017
    Ratings:
    +1,187 / 0 / -0
    Improvements being worked on ;)

     
    • Like Like x 9
    • Informative Informative x 1
  4. Nano 10

    Nano 10 Member

    Joined:
    Apr 29, 2018
    Ratings:
    +8 / 0 / -0
    It generates a lot of hope for this improvement, they definitely have to continue on that path.

    The game becomes challenging, with normal aggression, but greatly improved especially at the braking points, now the bots brake similar to the player and then accelerate normal, not as torpedoes.

    The best example is the minutes 8.41 to 8.46 today is sure shock, now the bot has more awareness.

    Congratulations Alex, very good work.
     
  5. RoccoTTS

    RoccoTTS Well-Known Member

    Joined:
    Mar 2, 2017
    Ratings:
    +422 / 0 / -0
    Am i correct when i see new liveries for this car from Porsche Carrera Cup Deutschland ?
    Look at 10:07 and you can clearly see this car :
    [​IMG]
    It's the same car with same nr 93 but with other driver name.
    I also see on the position bar at the top a few cars without a driver name, one of them is this 93 car.
     
    • Like Like x 2
    • Informative Informative x 1
  6. J-F Chardon

    J-F Chardon Sector3 Producer Developer

    Joined:
    Jan 15, 2015
    Ratings:
    +4,383 / 0 / -0
    Plenty of liveries in dev builds that are for teams, drivers or were just made for fun as a hobby and it doesn't mean they end up in the game.
     
    • Informative Informative x 3
  7. Patrick Schilhan

    Patrick Schilhan Well-Known Member

    Joined:
    Mar 5, 2015
    Ratings:
    +891 / 0 / -0
    [​IMG]
     
  8. Jake Fangio

    Jake Fangio Member

    Joined:
    Jun 14, 2015
    Ratings:
    +22 / 0 / -0
    The job of a moderater,is to calm things down. Not light thing's up.
     
  9. Frost

    Frost Member

    Joined:
    Sep 14, 2019
    Ratings:
    +6 / 0 / -0
    Wow Alex, that looks like great racing and really balanced AI behavior. Cannot wait for that. Really happy to see that work is being done to make improvements to the AI.

    So how exactly does the Adaptive AI work? I am currently doing an F3 Championship with Adaptive AI, the AI have a pretty big advantage on corner exit, they are actually pretty good on the brakes. Very tough for me to make up time on the brakes in F3 compared to GT3. Really love the F3 Series, the cars feel amazing. The AI behavior is not so bad, just the corner exit advantage, like I have a full fuel load compared to them. Still a great racing sim, cannot wait for an AI update like in the youtube video.
     
  10. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +336 / 0 / -0
    You mean how does it adapt?
    Basically it picks an AI level, then after the race it compares the average of the players last 10 laps to the average of the AI grids fastest laps. It then adjusts the AI level up or down as needed for the next race.
    How much depends on how big the difference between the two averages were, usually anything between 2-8 levels.
    There's a bit more to it than that since some laps are discarded, and it also 'borrows' average times from other car/track combos when needed, but that's about the gist of it.

    Three things to take note of:
    1) The more races you do, the faster the AAI will adapt.
    2) It only adapts BETWEEN races, never DURING races.
    3) Since it works on averages, when racing the AAI consistency is far more important than outright pace.
     
    • Like Like x 1
  11. anno900

    anno900 Member

    Joined:
    Dec 27, 2018
    Ratings:
    +11 / 0 / -0
    Hi CheerfullyInsane
    You are doing quite a lot about testing and informing others about AAI works. Thanks for your work.
    Since I'm also an offline racer (just doing championships against AI) I have also experienced some "non-logic" things about AAI. A little bit hard to explain but I try, maybe you have made the same experience.
    I did a championship with GT3 and Nürburgring GP Layout was part of that. I have been driving this track quite a lot in many championships (mainly GT3). The race was as expected. Close racing AI was up to my speed (so quite good adapted).
    After finishing this champoinship I started another one also with Nürburgring GP layout as round 3 I think also GT3s. On previous round I had a quite bad round. But I was very locking forward to Nürburgring and to close racing again. But what happened... I was way more quicker than AI. What I understand (also based on what CheerfullyInsane potest in tis and other communities) is that track/car combo makes an entry in the AIadaption file. But from my experience also the race before influences AI level on next race. This is quite odd I think, cause I have been driving Nürburgring so often (and some oth tracks as well) that the previous round in a championship should not influence my AAI at those tracks. I think that is impossible to program, cause what to do for a beginner.
    In short:
    I got back to fix AI level. The disadvantage there is, of course, that I cannot drive any track on same level, so at some tracks I can win quite easily, at some I battle for podium, at some I battle for nohting and at some I'm way behind AI.
    That are my experiences about AAI and in the end I came to the conclusion that fix AI for me is works better.
     
  12. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +336 / 0 / -0
    Both are true. The entries in the index-file are made for each AI level you have run for that particular combo (both fixed and AAI).
    However, since these entries are compared to the last 10 laps the player has done, the race before will affect the coming race.
    There has been an improvement since the AAI now disregards any lap more than 3% off the average time, but it is still possible for the AAI to be lowered significantly if you have a series of really bad laps.
    Which is why I stated that when racing the AAI consistency is more important than pace.

    For me it's not that big of a deal, but then I'm pretty consistent.
    My problem is that I'm consistently slow, but hey you can't have everything. :D
    IMO, the advantages of using AAI far outweighs the possible variation you might get in pace.
    But as always, YMMV.
    The AAI isn't the all-singing, all-dancing savior of all the is AI racing. It's what I prefer, and it's pretty damn good but just like using fixed AI, there are some things you need to be aware of.
     
  13. anno900

    anno900 Member

    Joined:
    Dec 27, 2018
    Ratings:
    +11 / 0 / -0
    thx a lot CheerfullyInsane,
    another maybe stupid question. How does sector3 meter what 100% AI strength per track per car is. Do they use lap times IRL and then try to get as close as possible? Or does it come "self learing" yb the paramteres that are used in the game.
    Hard to explain what I mean as a non native English speaker.
    Anyway. Maybe with my next championship I try AAI gain. When was this 3% off average time change. Last few weeks or longer before. Cause I experienced my above described situation with Nürburgring about 2-3 month ago.
     
  14. Andi Goodwin

    Andi Goodwin Moderator Beta tester

    Joined:
    Jan 16, 2015
    Ratings:
    +458 / 0 / -0
    the job of a moderater is , to be honest

    sometimes we get involved personally due to the subject matter , and as someone who spends his entire time , testing and feeding back on the ai as a beta tester , i may be a little opinionated

    then we have to take into account history , of who in one way or another has replied in the thread , how the other 100 ai threads have been , and how the dislike click from the same person , or persons has be beaten to death

    that and im not that fluffy ,

    so if i raised your hackles i apologise , but chances are i wont change much

    unicorns and care bears

    Andi
     
    • Like Like x 1
    • Love it! Love it! x 1
  15. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +336 / 0 / -0
    Don't worry about the language thing, English isn't my primary language either.
    Things usually get through anyway. :D

    As for what constitutes 100% AI, I'm honestly not sure. Pretty sure it has nothing to do with real-life lap-times though.
    What I THINK is going on behind the scenes is something along the lines that were used in e.g. GTR2, i.e. the AI will use more and more of the theoretical grip and power available to it as the levels increase. What particular lap-times this result in doesn't really concern the AI.
    But this is just guesswork.

    The 3% discard limit was introduced 2 patches ago IIRC.
    So April or May perhaps? Somewhere along those lines.
    Personally, I'd still like to see it lowered to 2%, but at least now a major off from you will no longer result in a geriatric AI next race. :)

    Very true.
    But we love you anyway. ;)
     
    • Like Like x 1
  16. Frost

    Frost Member

    Joined:
    Sep 14, 2019
    Ratings:
    +6 / 0 / -0
    So if I do a championship in say F3 and go through all the tracks in the championship. And then start a new championship with the same car and same tracks. Will this process start over? Or continue to use the same data as the 1st championship?
     
  17. ravey1981

    ravey1981 Well-Known Member Beta tester

    Joined:
    Apr 15, 2018
    Ratings:
    +300 / 0 / -0
    Its a continuous process, every race you ever do against the AI creates data that is added to the existing data, in theory making it even more accurate.
     
  18. anighther

    anighther New Member

    Joined:
    Sep 25, 2019
    Ratings:
    +0 / 0 / -0
    aggresion is what makes it good. i hate passive games where nothing happens
     
    • Agree Agree x 4
  19. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +336 / 0 / -0
    That's a definite yes...and no. :D
    This is one of the pitfalls of using the AAI without doing it 'properly'.

    So, for arguments sake, let's say that you're at level 105, and you're starting the championship completely from scratch, no info in the indexfile at all.
    First race will always be run at level 80. That AI lap-time is then added to the indexfile.
    Next track, it'll look at the data it already has from the F3s on the first track (as I said, it borrows from other combos when needed), decide that 80 certainly wasn't fast enough, and probably try 90.
    Next track, same deal, except this time it'll try maybe 95. As the AAI approaches the players level it'll make shorter and shorter jumps.
    Rinse and repeat and by the time you reach the end of the championship it'll probably have adjusted to your level.

    Here's the catch though.
    If you then do the same championship all over again, the first track won't be run at your level. It'll run at level 90.
    Why?
    Because the AAI only looks at other tracks if it has no info on the current combo. But it has in this case, it tried level 80 in the very first race.

    Now, you can simply edit the indexfile manually if you so choose.
    But if we're going on the fairly safe assumption that most people aren't really interested in editing XML code, there's a reasonably simple way of doing it in-game.
    If you wish to use AAI, whenever you run a car-class for the first time pick a track you know well. We don't want any off-tracks to skew the results.
    Then run against fixed AI at whatever you think your level is.
    If you're reasonably experienced, you probably have a good idea of what your level is. If not, simply start at level 100.
    Let the grid do 3-4 flying laps, and then quit the race.
    Then do it again, adjusting the AI level up or down as needed by 5-10 levels.
    It doesn't have to be particularly precise, we just want the AI in roughly the right neighborhood.
    Once you have that one track at approximately the right difficulty, you can then safely switch to AAI for any other tracks with that car-class.
    What'll happen is that with all new tracks, the AAI will use the first one we set up as the starting point, so it doesn't have to start from scratch every time.
    It'll still have to make smaller adjustments though, so don't expect the first race or two to be right on the money.
    But after 2-3 short races, it should be more or less there. Just make sure you give the grid 3-4 flying laps each time to get them spread out a bit.

    And after you've done this for a while, and the indexfile has gotten more and more info, you can pretty much start out with AAI right away.
    I've reached the point where any new combo is rarely more than 4-5 levels off in the first race.
     
    • Like Like x 1
  20. Frost

    Frost Member

    Joined:
    Sep 14, 2019
    Ratings:
    +6 / 0 / -0
    So I did a race at the Nurnberg GP track with the FR90, set at 20 laps. Side by side racing was tough, they would bang in to me, sweep across me from behind and try to spin me out, or cut into a turn that I was occupying. They have a huge advantage in the last sector of the track, they have more grip up front than me. And with 5 laps I was in 10th place after being spun out a couple of times and/or spinning myself out. During the last lap they started to pit in for whatever reason and I finished 3rd.

    Anyone else run into issues where the AI pit in early at the end of a race? I couple of them pitted in right on the last lap right in front of me, and there was only the last turn to the finish line. They were not that much slower than me, I didn't understand it.