How to make AI learn the racing line for a track

Marco Versele

Hhmmm, yes ...
Another interesting feature I found in rFactor threads: you can improve the racing line of the AI on a track!
I tried it in GSC and it worked like a charm.

Here's how to do it:

1.
Make sure GSC is not running, otherwise all your effort will be overwritten when exiting GSC.

2.
Open UserData\YOURNAME\YOURNAME.prl with notepad, and look for the line
'Autocalibrate AI Mode="0" // When in a test day with 1 AI, AI will attempt to perfect his driving line, and save his knowledge for future use'
Change to Autocalibrate AI Mode="1", save and exit

3.
Start GSC, and choose the vehicle and track you want the AI to learn.
In Settings set the following options:
- Private testing = ON
- AI drivers = 1
- Race grid position = 1
- Race start time = 08:00 PM
- Type of start : STANDING
- Race length type = TIME
- Flagrules = NONE
- Ethanol usage = OFF
- Tyre wear = OFF
- Mech. failures = OFF
- Time scale = NONE

4.
Load the track. Don't start the race!
When you are in the monitor screen, choose Add AI.
The AI will start its training and a message appears: "STAY OUT OF MY WAY HUMAN". The longer the AI is learning, the better times it gets.
The messages inform you of the distance the AI drove per lap compared to the ideal line. With each lap this difference gets smaller.
Type 'R'-key to switch from 'delayed replay' to 'live'.
Right-clicking on the AI's name will switch to a list of all laps driven by the AI with the respective lap times.
You can speed up time by typing 'ctrl-T', this will not affect the learning of the AI.
After a number of laps the message appears 'AI finished the learning' or similar.

5.
Still some meters of difference with the ideal race line can be left over.
The AI can improve to about 0 m of difference!.
To obtain this, remove the AI from the drivers list, and add a new AI.
The new Ai will start where the previous AI ended, and will continue to improve.

6.
When the learning is finished for your car and track, a track.ini file has been created for your team in \GameData\Vehicles\mod\CarType\team folder.
(For Blancpain mod: \Gamedata\Vehicles\Teams\CarType folder)
In order for all other cars of the same vehicle type to profit from the learning of the AI, you can copy the track.ini file from the team folder and paste it into the \GameData\Vehicles\mod\CarType folder.
(For Blancpain mod: \GameData\Vehicles\Physics\CarType folder), that is: where the CarType.hdv files, CarType-Tires.tbc files and other car related files reside.
Remove the file from the team folder.

7.
This procedure is per car type and per track. You need to repeat for each different car or track

8.
DON'T FORGET!
Revert to the original state of your YOURNAME.prl file (see point 2.), and restore your ingame settings (see point 3.).

Enjoy
 
Thx Gringo. However, the CART Mod has one more folder, it looks as follows:

1. CART_Extreme (there's just the CART_Shared.mas)
2. 1998
3. Lola_Teams
Penske
Reynard_Teams
Swift_Teams

Further on the tbc and hdv-files are not in the same folder, which the link I posted says. That confuses me a bit. So is it right to say to put the learned INIs into the CART_Extreme folder? It is the one after Vehicles.
 
Further on the tbc and hdv-files are not in the same folder, which the link I posted says.

Don't worry this is not a requirement. Just a way to help you find the correct folder that is a bit confusing.

For your CARTx example you have 4 class folders (unique car type) so you want to learn the track with each car type.

The AI driving a Lola generates an INI and you will move it to "Lola_Teams". Same process for the other chassis.
 
  • Like
Reactions: F_B
Sorry for necroing this post but there's a lot of useful info here.

So my question if there's anyone who can still answer this:

If the generated .ini file is chassis specific. i.e. the Lola_teams or a Ferrari chassis in an F1 mod for example, is there any way to save time and make the same .ini file work on all the chassis of the mod since in an open wheel mod all the cars practically should use the same racing line.

It seems unpractical that in an F1 mod for example you'd have to repeat the process for all the teams individually to get this to work.
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top