| View previous topic :: View next topic |
| Author |
Message |
Durod Chief Tinker

Joined: 07 Mar 2007 Posts: 674 Location: Massachusetts, USA
|
Posted: Sun Aug 10, 2008 12:26 am Post subject: Faster AI |
|
|
Recently I embarked on a mission to make the AI in my game more competitive. I did some searching on the net and found several theories on how to do it. One involved editing some lines in the track AIW file for Worst Adjust, Mid Adjust and Better Adjust. Another was to edit the line for AI corner grip usage in the PLR file. Although both of these methods did produce some improvement in the AI lap times, combined they still left the AI much slower than I would like. For my money, the best way to make your AI competitive is simply to make them use a good setup. There are, from what I can tell, a couple of ways to do this.
The first is to use fixed setups, and can be achieved by editing the following lines in your PLR file:
Fixed Setups="0" // use fixed setups specified in UserData\<plr>\FavoriteAndFixedSetups.gal (based on track and vehicle class)
Fixed AI Setups="0" // whether AI use the fixed setups, only applicable if "Fixed Setups" is also enabled (and can be used in single player to have the AIs use your favorite setup)
By changing the "0" in both line to "1" you will initiate fixed setups. Once this is done, in game when you assign a setup to a track it will be stored in UserData\<plr>\FavoriteAndFixedSetups.gal, and will be the setup used by you and all other drivers in your game, AI or human. The problem with this method is that it does not allow you to tinker with the setup to try to get faster, which for me and the people I race with is unacceptable.
The second method, and the method I choose is to assign default track setups. This is not as easily done as the previous method. but I think the extra work is well worth it. First of all, make sure that the two lines in the PLR file I mentioned in the previous method are unchanged, in other words they are still set to "0". For the purpose of this dicussion, I'm going to use Rouen_1974_94 as the example track.
1-First thing to do is go in game and work on a decent setup for this track, or download one. Once your happy with your setup, save it as whatever name you like, for me it might be du_rouen.svm.
2-Next you have to open the GDB file for this track,(rouen_1974_94.gdb} and find the lines:
SettingsFolder = Rouen_1990
SettingsCopy = Rouen_1990.svm
SettingsAI = Rouen_1990.svm
These lines tell you the folder within your settings folder where the setups for this track are stored, in this case, Rouen_1990. They also tell you the required name for the default AI setup, in this case, Rouen_1990.svm.
3-Armed with this information, go to your settings folder, and the Rouen_1990 folder and locate the setup you made. Now copy and paste it so that you have a copy of it, in my case I would have a file named "copy of du_rouen.svm". Rename this file Rouen_1990.svm.
4-Now you have to place a copy of this file,(Rouen_1990.svm) in the vehicle folders of any cars that you want to use this setup. If for instance you only choose 2 or 3 cars as opponents, you only need to paste it into those vehicles folders. If however, like me, you prefer to let the game randomly choose your oponents, it's best to put it in all the vehicle folders. I created a simple batch file to paste mine for me.
5-The final step is to boot up your game and go to that track. Go into the garage area and select the Rouen_1990.svm setup by clicking on it, and then click on the assign button. Now any AI which you pasted the setup in it's vehicle folder will use that setup at that track. Of course you have to repeat this process for each track you run.
A quick warning, after I did this, the AI went from being too slow, to kicking my butt, so I had to lower the AI strength to my level.
Another in game setting you may want to play with is AI agression. If it's set to high, the AI will crash into you, if it's too low the AI won't attempt to pass, and will just stay in line. I think a good setting is between 50-60%
Finally, another thing you can do is called AI learning, which will teach the AI the best line to use for any given track. Instructions on how to this can be found HERE
In case your unsure, here is the default location of the pertainant files/folders.
PLR file---C:\Program Files\rFactor\UserData\YOURNAME
Track Settings Folders---C:\Program Files\rFactor\UserData\YOURNAME\Settings
Track Folders---C:\Program Files\rFactor\GameData\Locations
Please feel free to add your own thoughts and experiences as they relate to this topic! |
|
| Back to top |
|
 |
Durod Chief Tinker

