I have created this Guide for the JSON entry of "Autocalibrate", this basically helps the AI learn a given track and save their Learning Process for future usage. I will be detailing both the "Autocalibrate AI Mode":1 and "Autocalibrate AI Mode":2 processes. (I may make additons, fix errors in future, if so Post #2 will detail what has changed) Before I begin here's a few notes: - You don't need to do any of the AI Learning if the AI are just fine at a track, more often than not it's 3rd party Tracks that need it or if a particular Mod has difficulty in a corner or section of a track that you're racing at. - Remember the AI make mistakes (there is a setting in the JSON for this). If you see AI occasionally spinning at a corner then that's ok, you don't need to panic and jump into the Learning Process to make them 100% Clean every lap. The beauty of RF2s AI is that they are very Human like....so they make mistakes! - The Tracks AIW file (this is what the Track Author creates to give the AI a Basic Driving Line) is a Major key factor in both Learning processes, no amount of AI Learning will prevent the AI crashing if the AIW is poorly created. - "Autocalibrate AI Mode":2 can have the tendency to create much faster AI and to a point where they become "too good", if (like me) you want AI to reflect Humans as best as possible (i.e. they make Mistakes) then either run fewer laps with this setting or don't run it at all. As per the first point you don't have to do any Learning, this guide is merely for those times where it is needed should the AI be struggling. - Both #1 & #2 use Different algorithms, this means that #1 may actually work better at some tracks than #2 and vice versa. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- For the Guide I'll be using the latest ISI Renault Clio 2010 (v1.51) mod at Mills Metropark (v1.43) 'Layout Inner Loop C'. AI Learning Guide #1: "Autocalibrate AI Mode":1, 1) Locate your player.JSON file in your '\RFactor2\UserData\player' (yours may differ if you chose Default Dir when installing) and open with Notepad or preferred JSON editing tool. Search for and locate the following: "Autocalibrate AI Mode":0, In this Guide we will be using the "1" variable so go ahead and change the 0 to a 1. (NB: Make sure your player.JSON isn't Read Only) Save and exit Notepad then Load RF2 2) The in Game settings are important, so setup as follows (Picture for reference): - Firstly make sure AI is at 0 - Make sure to UNSELECT All 3 Sessions so you see 3 Grey Xs, this will enter you into a Test Day after track loading - Set the Weather to Sunny or Overcast, as long as there's no Rain at all - Turn OFF Tire, Fuel and Mechanical Failures. Set the Strength to 100% and Aggression to 50% (Edit: the following picture is incorrect with Practice selected, as above Unselect instead for Test Day) 3) OK here we are at the track, go ahead and ADD 1 AI (Important: Only 1 AI), in the Chat Box you'll see a friendly message from the AI telling you to pretty much sit in the Garage and not move: Now during His or Her learning process he or she will drive lap after lap and gradually you'll see the "I can do better" message scroll down until the "Meters" gets to 0.00 or as close too it. Sometimes they finish Learning before they reach 0.00 so don't worry if they do: Depending on the Track and/or Mod the AI might have difficulty in finishing the session, for example they might get into the 20.0meters range and constantly loop around that Number. If this happens type in FINISH into the chat box and you'll get the following message: Once they have Finished Learning you'll see the "Track Learning Succesful" message, you can now exit the track and that's it, they have learnt the track and are ready for Racing. 4) For Confirmation go to your \RFactor2\UserData\player\Settings\ISI_Renault_ClioCup_2010 folder and you'll see a List of the Cars (or just One) and their respective Folder. Inside one of the Folders there will be the following file: MILLS_INNERLOOPC.ini This indicates the Learning Process was completed. 5) For this file to work with all cars you have to manually copy the INI file to all the other Individual Car Folders, this way each individual car will read the same MILLS_INNERLOOPC.ini file when the track is loaded. Finally go back to your player.JSON file and set Autocalibrate back to 0: "Autocalibrate AI Mode":0, Important notes on this setting: - If you're running a Multicar Mod then you will have to do the process for each type of Car. - If the AI crashes before completing then simply Boot him out and ADD a new one (just 1 remember), if he crashes and fails to complete the process it could be the fault of the AIW, this Process is not a Perfect Cure for a poorly create AIW file. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- AI Learning Guide #2: "Autocalibrate AI Mode":2, 1) Locate your player.JSON file in your '\RFactor2\UserData\player' (yours may differ if you chose Default Dir when installing) and open with Notepad or preferred JSON editing tool. Search for and locate the following: "Autocalibrate AI Mode":0, In this Guide we will be using the "2" variable so go ahead and change the 0 to a 2. (NB: Make sure your player.JSON isn't Read Only) Save and exit Notepad then Load RF2 2) These are the settings you'll need: - PRACTICE and QUALIFYING only - Weather is set to Sunny or Overcast, as long as there's no Rain at all - Give the AI plenty of time, this is important for Longer tracks as this process can take some time to complete (I always use the maximum 1440minutes) - Turn OFF Tire, Fuel and Mechanical Failures. Set the Strength to 100% and Aggression to 50% - Make sure you select the exact number of Cars for the Mod, in this case there are 15 Clio AI Drivers (other Mods will vary) Load the Track 3) Right then here we are ready to go, as you can see the AI have loaded and they're set to begin the Learning Process. First up we won't sit back and wait for them to Complete the process in Real Time...we'll be here all day! so hit 'CTRL + X' so that Time Acceleration is On, again Larger tracks will still take some time even with Acceleration on so do some Housework or make a cuppa tea and watch TV for a bit! As you can see after 23-24 Laps they do their first Pit Stop for a rest then head out for another 24 Laps: ISI suggest running between 240-300 Laps for a decent sized Wisdom file, this will give the AI plenty of Learning time to create a decent sized file. This is what MikeZ of ISI says for this Setting: ...this new system doesn't make little improvements every lap like the old system tried to do. In this new system, the car goes out for (by default) 24 laps at a time (he warms up his tires the first 3 laps, then runs 3 alternating trials of X laps each...as defined in the playerfile....default is 7). After that 24* lap excursion, he returns to the pit and figures out which of the 3 trial values for that particular variable worked best (i.e. fastest time) through each "corner" and adds those results to his "wisdom" database. Then, before he refuels and heads out for another run, he figures out a new variable to test & 3 "trial" values (for each corner) to try based on past best values. I've been setting the game in time acceleration mode and letting them run 240-300 laps to build up a decent sized database. 4) When the AI have completed a decent number of Laps it is very important that you click NEXT SESSION, this Saves the Wisdom file into the AI cars folder (at time of writing simply Exiting the Track during Practice does not save the file). Now exit the game and go back to your player.JSON file and set Autocalibrate back to 0: "Autocalibrate AI Mode":0, I advise this as leaving it at 2 the AI will be in Learning Mode everytime you have a practice session (not needed) and setting to 3 (which is Read Only from the Wisdom file) has yeilded some pretty strange AI behaviour so best bet is put it back to 0. 5) For Confirmation go to your \RFactor2\UserData\player\Settings\ISI_Renault_ClioCup_2010 folder and you'll see a List of the Cars and their respective folders, open one up and you'll see the following file: MILLS_INNERLOOPC.wis The size of the file depends on the size of the track, I've seen them vary from 30k to 250k in size. Important notes on this setting: - The time it takes can depend on the number of Cars (as well as Track size), so if you have a Large field of AI then it's going to take a very long time, a way around this is to split it up so select 0 AI before you load the track and ADD AI individually (Say 15) let them Learn and when complete re-do with the other 15. Think of t this way, The More AI = The Longer Time. - If you see a *.wis file that is 2k in size that is You...as in the car you selected during the Learning Process. So if you go back and chose a different car then you'll need to run this Process again soley for that AI to Learn the track, so repeat above but Select 0 AI and when you click ADD AI find the relevant AI and it'll be completed a lot quicker this way. - Once the *.wis files are saved then leave them well alone, they do not need to be moved anywhere, don't edit them incase it renders them null & void. - Should you notice that an AI has had a crash and stopped running Laps then it is upto you what to do, if they have done 100+ laps I leave them, if less then simply Boot and find the particular AI in the 'ADD AI' Box and he'll start again. What you may find is he constantly crashes at a certain point, if that's the case then I would'nt worry too much. - Remember if a lot of AI are crashing and failing to complete a lot of Laps it could be the fault of the AIW, this Process is not a Perfect Cure for a poorly create AIW file. -From the Changelog when #2 came into force: When Autocalibrate AI Mode=”2″ in the playerfile, AIs will run laps in practice trying to optimize their operating parameters on a per corner basis ( up to the new playerfile variable “AI Calibrate Sample Size” number of trials). They create a database (*.wis file…for “wisdom”, in the UserData\player\Settings\componentName\VehicleFile directory) with the results & use these results to adjust their parameters on the fly in a race.