* AI Learning - Step by Step Guide *

Discussion in 'General Discussion' started by MarcG, Mar 3, 2015.

  1. Endurancer

    Endurancer Registered

    Joined:
    Mar 31, 2018
    Messages:
    53
    Likes Received:
    28
    Well, it's been a while since this has been posted, but in case you are still looking for a solution, I once had a similar problem with Interlagos, with the cars hitting a wall in the main straight every time. Only way to get around it was to edit the AIW with a graphical tool that allowed me to edit the active area for the AI. So I altered it to prevent the AI from going into that wall. It is not very intuitive, took me nearly I entire day of my vacation to sort how to use it, but the result was very rewarding.
     
    Felix Boucher, Corti and Juergen-BY like this.
  2. Endurancer

    Endurancer Registered

    Joined:
    Mar 31, 2018
    Messages:
    53
    Likes Received:
    28
    Hi, so I finally got time to test this feature. I want, most of all, improve the performance of APEX FIAGT3 cars in the Nordschleife (24h layout). So I tried following this tutorial (method 1), and results were very inconsistent. Most of the time, the AI was running slower and slower and the message "i can do better, XXX meters off" was displaying smaller figures most of the time. That did not make sense to me. Yet, eventually I got a "success" message and moved to try a qualifying with the updated AI. Then I realized that the AI has got about 10s. SLOWER (!).

    Some research, and I decided to ensure the following parameters in the player.JSON file:
    AI Calibrate Sample Size":6,
    "AI Power Calibration":7,
    "Auto Line Smoothing":7,
    "Autocalibrate AI Mode":1

    Then tested in Interlagos with URD PX1 AURA, just to have some control data. It worked reasonably. During the test, the car laped 1:15.xxx. But in qualify session, after the learning was completed, it raced at 1:16.xxx (it was 1:18.xxx before).

    Then tried Nordschleife again. At least now I saw some coherence between the messages (“off by…”) and the times. However, after the entire test time has passed, There was still no “success” message.

    Does anyone has a clue of what might be happening and any ideas on how to get over it?

    Any help is much appreciated.

    Regards,

    Luciano.
     
  3. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Apologies for the immensely late reply, I needed to do some AI Autocalibration today for the first time in ages and for the life of me couldn't get it to work. I deleted files, rolled back to previous builds, then I noticed the "Test Day" wasn't working in that it was always the number of minutes selected not the Default 30hours for a "Test Day" so I set about finding why that was.

    Turns out the answer is to now Unselect all Sessions Qual, Race AND Practice, then the "Test Day" works as does the Autocalibration, I'm unsure as to when this was changed as I said it's been a while since I've used the AI Learning methods, I'll edit the first post to reflect this.

    Edit: First Post edited to reflect the changes (7/1/2019)
     
    Last edited: Jan 7, 2019
    Mydriaz, Balazs Magyar and SPASKIS like this.
  4. Felix Boucher

    Felix Boucher Registered

    Joined:
    Jan 1, 2019
    Messages:
    6
    Likes Received:
    4
    Small Note i'd like to add. If you want to run your AI Learning in the background while browsing, watching Youtube videos, studying, other stuff, you can change a tiny thing

    In your "\rFactor 2\UserData\player\player.JSON" file there is the following setting.

    "Pause If Focus Lost":true,
    "Pause If Focus Lost#":"whether to automatically pause if window loses focus (single-player only)"
     
    Wade, gluon and Endurancer like this.
  5. Scott Vermeyen

    Scott Vermeyen Registered

    Joined:
    Apr 22, 2018
    Messages:
    8
    Likes Received:
    0
    Is there no way to simply set a value, and have the AI constantly improve? Is that Mode 2?

    I don't always want to do this process for every track/car. Sometimes I just want to drive and not have to edit files and create *.wics. I'm fine with the .wic files being dynamic.

    I'm assuming this is why the AI has been a bit of a disappointment. Don't think I've tuned it up.
     
  6. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Yes, you can turn mode 2 on and leave it on. Note, though, that you have to advance sessions for the WIS files to be written to disk. If you always exit practice and never go to qualify (or race), the file does not get written.
     
    Scott Vermeyen likes this.
  7. Scott Vermeyen

    Scott Vermeyen Registered

    Joined:
    Apr 22, 2018
    Messages:
    8
    Likes Received:
    0
    I can just drive the sessions too instead of advancing, right? I usually drive the full weekend just working on the setup and stuff, like to simulate like that. Usually have 10 or so drivers on the track if any of this matters.

    I'll start checking the folders for the WIS files, and if/when they are updated.

    Bonus dumb question: how come when I pull into the pits to serve a flag, I can't seem to actually serve it? I seem to stop in my box, but the behavior is a bit strange here. I never seem able to clear my flags, like a stop a go when leaving the pits too early in practice for example. Thanks for any help on how that's supposed to play out.

    Cheers!
     
  8. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @Scott Vermeyen cycle through the HUD and you'll find one that lists the penalties you have. You probably have a drive-through instead of a stop-go. Also when you request a stop and your pitmenu pops up it will say stop-go:yes if you have one of those (you can choose to defer it, say to repair damage rather than serve the penalty then do another whole lap).
     
  9. Scott Vermeyen

    Scott Vermeyen Registered

    Joined:
    Apr 22, 2018
    Messages:
    8
    Likes Received:
    0
    Thanks for the help man, I'll see if I can finally clear a flag.
     
  10. Shadak

    Shadak Registered

    Joined:
    May 29, 2020
    Messages:
    43
    Likes Received:
    17
    So I was going through this to try to fix Lemans AI. Basically on both 2018 and 2020, AI spins in the last chikanes almost every time. I tried reducing and increasing Strength or Aggression, nothing was helping. I tried method 1 or 2, it generated the files, I had them in all drivers folders (tested this with just 1 type of car GTE), even the WIS files, all looked good in the folder structure. They were great in quali, just couple of random off tracks or spins, nothing major. Come race, they pile up every time in the last chikanes, they some times even do synchronized spins one after another in last corner. Has anyone experienced this by any chance?
     
  11. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    I've seen the odd spin there but then I have AI Mistakes on about 0.5 in the player.json. They certainly don't spin "every time" though, have you tried with a fresh player.json file? (Backup your current one first)
    If that fixes it please send me both backup and new files
     
  12. Shadak

    Shadak Registered

    Joined:
    May 29, 2020
    Messages:
    43
    Likes Received:
    17
    Thank you, Mark! I will try to reset the JSON file, cant recall honestly what exact changes I made so it might be a cause :)
     
    MarcG likes this.
  13. Shadak

    Shadak Registered

    Joined:
    May 29, 2020
    Messages:
    43
    Likes Received:
    17
    Thanks again, my mistakes were set too high! At 0.9 , not sure why someone may have suggested to me to increase it and I went overboard :) ... tried 0.0 just to test and there was not a single spin in that chikane.
     
    seamount and MarcG like this.
  14. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    When a driver says "xxxx is excited to learn this track", what are they saying?
     
  15. Corti

    Corti Registered

    Joined:
    Sep 29, 2014
    Messages:
    1,354
    Likes Received:
    2,495
    the old rockers never die :cool::D

    upload_2021-11-26_16-55-3.png
     
    datasting, svictor and atomed like this.
  16. dosequis56

    dosequis56 Registered

    Joined:
    Dec 24, 2021
    Messages:
    133
    Likes Received:
    48
    I have now tried mode 2 about 10 times with different variations. No file ever gets written. Here is my specs:
    1) set player.json setting "Autocalibrate AI Mode":2,
    2) launch game. Turn off damage, tire wear fuel burn. set AI to 100%, 50% aggression
    3) setup session with 240 minutes practice, 60 minutes qual, no warmup or race
    4) add 20 AI
    5) start race session at Monaco with F1 cars
    6) enter race, press cntrl-X to accelerate time, go to monitor and watch the AI
    7) I do get some messages saying "exited to learn this track" from several of the faster drivers.
    8) let the practice finish (about 150 laps done) and go to "finish session"
    9) let the qualify session start, press cntrl-X and let that finish and go to "finish session"
    10) exit the game

    No file written to UsetData/player/settings.

    What am I missing?
     
  17. dosequis56

    dosequis56 Registered

    Joined:
    Dec 24, 2021
    Messages:
    133
    Likes Received:
    48
    I am going to answer my own question. Looks like EACH player gets his own wisdom file in UserData\player\settings\car_mod_name\driver_vehicle_name. So not great for sharing just like mode=1
     
    atomed likes this.
  18. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    1 AI, set to Testday, dont join the track as player
     
  19. Lars

    Lars Registered

    Joined:
    Apr 29, 2017
    Messages:
    77
    Likes Received:
    39
    managed to adjust ClassicNascar2020 mod at NewHampshire with Version #2 (ai run faster now) for single player.
    Then copied folder with wisdom-files to server structure (cant run server with auto-calibr on 2, crashes) but no effect there..?! ideas..?
    thx
     
  20. shiet

    shiet Registered

    Joined:
    Nov 3, 2014
    Messages:
    455
    Likes Received:
    217
    Am I blind? I can't see anywhere the chatbox in the new UI.
     
    Wade and DiggerHawk like this.

Share This Page