Adaptive AI & the Tool, How-To

Discussion in 'Community Workshop' started by CheerfullyInsane, Mar 20, 2019.

  1. silvanob2

    silvanob2 Active Member

    Joined:
    Nov 2, 2015
    Ratings:
    +25 / 0 / -0
    I will do that but in a other way, we are a team on a project for AI learning, i came to this idea after talking to some coders, we were talking about "neural AI".
    So, with the help of specific algorithm, the AI will "learn" from the player, that means they will "see" what line your using, the speed in corners and so on, and AI will use the talent files to keep every AI his personality.
    Its not for tomorow but we are working on it.
    This will be only for offliners obviously and for good drivers that do good ideal line and are fast.
    Not suitable for rookies.

    This app will NOT use AMS core but just be a plugin and hopefully we hope in future to cover other sim.

    All this means we wont see AI that can be passed on a corner where they are slow, ruining the fun and not being realistic.
    Finished also AI bumping on your back at corner entry, etc etc...
    Off course, there will be some edit possible to give the app flexibility and be commited to different drivers style.

    Regards,
    Silvano

    EDIT sorry to bring this in Sector3 forum because this app will first be for AMS , if a moderator feels its not the place, feel free to delete or ban me :eek:
     
    Last edited: Oct 19, 2019
  2. Bull Shark

    Bull Shark Well-Known Member

    Joined:
    Mar 14, 2019
    Ratings:
    +162 / 0 / -0
    I hope you can make this work. Sound like something we’re missing atm. In the most racesims so to speak.
     
  3. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    Curious to see what comes out of that. Was also wondering if tons of replay files from the various leagues and events could be used to dial in the ai better.
    Then you have inputs from players as well as reaction to other cars.
     
  4. silvanob2

    silvanob2 Active Member

    Joined:
    Nov 2, 2015
    Ratings:
    +25 / 0 / -0
    Yes we need all possible inputs from players, i guess we will start in the dark and with time, going step by step, hope it will get clear.
    i am just the organisator and project director, its all new and since 2006 AI were allready quite good for the time being.
    But everything else did develop fast and good: grafics, sounds and physics, AI didnt develop as far as the rest and stayed what it was with some good development i must say, like R3E, RF2, AMS to name a few.
    So what we are pointing forward is give the AI some brain ;)
     
  5. silvanob2

    silvanob2 Active Member

    Joined:
    Nov 2, 2015
    Ratings:
    +25 / 0 / -0
    It could definatly be a way to go like you said but this will all depends of what issues we gona have to face, and lets not forget that this app will first use the architecture of AMS (Rfactor) before going to other engines.
    Why AMS ? because it has a lot of mods that fans will go on to use for long time and of course a very good native content.
    And because i love AMS :p
    I dont know about replays to be usefull, it may be more complex to go that way, future will tell.
    As for R3E and other platform, its to early to make any plans right now.
     
  6. silvanob2

    silvanob2 Active Member

    Joined:
    Nov 2, 2015
    Ratings:
    +25 / 0 / -0
    i agree with this, hopefully everything goes the way we want, but we know that the way will be hard.
    But its good to try no?
    Afterall we are big fans of motorsport simulation and the goal motivate us even that no one will get money out of it, a bit like CrewChief.
     
  7. Daniel Möller

    Daniel Möller New Member

    Joined:
    Mar 29, 2020
    Ratings:
    +0 / 0 / -0
    Hi,

    Im done with my 2 laps data points and do i select skill "Adaptive AI" as skill for my Single Player Championship or do I use skill 100.

    Thanks in advance!
     
  8. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    Once you've got some fix-points, switch to adaptive.
     
  9. azaris

    azaris Active Member

    Joined:
    May 25, 2020
    Ratings:
    +33 / 0 / -0
    Don't really understand how this adaptive AI is supposed to work.

    I go through all the steps described here and use the tool to set up the AI so i can race comfortably mid pack (1:46 lap times).

    The next race, the AI is two seconds faster (1:44 lap times). OK, I can still keep up with mid pack
    The next race, the AI is once again two seconds faster (1:42 lap times). Now I start struggling to keep up.

    Is the objective to adapt the AI until the player can no longer keep up? Struggling to understand the logic of this feature.
     
  10. keanos

    keanos Well-Known Member

    Joined:
    Oct 29, 2015
    Ratings:
    +136 / 0 / -0
    Is it possible, that MotorLand Aragón breaks the results in the Adaptive AI Primer?

    Maybe, because of the ó in the Name? Since I did a race there yesterday evening my entries in the tool looks a loot lesser then before. Or is there something that has changed because of the yesterdays update?

    Edit: Ah I found out, only finished combos will be shown now in the tool.
    But MotorLand Aragón is also not shown in the database.html file.
     
    Last edited: Aug 27, 2020
  11. keanos

    keanos Well-Known Member

    Joined:
    Oct 29, 2015
    Ratings:
    +136 / 0 / -0
    @pixeljetstream Can you check this issue, it seems, since the yesterdays update the primertool can't extract times from the aiadaptation.xml anymore. Did the race yesterday evening at MotoLand and also a "control" race now at mantorp park, with this track the tool worked fine last weekend, but now the database.lua and database.html are not updated anymore.
     
  12. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    For those that have trouble getting the Tool to work after the recent patches, there's an easy (albeit clumsy) fix.
    It's all due to S3 changing the syntax of the XML file, which the tool can't interpret yet.
    I'm sure pixeljetstream will update the tool as and when he has time to do so, but in the meantime do this;
    (If you're unfamiliar with editing XML files, now would be a good time to make a back-up.)

    Open the XML file in Notepad. Don't worry about all those numbers, you won't need them.
    What you're looking for are two text-lines, one in the top, and one in the bottom of the file.

    <AiAdaptation ID="/aiadaptation">
    <latestVersion type="uint32">0</latestVersion>
    <aiAdaptationData>
    <!-- Index:0 -->
    ..
    ..
    ..
    </value>
    </aiAdaptationData>
    </AiAdaptation>

    All you need to do is change the tag to read custom:

    <AiAdaptation ID="/aiadaptation">
    <latestVersion type="uint32">0</latestVersion>
    <custom>
    <!-- Index:0 -->
    ..
    ..
    ..
    </value>
    </custom>
    </AiAdaptation>

    And that's it, the Tool now works again.
    Unfortunately, whenever R3E makes an entry, it overwrites any changes you've made, so you'll have to do this every time you want to use the Tool.

    It might be possible to use Notepad++ and set up a batch-file to autotically do this, but for now the manual version is all I can offer.
     
  13. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    no longer required to work around if you get latest version

    it's a one line fix, for those who just want to edit theirs

    Code:
    old:
    local tracklist = xml.AiAdaptation.custom
    
    new:
    local tracklist = xml.AiAdaptation.aiAdaptationData
    
     
    • Like Like x 1
  14. Ron Watmore

    Ron Watmore Member

    Joined:
    Aug 3, 2020
    Ratings:
    +14 / 0 / -0
    would it be possible to attach a link for the latest version. I think I got it today but when I apply some ai changes it says it cannot find track 5276.
     
  15. Ron Watmore

    Ron Watmore Member

    Joined:
    Aug 3, 2020
    Ratings:
    +14 / 0 / -0
    I got the new version, but it says it cannot find track 5276 and class 1921 when I apply generate changes?
     
  16. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    Likely there is more to fix. Will check tomorrow
     
  17. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    • Like Like x 1
  18. Ron Watmore

    Ron Watmore Member

    Joined:
    Aug 3, 2020
    Ratings:
    +14 / 0 / -0
  19. Ron Watmore

    Ron Watmore Member

    Joined:
    Aug 3, 2020
    Ratings:
    +14 / 0 / -0
    Hi, First off want to thank you for all your work on this. Its awesome. Been using for awhile now, but noticed some discrepancies. I just did 2 races with the BMW 235 at Red bull. At 90% and 100% The winner of the 90% ran a 1:51.5. The winner at 100% ran a 1:45.6. When I open the tool it says on that car & track that 90% is a 1:54.6 and 100% is 1:47.5. So when I apply my modification for my times is that off? The Adapt AI is just so much faster then me now? Thanks
     
  20. CheerfullyInsane

    CheerfullyInsane Well-Known Member

    Joined:
    Oct 24, 2015
    Ratings:
    +402 / 0 / -0
    You're looking at two different things.
    The AAI time listed by the Tool is the average of the grids fastest laps.
    The in-game listing of lap-time is for that particular car.
    As an illustration, the latest ranked server race I did had me doing an average lap-time for the grid, despite the winner being two seconds faster. It just so happened that there was a backmarker there as well who was two seconds slower than me, thus I get an average lap-time.

    Having said that, there's a couple of things that should be clarified.
    First, if the AAI is too fast after applying the Tool, just keep running it. It'll adapt to your true level soon enough.
    The whole point of the Tool isn't to replace the AAI algorithms, merely to get it up to speed sooner.
    Second, and in this case probably more importantly, when using the AAI, you're setting yourself up for mid-pack racing.
    After all, it compares the average fastest time of the grid to your average lap-time, so it stands to reason that you will end up somewhere in the middle.
    The AAI isn't as consistent as a human player, especially in traffic, so you're bound to pick up at least a few positions.
    But due to the way that averaging works, it does mean that you're unlikely to ever win against the AAI at the 'right' level.
    It simply isn't designed for that. I find that I can usually get into the top 5-6, maybe a podium with a little luck.
    But in all the races I've done against the AAI, I think I've won twice. In both cases due to accidents involving the leaders.

    So it all depends on what you're looking for.
    If you want to race to win, the AAI is a poor choice. The spread of talent within each class makes a win unlikely.
    If (like me) you want to race just for the sake of racing, the AAI makes sure you're smack in the middle where all the fun is.