Joined: 07 Mar 2007 Posts: 674 Location: Massachusetts, USA
|
Posted: Sat Aug 16, 2008 10:17 pm Post subject: |
|
|
I am going to make a little amendment to the previous post, because last night I was planning on running Watkins Glen Nascar V2 online, but the above method was not working for getting the AI to use the assigned set up, yet it did work for the other versions of Watkins Glen. This is what I found. In the GDB files for the 3 tracks, these are the pertainent lines:
Watkins Glen GP:
SettingsFolder = WatkinsGlen_GP
SettingsAI = WatkinsGlen_GP.svm
WatkinsGlen_Long
SettingsFolder = WatkinsGlen_Long
SettingsAI = WatkinsGlen_Long.svm
WatkinsGlen_NASCAR
SettingsFolder = WatkinsGlen_NASCAR
SettingsAI = GlenNASCAR.svm
You'll notice that the Nascar track is the only one where the settings name is different than that of the folder. Although I did have the setup named correctly,(GlenNASCAR.svm), it would not load. As soon as I changed the GDB so that it read :
SettingsFolder = WatkinsGlen_NASCAR
SettingsAI = WatkinsGlen_NASCAR.svm
and of course changed the name of the setup accordingly, it worked fine.
Makes no sense to me, and I suppose it could be some kind of glitch on my PC, so don't take it as gospel, but it did work for me.
I also want to add that changing the lines in the track gdb will cause mismatches with others if you race online, so if you do it make sure that others racing with you also have the edits done. |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Sat Jul 24, 2010 6:48 pm Post subject: |
|
|
Du, do you still have the batch file for doing this? If so please send it to me. I want to tinker some with this.  _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
Durod Chief Tinker

Joined: 07 Mar 2007 Posts: 674 Location: Massachusetts, USA
|
Posted: Mon Jul 26, 2010 9:15 pm Post subject: |
|
|
| I should have it somewher Bob. I'll check when I get a chance and send it over. |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Mon Jul 26, 2010 9:55 pm Post subject: |
|
|
Thanks bud! _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
Durod Chief Tinker

Joined: 07 Mar 2007 Posts: 674 Location: Massachusetts, USA
|
Posted: Tue Jul 27, 2010 10:05 pm Post subject: |
|
|
Sent it to your gmail  |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Sun Aug 01, 2010 2:07 am Post subject: |
|
|
Got it, works great! _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Sun Aug 01, 2010 2:25 am Post subject: |
|
|
Now that I have been tinkering around with the AI and setups etc... I have noticed something interesting. Say I setup a race with 12 AI opponents, what always ends up happening is all the cars that show up under the "class column" that are listed as" MCOMOD" ALWAYS end up at the bottom of the list! I have tried several races at A1Ring track, and the cars are just 4 to 5 seconds slower than the cars that show up as ClassRace in same column. Just to clarify the screen is the one that has from left to right showing : PLAYER TEAM CLASS LAPS TIME GAP. I think for some reason the upgrades for the cars listed as MCOMOD are not loading for the AI cars like the other cars listed as ClassRace. I will dig into it to see if I can figure it out. Its kinda a shame that I cant get all the cars to be super close in lap times, cause I have run a couple of them with the classrace cars and it is quite a blast, even if they are computer controled. Oh and by the way the Learning mode does work, it knocks off about a second at A1 Ring. Thanks Again Du for figuring out and taking the time to post this information for us. _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Wed Aug 04, 2010 1:21 pm Post subject: |
|
|
Update: Ok I figured it out. Each car has an upgrade.ini file, all of the slower cars have the omission of two things, ClassRace in the upgrade class= place, and under AI List missing engine=1 Transmission =1. Once I edited these two items in the upgrade.ini file the cars were fast like the others. I also think some of the cars may be missing some eye candy upgrades like hood scoop etc... but this has no effect on how fast a car is as far as I know. I can go thru and edit these on each upgrade.ini on all the cars, then possibly a better setup for many of the popular tracks for the AI cars to use, could just add these setups to the vehicle folders to match tracks info in gdb file so users would only need to do track editing per Durod's instructions on tracks that did not have setups included and would be good to go.Possibly in the future Du might consider a new version release of the mod with these additions included? I might be trying to revive a dead horse here , but I think this mod is too much fun to let it fade into oblivion. Upside if this were to happen, on the nights we race if we have a small turnout we can throw in some competitive AI cars into the mix. And if online racing isn't your thing, you can have a better offline experience racing AI. What do you guys think? _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
smokin22s Master Painter

Joined: 07 Mar 2007 Posts: 407
|
|
| Back to top |
|
 |
Sub Owner

Joined: 17 Nov 2008 Posts: 240
|
Posted: Fri Aug 06, 2010 1:48 am Post subject: |
|
|
I'm definitely into it! There's a lot i can do from the track building angle to make the AI more smart, but anything i've tried has never been enough to make them truly competitive. Maybe a combination of track tweaks and tweaking those ini files would be the way to make it work.
I'd much rather race real people, but as we all know, it's hard to get everyone together. A better AI could make it so racing offline isn't so boring.
As for the mod being a dead horse, i see what you mean - but i know i'll be tinkering with this stuff for years no matter how slow-moving it is. It's a fun thing to work on when everything else in life is either boring or stressful. Anything you guys do is sure to end up on my screen and on whatever track i'm messing with, so i encourage any further additions you want to make.  _________________
 |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Fri Aug 06, 2010 11:33 am Post subject: |
