For reference: adaptive AI thoroughly explained

Discussion in 'General Discussion' started by Skybird, Dec 14, 2017.

  1. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    • Like Like x 1
    Last edited: Dec 17, 2017
  2. TonyJ

    TonyJ Member

    Joined:
    Dec 10, 2017
    Ratings:
    +12 / 0 / -0
    thank you very much.
    for the moment AI at 105 is really nice for me it's hard fight they drive like me.
    but when I will be better than AI at 120% i will have no choice to fight adaptive AI.
    i really want to try with adaptive AI.
     
  3. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    I understand it that even in adaptive AI the maximum the AI can do is 120. And before it goes to 120, the math for how it decides to do so needs to calculate accordingly, which means a bombastic and steady performance on your side. Any dev saying that the adaptive AI usually stays clearly below 120, would not surprise me.

    Me, I drive usually with GT3 at 96, so my skill level is such that I nicely flow with the pack and so cannot cut throught the crowd of cars like a hot knife through butter, that way I am always challenged, kept on my toas, needed to fight. If you drive versus the AI, it pays off NOT to be an alien superfast driver. Sounds paradox maybe, but is true. Alien drivers cannot enjoy AI.
     
  4. higsy

    higsy Well-Known Member

    Joined:
    Dec 28, 2015
    Ratings:
    +123 / 0 / -0
    As much as I like the idea behind adaptive, I still like to know how competitive I am with the ai and when I have to turn it up means I'm advancing.
     
    • Agree Agree x 1
  5. F1mre

    F1mre New Member

    Joined:
    Jan 3, 2016
    Ratings:
    +0 / 0 / -0
    I am wondering if the AI takes into account all the practice, quali, race, time attack, multiplayer laps? Does it differentiate between race pace and practice pace?
     
  6. Karting06

    Karting06 Well-Known Member Beta tester

    Joined:
    Nov 15, 2016
    Ratings:
    +128 / 0 / -0
  7. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    öhhh - lap times, anyone...?
     
    • Winner Winner x 1
  8. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    The tool thankfully developed by CheerfullyInsane and re-linked to by Karting06 again, does not free the player of still needing to do plenty of trial and error and manual work.

    It would be so much easier if Sector3 allows or identifies a single number in one file that one could edit:. Lars Hansen said the Ai always starts learning by havign the firts try done at a skill level of 80, which is the lowest setting possible. I think it is way too low. Set it to 95, or exactly the half between lowest and ighest AKI skill, that would be 100. Or allow the player to do edit it. That way, both greenies as well as skilled drivers are closer to their targetted comfort zone for AI skill. Just editing this single start value for the AI adaptation process already would do a lot of time saving, I think.

    80 is too low, and represents the one excessive pole value of the scale. Its as if you start with 120.

    Personally, I do not want to trial-and-error around by ediiting complete lap time values of mine.

    Keep it simple, S3. Simply allow own choice or enter a higher starting skill value for the adapation process, like 95 or 100.
     
    • Agree Agree x 1
  9. Karting06

    Karting06 Well-Known Member Beta tester

    Joined:
    Nov 15, 2016
    Ratings:
    +128 / 0 / -0
    But, if I remember (and understood) correctly, the adaptive AI also learn when you use a fixed AI level.
    So, at first you could try to do some laps with AI level at 100 for example and then use the adaptive AI?
     
  10. James Cook

    James Cook Well-Known Member

    Joined:
    Jan 30, 2015
    Ratings:
    +1,013 / 0 / -0
    @Skybird

    Agreed. The adaptive AI should have a user-defined starting point. Most players know the approximate difficulty level they can compete with. Adaptive AI should then tailor this difficulty level to each individual circuit.
     
    • Agree Agree x 1
  11. Karting06

    Karting06 Well-Known Member Beta tester

    Joined:
    Nov 15, 2016
    Ratings:
    +128 / 0 / -0
    Yeah but, you can be super competitive at one circuit, but not knowing another circuit. So, that's also a problem then? (or I didn't understand you)
     
  12. James Cook

    James Cook Well-Known Member

    Joined:
    Jan 30, 2015
    Ratings:
    +1,013 / 0 / -0
    That's where the adaptive AI becomes useful. My point (and Skybird's) was: it's better to have a more relevant starting point for training adaptive AI. I normally race at around 105 and adjust for each circuit. If adaptive uses the lowest level of 80 as a starting point, that's just a waste of my time when going through the training process.

    I'd rather have a setting to tell adaptive AI to use 105 as the base.
     
    • Agree Agree x 1
  13. Karting06

    Karting06 Well-Known Member Beta tester

    Joined:
    Nov 15, 2016
    Ratings:
    +128 / 0 / -0
    Ah okay.
    So, in fact, in the menu:
    • AI level: adaptive AI
    • minimum AI level: 105
     
    • Agree Agree x 2
  14. James Cook

    James Cook Well-Known Member

    Joined:
    Jan 30, 2015
    Ratings:
    +1,013 / 0 / -0
    Yes, something like that, although rather than 'minimum' AI level maybe call it 'reference' AI level. Just a reference point for training the adaptive AI.
     
  15. Skybird

    Skybird Well-Known Member

    Joined:
    Mar 31, 2015
    Ratings:
    +803 / 0 / -0
    I indeed was just recommending a starting point for the adaptation process that was more in tune with most players's own skill. I know nobody who drives at lowest skill settings in RR or AC. 100 or higher maybe already is too high for quite some people, in RR below 90 is too weak for very many people, so I suggest to use a mid-90 setting as a starting point. When using fixed settings, I find myself mostly using 95 and 96.
     
  16. TonyJ

    TonyJ Member

    Joined:
    Dec 10, 2017
    Ratings:
    +12 / 0 / -0
    i have just made a race with AI adaptive :

    i've started at 15th position with 29 opponents.
    After the start and first lap i'm 11th. AI is very bad at start :) they follow each others i have just to go on the right :)
    Impossible to catch someone more they drive at my speed (or faster, 1st have 13 seconds with me)
    I don't know if it's good or not :)
    I'm a little bit frustrated : i can't catch AI they are at my speed, and if i make a mistake i finish last.
     
  17. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Couple of corrections:
    1)
    I didn't develop anything. I have all the coding skills of a demented duckling.
    pixeljetstream developed the tool, I just figured out what it needed to do.
    Oh, and btw it still works. You'll need to edit the asset-file in order to get some of the newer stuff (e.g. Sepang), but other than that it works fine.

    2)
    Yes, but I think there's a misunderstanding here.
    It starts at 80 if there is no data at all in the aiadaption.xml.
    Or in other words, only when you run your very first race against the AI. It doesn't start at 80 for every new combo you run.
    Here's the sequence:
    The AI first checks to see if you have data for that particular car-track combo, and adapts from there.
    if not,
    It checks to see if you have used that car on other tracks, and uses the average of all those AI levels.
    if not,
    It checks to see if you have used that track before with other cars, and uses the average of those AI levels.
    If not,
    It checks to see if you have any data at all available, and uses the average of all of it.
    If not,
    It'll start at 80.

    So as you do more and more races, it'll adapt faster and faster because it's using your average AI levels as a starting point.
    The issue with it starting out at 80 is mildly annoying, but once you know that's the case it's a simple matter of running 2 laps against whatever AI level you want it to start at.
    Right now my own data-file has so many races in it that just running adaptive AI for a new combo will usually start somewhere within 5-6 levels of where it should be. All I have to do is run a few laps against it, quit out and check what level it ran at, and then adjust up or down as needed.

    There are a few problems with leaving the AAI to its own devices though.
    First, it stops adapting too soon. Ideally, it should start too slow, advance to too fast, and then settle on the right level between the two. But it doesn't, it starts wherever it starts based on averages, comes as close as it thinks it can, and then stops there.
    Granted, it's faster than true root-finding by bisection, but it does have some severe disadvantages.
    So unless you're very lucky, you end up with an AI that is slightly too fast or slow.
    Which is why it's a good idea to insert some data on your own; either by editing the file yourself, using the tool, or simply by doing races against fixed AI at the appropriate levels.
    Once the AAI has some lap-times for specific levels, it is much more willing to try whatever lies in between them.
    The second issue isn't nearly as big a problem, more of an annoyance.
    But it's a cast-iron b*tch to get the AAI to cooperate on short tracks (as in 60-70 second lap-times).
    The problem here is that the AAI picks an AI level based on the average of your last ten race-laps
    (And incidentally, yes, only race-laps count. No practice, Leaderboard or anything else. And it only counts with AI opponents on track).
    Which is mostly fine on standard tracks, a mistake here and there won't affect the average much.
    But on the short tracks, any mistake will drag your average down, as will getting stuck in traffic for half a lap.
    Which means the next race will be super-easy; it'll also bring your average lap-time down again, so the next race again will jump back to another AI level, and so on.
    Furthermore, due to the way that the AI does qualifying (as in all cars on track simultaneously), it has big problems finding clean air for its qualy-runs. Meaning that if you have the 'correct' AI level set, you'll almost always start in front.

    But all in all, these are minor issues compared to what you get out of it.
    It does take a little fancy footwork to get it to cooperate at times, but man oh man it is time well spent. :)
     
    • Like Like x 1
  18. Karting06

    Karting06 Well-Known Member Beta tester

    Joined:
    Nov 15, 2016
    Ratings:
    +128 / 0 / -0
    Thank you for your correction :)
     
  19. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    FYI the asset file was updated. So all tracks are recognized by the tool.
     
    • Like Like x 1
  20. fl0wf1r3

    fl0wf1r3 Well-Known Member

    Joined:
    Apr 24, 2016
    Ratings:
    +235 / 0 / -0
    reading reading reading ... how a bout a proper description from Sector3 about how it works, how to train and so on?