Why I won't be doing an adaptive-AI championship...

Discussion in 'General Discussion' started by Skidmark, Sep 22, 2018.

  1. Skidmark

    Skidmark Well-Known Member

    Joined:
    Oct 9, 2015
    Ratings:
    +232 / 0 / -0
    ... in short: because it's too unpredictable.

    After doing several adaptive AI races in the Hyundai at Bathurst, I could see the AI zeroing in on my pace.

    For my next race I put myself at the back of the grid in 25th, ready for the challenge...

    ... lights out... by turn one I had passed about 10 cars, another 8 by Griffin's. And yes, 6 more across the top of the mountain. As I hit the brakes at skyline for the first time I was leading.

    Last to first by skyline on the first lap!!! :eek:

    I then proceeded to lap an average of 2.4 cars per lap over the rest of the race to finish first having lapped the car in second place in the final corner. So in ten laps I passed every car twice!

    I've never lapped anyone before and I was also a tad disappointed that the AI ignore any blue flags they might be getting (at least in the corners - they seem to pull over on the straights).

    My race result is below. I have the fastest lap by 18 seconds! And it wasn't that great a lap given the traffic I had to contend with!

    upload_2018-9-22_16-16-8.png

    This sort of unpredictability would kill a championship.

    So... I return to my gentle plea to allow the user to select the AI level for each track when they create a championship. Please please please.:cool: (And I know it's one of a million things we all want...)

    PS Still love the game... it's my one and only :p which is why I want it to be the best it can be... ;)

    I'd also like to be a beta tester... is there a form I can fill in? :)
     
    • Agree Agree x 4
  2. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    AI initially used to work not well. Then something was changed in it, and I became a fan of it. Once one has understood how the process to "train" the AI works, per class and track, it was okay. However, having to do all that training was what finally nevertheless killed the concept for me again, an I now use fixed AI settings of 97 and 98 again.
     
  3. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Something's screwy here.
    AI lap-times at around 2:38 means it was running at level 80.

    Off the top of my oddly-shaped head, I can think of three possibilities.
    1 ) You accidentally set it to 80 instead of Adaptive. They're right next to each other in the drop-down menu.
    2 ) The index-file got corrupted somehow. If it's corrupted R3E will delete it and create a new one. One way to check is to see if it contains any other entries than the race you just ran. Alternatively, check the file-size, a fresh index-file takes up about 270kb.
    3 ) Somehow there's a bug in the championship use of AAI. I've never run a championship, so I wouldn't know.
    But I'll try and set up a mini-championship using the WTCR18 and see if I can replicate the issue some time this week-end.
     
  4. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Just ran a 3-round championship with AAI, and it works fine.
    Bathurst, Imola and Laguna, and all races ran with the correct AI.

    One more thing it might be.
    You mentioned you'd run a few races first, to get the AI up to speed.
    Did any of these races include a major off from you?
    The reason I ask is that if you e.g. whack the wall, and spend 12-15 seconds getting the bloody thing turned the right way around again, those seconds are added to your average laptime.
     
    • Agree Agree x 1
  5. Skidmark

    Skidmark Well-Known Member

    Joined:
    Oct 9, 2015
    Ratings:
    +232 / 0 / -0
    Thanks Cheerfullyinsane - I really appreciate the effort you have gone to in having a look at this!

    In response:

    No - definitely not. Slightly insulted (although I know you had to ask!! :))


    Ummm… you might be on to something here. As a relentless data collector, I can tell you that my average lap time on the previous ten laps was 2:27.782. There was one 3-4 minute lap in there due to a massive AI pile-up at skyline (the AI drivers need to learn more about managing weight transfer!).

    The ten laps before that averaged 2:21.814. So my average had just dropped by 6 seconds per lap prior to the race.

    That is likely to be it I guess but as I'm sure everyone appreciates it's not ideal as a bad lap (in this case not my fault) means the following race will be a waste of time. It would seem to me to be a (relatively) easy fix to take an average of your 6 best laps in the last 10 or something like that. This would pick up the variability but not the outliers.

    Thanks again for the response.
     
    • Agree Agree x 1
    Last edited: Sep 23, 2018
  6. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    No problem, I happen to enjoy this sort of problem-solving.
    (And yes, I'm a little weird. :D )

    Couldn't agree more. I've gotten into the habit of manually deleting any extremely bad laps after each race, but it shouldn't be necessary. So as you say, remove the fastest and slowest lap, and take the average from the rest.
    In fact, I had a bit of a think on it last night, and there's an easier way to do it.
    Simply have the index-file list your 5-10 fastest laps throughout your 'career'.
    As long as all your race-laps are slower than those in the index-file, nothing happens to the AI level.
    Once you start improving, the AI then gets a notch or two upwards. But once at the right level, it'll never adjust downwards, meaning offs, spins and the like become irrelevant.

    @Christian Göpfert Any chance you can pass some of this along to the AI guys?
     
  7. Skidmark

    Skidmark Well-Known Member

    Joined:
    Oct 9, 2015
    Ratings:
    +232 / 0 / -0
    Yes - I think something like that would be much better.
    I just did another race at Bathurst and, in its current configuration, it looks like it takes 2-3 races to recover from a real shocker.
    Editing the file - now there's a thought! :p:cool: (I mean seriously - just to clean out the %^%$).
     
  8. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    It takes ten laps. How many races obviously depends on how many laps each race is.
    So a major mistake on the Nordschleife is a bit of a bugger. :D
     
    • Funny Funny x 1
  9. wad53

    wad53 Member

    Joined:
    Nov 21, 2015
    Ratings:
    +9 / 0 / -0
    I tried the TCR cars at Bathurst just to have a look. I also tried the AI at various set levels (between 90%- 95%) rather than Adaptive. My lap times were similar to yours, but the AI really seemed to have difficulty through the Esses with regular crashes into the wall and holding everyone up.
    I suspect this might be more of a Bathurst issue than how the Adaptive AI works.
     
  10. Not Lifting Off

    Not Lifting Off Well-Known Member

    Joined:
    Dec 5, 2015
    Ratings:
    +368 / 0 / -0
    Out of interest do the ai have an actual racing line to follow on each track?
     
  11. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    It is. Like any AI there are some combos where it performs better than others.
    Give them a bit of downforce, and they do quite well at Bathurst.
    Equally it does fine with the TCRs at e.g. Hungaroring.
    But the combo of tail-happy cars + downhill turns + walls isn't a good one.

    Yep. Or rather, I'm 99% sure of it.
    If you check the results.txt file after a race, it'll reference an .AIW file.
    The files are encrypted, but I'm pretty sure they're there nonetheless.
     
  12. wad53

    wad53 Member

    Joined:
    Nov 21, 2015
    Ratings:
    +9 / 0 / -0
    Good question, does the AI use the same car setup as the player?

    Also, looking at my aiadaption.xml file, it is veeery long. How do you know which track to find your latest times etc?
     
  13. Christian G

    Christian G Topological Agitator Beta tester

    Joined:
    Apr 8, 2015
    Ratings:
    +2,411 / 0 / -0
    I just did and we're discussing possible improvements.
    That's correct, AIW stands for AI Waypoints if I'm not mistaken and they're given a racing line plus some alternative corridors for certain situations. It's rather intricate and one of the reasons physics changes need lots of time, cause all those lines and corridors have to be adapted for all cars.
    This is also correct.
     
    • Like Like x 2
    Last edited: Sep 24, 2018
  14. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    I wouldn't. Slight misunderstanding there, I meant that if you ran Bathurst in a car with more downforce.
    F4s at Bathurst is phenomenally fun for example.


    You look for the track and car IDs.
    Here ya go:
    Anderstorp
    Grand Prix: 5301
    South: 6164

    Bathurst: 1846

    Brands Hatch: 2520

    Chang International Circuit
    Full Curcuit: 4253
    D Curcuit: 4252

    Circuit Park Zandvoort
    Grand Prix: 1678
    National: 1680
    Club: 1679

    Circuit Zolder: 1684

    Eurospeedway Lausitz
    Grand Prix: 2468
    Automobilsport: 3291

    Falkenberg: 6140

    Gelleråsen
    Grand Prix: 5925
    Short: 6138

    Hockenheim
    Grand Prix: 1693
    National: 1763
    Short: 1764

    Hungaroring: 1866

    Imola: 1850

    Indianapolis
    Grand Prix: 1852
    Moto: 2014

    Knutstorp Ring: 6137

    Lakeview Hillclimb
    Full Run: 1682
    Reverse: 2181

    Macau: 2123

    Mantorp Park
    Long: 6010
    Short: 6167

    Mazda Laguna Seca: 1856

    Mid Ohio:
    Full: 1674
    Chicane: 1676
    Short: 1675

    Monza
    Grand Prix: 1671
    Junior: 1672

    Moscow Raceway
    Sprint: 2473
    Full: 3383
    FIM: 3683

    Motorsport Arena Oschersleben: 2384

    Nordschleife
    Nordschleife: 2813
    VLN: 4975
    Tourist: 5093
    24 Hours: 5095

    Norisring: 2518

    Nürburgring
    Grand Prix: 1691
    Short: 2011
    Sprint: 3377

    Paul Ricard
    Solution 3C: 2867
    Solution 1A: 4246
    Solution 1C-V2: 4247
    Solution 2A Short: 4248

    Portimao
    Grand Prix: 1778
    National: 1783
    Club: 1784
    Club Chicane: 1785

    Raceroom Hillclimb
    Full Run: 1705
    Reverse: 2214

    Raceroom raceway
    Grand Prix: 263
    Bridge: 266
    Classic: 264
    Classic Sprint: 265
    National: 267

    Red Bull Ring Speilberg
    Grand Prix: 2556
    National: 5794

    Road America: 5276

    Sachsenring: 3538

    Salzburgring: 2026

    Sepang
    Grand Prix: 6341
    North: 6578
    South: 6579

    Shanghai
    Grand Prix: 2027
    Intermediate (WTCC): 4041
    West Long: 4042

    Silverstone
    Grand Prix: 4039
    International: 5816
    National: 5817
    Historic GP: 5862

    Slovakia Ring: 2064

    Sonoma Raceway
    WTCC: 1854
    Sprint: 2016
    Long: 3912
    IRL: 3913

    Suzuka
    Grand Prix: 1841
    East Course: 2012
    West Course: 2013

    Spa-Francorchamps
    Grand Prix: 3870
    Classic: 4542
    Combined: 4543

    Stowe
    Long: 6055
    Short: 6056

    Twin Ring Motegi
    Road Course: 6658

    Zhuhai: 3464

    FRJ (20): 253
    Aquila (24): 255
    HillClimb Icons: 1685
    GTR1 (41): 1687
    GTR3: 1703
    GTR2: 1704
    GTRX: 1710
    Touring Classics (39): 1712
    GTO CLassics (17): 1713
    Group 5 (44): 1708
    P1 (15): 1714
    Silhouettes (24): 1717
    DTM 13: 1921
    WTCC 13: 1922
    P2 (46): 1923
    BL Cup: 2322
    ProCar: 2378
    ADAC 13 (24): 2922
    DTM 14: 3086
    ADAC 14: 3375
    DTM 92 (25): 3499
    WTCC 14: 3905
    DTM 15 (24): 4260
    ADAC 15 (19): 4516
    WTCC 15 (23): 4517
    FR2 (22): 4597
    Audi TT 15: 4680
    Audi TT 16 (20): 5726
    NSU (21): 4813
    F4 (20): 4867
    F3 (26): 5652
    Audi TT RS (20): 5234
    DTM 16 (24): 5262
    KTM (29): 5385
    FR US (20): 5383
    WTCC 17 (16): 6309
    BMW 235i (23): 6344
    FRX (20): 5824
    Porsche GT4: 6648
    Porsche GT3 Cup (32): 6345
    Zonda Cup (25): 7110
    WTCR 18 (25):7009
    (Number in parentheses is the number of available liveries for that particular class)

    Tah muchly. :)
     
    • Like Like x 2
  15. J-F Chardon

    J-F Chardon KW Studios Developer

    Joined:
    Jan 15, 2015
    Ratings:
    +5,041 / 0 / -0
    We'll get a modification through testers this week where AI adaptation no longer takes your latest results in consideration, but just looks at your best result.

    We had this in place so that players would have freedom to underperform for a while, but as it turns out, it seems to create more problems than it solves. With this new system you'd be matched to your best performance.

    So we'll try that in the beta for a while, see how testers like it.
     
    • Like Like x 5
    • Love it! Love it! x 2
  16. David Peres

    David Peres Well-Known Member

    Joined:
    Jul 5, 2017
    Ratings:
    +96 / 0 / -0
    Our single best result, or the average of our all-time top 5 or 10 best results?

    For wildly inconsistent drivers like me being matched agaisnt my personal record sounds painful :eek::D
     
    • Agree Agree x 2
  17. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    How cool would it be to be able to choose how the calculation derives

    Options could include
    1. Average results of last 10 laps
    2. Average all time best 5 laps
    3. Average results of the last 15 laps excluding the bottom 5 results (effectively ignores those slow laps due to incidents)
    Option 3 is my preference
     
    • Like Like x 2
  18. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    I wouldn't worry too much about it. The AI lap-times that the player-times are compared to are still going to be based on the average speed of all the grid (or so I assume).
    So even if you have variations, it shouldn't result in a blow-out.
     
  19. MattStone

    MattStone Well-Known Member

    Joined:
    Mar 6, 2016
    Ratings:
    +169 / 0 / -0
    I thought it was based on the highest placed AI driver, not the average of all AI drivers ...mmm

    I wish there was a definitive explanation sticky in the forums from the developers on how it is calculate albeit I guess they don't want to give away their formula to their competitors
     
  20. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    If it's proprietary, it's gotta be the worst kept secret in the world. :D
    Here's how it works (or at least as far as I can figure):
    After each race, you get a results.txt containing the fastest lap-times of each driver (you and AI both).
    All the fastest lap-times of the AI is then averaged, which subsequently becomes the indexed lap-time for that particular level.

    In order for the lap-times to not vary too much between each race, once you start racing the same AI level there's a further averaging when adding the new times to the index-file.
    The current lap-time is weighted by the number of times you've run it, and then averaged with the newest lap-time.
    Or in other words;
    New indexed lap-time = ((Old indexed lap-time * counter) + new lap-time) / counter + 1

    The whole thing is actually pretty clever. Since the AI fastest times are compared to your average times, not only do you end up somewhere mid-pack, you're also likely to move upwards assuming you're consistent.
    Suffice it to say that the AAI is one of the major reasons I keep coming back to R3E.
     
    • Informative Informative x 1