|
|
Cool there is hope! Yea, I would rather race with real people, but often is the case they are not around, so some decent AI is the next best thing. I have created a few setups for a couple of tracks and the AI can be adjusted so they are at your level, above your level, or below your level. Seems the longer tracks are more difficult to achieve this balance. Also I am having great difficulty with your track Sub. The AI cars are "VERY" tentative around the track. I think the track surface being 80 percent dirt/gravel may have something to do with it? Also the AI will not take the shortcuts to shave time off. I will keep trying to get it, but not sure of a solution. _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
Sub Owner

Joined: 17 Nov 2008 Posts: 240
|
Posted: Fri Aug 06, 2010 12:58 pm Post subject: |
|
|
Yea, where the AI will or will not go is controlled entirely by "corridors" which are something i adjust when setting up the AIW file. I've found that if the driveable area of the corridors even slightly goes over the side of a wall object (like sidewalks), it totally confuses them and they break. This makes it so that there's really no way to get the AI to take the shortcuts. The corridors are attached specifically to the main track and the 'centerline' that goes around it, so stretching them out to include shortcuts usually means that they'll go through or over wall objects.
Now, that's my experience when setting it up in the Track Builder. But there's another tool made by ISI that's far more elaborate (and thus, a bitch to use) for creating the AIW file. It's possible that i could take to grappling with that beast again and actually get the AI successfully taking the shortcuts.
It's interesting to me that you can have any effect on them outside of the track building environment that isn't just how fast or slow they move. It's confusing, but it also gives me the impression that they're highly tuneable and we could probably get them working perfectly at some point.
I'll dig back into the AI stuff (i'll set up Cams too) sometime in the next week.
----------
I picture the future of this mod being 3 or 4 of us, still doing exactly this... 5 years from now.  _________________
 |
|
| Back to top |
|
 |
MystaMagoo Jack Man
Joined: 08 Aug 2010 Posts: 3
|
Posted: Sun Aug 08, 2010 3:13 pm Post subject: |
|
|
Thanks for the tut but I can't seem to get it to work?
I seem to have done exactly what you said to do but the AI don't seem to use the setup?
The mod I'm using is FSONE08 and I'm using Spa within the F1 2010 TrackPack v1.2.
The setup has a top speed of about 200mph but the AI only reach 190mph.
Spa's gdb file has the lines.......
SettingsFolder = F12010-Rd13-Belgium
SettingsAI = F12010Rd13Belgium.svm
Notice there is no SettingsCopy =
I tried adding that line but no joy
Both my 'fixed' are at 0.
Any ideas? |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Sun Aug 08, 2010 10:28 pm Post subject: |
|
|
One thing that will effect top speed and "overall" speed for that matter is the 70% to 120% slider. I can only speak to the McoMod as I ran a few tests on 2004 Lemans track that has quite a long straight. At 120% was hitting 213mph then switched to 70% only made it to 202mph. Im sure you already played with this setting? Also as possible workaround if that mod has radiator that's adjustable, bumping that number upward or adjust wing may give a few more mph? If it gets you up to where you want the AI to be, then save the changes. You would of course have to "not" alter your own setup the same, as you would go faster also.I recenty began playing with this stuff also, and have had much more success with the AI on shorter tracks without real long straights, not sure why this is. That's all I know to tell you to try Magoo. Good luck! Possibly Durod could help with this more than myself. _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
MystaMagoo Jack Man
Joined: 08 Aug 2010 Posts: 3
|
Posted: Wed Aug 11, 2010 6:42 am Post subject: |
|
|
Thanks for that.
AI are at 100%
I'll do everything again and see what happens.............. |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Wed Aug 11, 2010 9:08 pm Post subject: |
|
|
It is odd that on some tracks you can give the AI your setup to use, and at 100% they might be right with you, on some other track at 100% they may run off and leave you, yet others 100% you may beat them. It is frustrating at times , but with patients you can usually overcome. Might be a good idea to make notes for what % to set the AI strength slider at for each track you run.  _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
MystaMagoo Jack Man
Joined: 08 Aug 2010 Posts: 3
|
Posted: Thu Aug 12, 2010 5:54 am Post subject: |
|
|
I have found another way.
Much along the same lines but you put the setup file in the UserData folder.
Now I've just got to tweak the AI so that they drive a bit more like Humans,not so much as if they are on rails. |
|
| Back to top |
|
 |
Bobster Tech Guru
Joined: 08 Mar 2007 Posts: 356
|
Posted: Fri Aug 13, 2010 8:41 pm Post subject: |
|
|
Yes that's were all setups you create must go. If you create a setup in-game the setup is saved for the track your currently at. In Durod's example the setup is created outside the game and must be named and placed in userdata/yourname/settings/trackname folder for the AI to find and use. Glad you have it working magoo!!!  _________________ I'm as happy as a tornado in a trailer park! |
|
| Back to top |
|
 |
|