• Blurring the line between real and virtual motorsports
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.


Discussion in 'Bob's Track Builder' started by ALVAZ, May 3, 2009.

  1. hi, are there any tips to make AI drivers more competitives?, I say that because, after recording the AI path, I still find them, few competitive, I recorded severeal paths, trying to give them the best path, but they are slow. I dont remember, but there is one circuit, which AI drivers are very fast,so I wondered if there is something more to do

    And I dont want to increase the "AI drivers skill" in rfactor.

    Thank you very much in deed

  2. to get the opti ai driver , you need to adjust the fast path,to real race track drivers.if there a kink in the ai file, select the track points and drag it up the track nodes, selected in the unselected menu ,click normalise path.

    in aiw file edit these to >1.0
  3. hi, thank you very much, i will try!!

  4. Getting the most out of the ai can be very trcky. I've spent hours making them quicker and the best thing is to a: use a very fast recorded fast lap then manually fine tune there line by grabbing waypoints and using "normalize curve and even moving waypoints idividually yourself. Loading up one ai in test and have him learn the track. once he has leant the .ini file in that particular car file is saved in the route dir of that mod.

    Most say the lap doesnt have to be all that fast but try doing the perfect line slowly anf you'll watch the ai go through the corner slowly too. So if you want the most out of ai make your lap really fast and tidy it up by moving curve later. You'll often have to change the line to be too tight because the ai ten to drift alto too.

    Mid adjust is what that learning ai will use. Be careful though adjusting it oo high has its problems, the ai may crash more often.

    Its also a good idea to go around and manually adjust the corridors. othewaise ai make some crazy choices once there's traffic.
  5. A step by step guide to AI Learning, courtesy of rob from the RSCNet Forums.
    OK seems like there is some confusion with AI learning mode, this is how I do it.
    A) Make sure you do NOT have rFactor running in the background when doing the following or else the modified file will revert back to the non modified state.
    - 1) Go into your player file at C:\Program Files\rFactor\UserData\\.plr.
    - 2) Go to the line Autocalibrate AI Mode=0 and modify to read Autocalibrate AI Mode=1.
    - 3) Now click exit and SAVE the player file.
    B) Start rfactor and choose Any mod, then SETTINGS and change the following SETTINGS: - In the RULES section:
    - 1) Flagrules,Fuel useage and Tire Wear to either NONE or OFF.
    - 2) Private Testing ON
    Now on the right side of the rules screen change to the following settings:
    a) AIDrivers=1
    b) RACE GRID Position=1
    c) RACE START TIME=8:00 am
    e) Mech. Failures=off
    C) Choose the car you want under VEHICLE to teach AI to run this car type properly on any track.
    Then, go to TESTING and choose the track to learn and LOAD CIRCUIT (bottom right), but DO NOT click on RACE.
    a) Make sure u are in the MONITOR mode screen, and click on ADD AI.
    b) AI will now start its training and tells you to STAY OUT OF MY WAY HUMAN, do not go on the track to drive your own car, just watch the AI.
    c) Press the VIEWING button to view the AI on the track.
    d) Now press the R button on the keyboard to be shure the driving window will show 'LIVE' in the upper edge of the viewing screen.
    e) HighLight the AI on the track, by LEFT clicking on the AI's name in the MONITOR field, you will now see his best times change, as he progresses. After watching him for at least two laps LIVE, press (Ctrl) (T), this will speedup the time it takes to run a lap, but will NOT effect the accuracy of the Learning Mode. It will just make the AI finish his learning mode faster than normal.
    Now we assume that the AI has finished his learning mode and told you he has xxx.xx meters left over, if at this point the meters left over does not show 0.0x, do the following:
    - 1) Make sure the AI's name is highlighted in orange colour, then click on BOOT. (You are deleting this AI from the Learning mode).
    - 2) Click on ADD AI. You will now see a new AI name (if you have more then one AI) and he will now continue the learning mode where the last AI left off. This second AI will get the amount of meters leftover to 0.0X, and when he finishes the INI file created will be updated/overwritten.
    Speaking of the INI file, the following is the manipulation needed for all the cars to use it not just the team that did the AI LEARNING:
    Look in C:\Program Files\rFactor\GameData\Vehicles\\ now in the TEAM that did the learning there will be a .INI file, THIS is the file that neeeds to be moved so that all cars in the chosen mod can use the updated learning file. What you do is CUT the file and paste it in the CAR directory of the effected car. So SAVE it to C:\Program Files\rFactor\GameData\Vehicles\. The dir that has the .HDV and .TBC and other car related files in it.
    Go into your C:\Program Files\rFactor\UserData\\.plr file and reset the line 'Autocalibrate AI Mode=1 and modify to read Autocalibrate AI Mode=0 again.
    !!!!!Also go back into SETTINGS and reset all RULES as you previously had them!!!!!
    This might help to keep the game from getting confused when you go to drive the cars.
    HAVE FUN!!!
    What is meant by meters left over after the AI finished the learning mode?
    Well the IDEAL line on any given track has an IDEAL total length, over the whole trajectory of the track. So what is meant by 'Meters left over' is by how many meters the trajectory of the testing car is LONGER then the IDEAL LINE trajectory length. In other words the car traveled xxx amount of meters FURTHER then the IDEAL LINE (trajectory). That is why we want the meters LEFTOVER to be as close to 0.00 as possible.
  6. Talking abuot AIW...........Does anyone know how to make an open track AIW to run a SS in Rfactor and get times? I really need this help so not have to start studying more,
  7. Thanks, that's very interesting stuff. Could you repost it in the AIW sticky thread? Or can I repost it on your behalf? That way it won't get lost as this thread inevitably falls down the order :)

    This reminded me of something I'd wondered about and then forgotten - when I'd got the AI for my Goodwood track reasonably sorted, one night I decided to run the 1979 F1 mod. Previously I'd used lower powered cars. It was terrible, they were bouncing off the chicane and running wide and spinning at St Marys most of the time. I didn't modify anything, but the next time I tried they were a lot better, and the third time they weren't doing it anymore. So is there some kind of learning that you describe going on in rFactor when the AI run ingame I wonder?

    Sorry, but I can't agree with what you say about the fast lap needing to be fast in your previous post though. After all, the speed you lay the fast line down at has no connection with the speed the AI drive it at. To them it's just a path to follow. The only important thing is the line itself.
    I think maybe any confusion is just that some people find it easier to make a good line driving fast, and others can do it better more slowly.
  8. u might be right, but ive certainly had more luck with aiw driving as fast as possible then modifying the line.

    u are welcome to repost it wherever you like.
  9. Sorry if this has already been stated, but I couldn't see anything when making a a quick scan of the posts:

    One thing to note is that the fast line uses the angle your car is at when you record it. Hence if you powerslide out of each corner the AI will see extra turns that reflect your application of opposite lock. It is therefore best to use traction and stability control and anti lock brakes when recording the path. It is also recommended to turn off tyre wear and fuel usage. Personal experience also shows that avoiding going so fast as to jump on bumbs also helps, although I've not seen this elsewhere so it may just have been my perception.

    I also find that the quality of the AI learning is relative to your original fast line. If you take a bad line they will only improve it where possible, not find a better one.

    Finally, different cars quite often need different paths, but this isn't something that rFactor really caters for unless you provide the learning ini files with the your track, which is effectively impossible due to the number of mods. Hence you need to find a car that is of average ability. I.e. a formula car may have enough downforce to flat various corners and therefore you would end up driving a different line to that of a lower down force car, equally you may find a bumb or kerb cannot be taken by a stiff formula car, but touring cars would soak it up no problem. This may take some trial and error before determining a good car to use....
  10. i agree with chub, here the slower you move into the fastline path the better the aiw acted,the myth that the aiw file acted like the user is just a pure mythology.:)

    althought the second part about the autocalibration is corrected.
  11. Greybrad

    Premium Member

    I drive the fast path at about half speed, then smooth it out while in the rFactor editor, before tweaking it in the aiw and cam editor by guitarmaen.

    The distance between waypoints can also have an effect on how the ai cars drive.

    I've made aiw files with a waypoint span of 4.0 and a perfect fast path, but on fast bends the ai cars tended to dive into the turn.

    On open tracks keep the waypoint span at 5.0, and for street circuits lower the span so that the ai don't try and cut between waypoints and hit the edges of walls.
  12. Whilst tinkering with rFactor AIW (and, by extension, the SimBin titles) lately, whether using the BTB editor or the ISI AIW editor, I can't stress how important those three lines in the AIW file are. These three lines, in combination with a bunch of parameters in the mod (tire file, talent file, etc.) control how well the AI perform.

    As a track designer, you don't have control over what a mod creator does, so it's up to you to provide a reasonably good AIW. Since there an incredible number of mods (approaching 200 for rFactor) out there and only one fast path, it's not going to suit all mods. A reasonably good AIW will at least get the fast and slow cars around without quirks, so it's important to test with a variety of cars of differing capabilities that you're comfortable with. For myself, I adjust these parameters for NAGT, Historix, AE86 Club, Spirit of 76, and the original ISI cars without creating any setups for myself.

    I'm not a good formula car driver, but I also at least make sure the faster formula cars do not exhibit any unusual behaviors... it's okay if one slides off the track every other lap or so (particularly when they're traveling in a pack), but if two are going off every lap, then it's time to examine the corner and make adjust. The result may take a tenth or two off lap times for your favorite mod, which can be dialed out with the parameters.

    The default WorstAdjust, MidAdjust, and BestAdjust create a very wide range of lap times. 0.9000 to 1.1000 is a 20% range, which means if a lap takes 100 seconds, then the worst lap could be 20 seconds slower than the best, even before the talent files are applied! That's a ridiculous range for a driver who doesn't spin out. This is one reason most AI never do well against a decent human player at 100% difficulty. Also, the AI is slower in traffic; gosh, it slows human players down, too, so this is a reasonable aspect and laptimes will be noticeably slower when the AI are fighting themselves or human players.

    So the first thing I do now is to tighten up the values so they range over only 1-2% (1-2 seconds on a 100 second lap time), have the AI qualify (use that button for Finish Session rather than waiting), and compare their best times to my own best time. Then I edit the BestAdjust factor so the AI are turning my lap times, or a few tenths faster, and tighten up the WorstAdjust & BestAdjust times to match. I then race against the AI for many laps (30 minutes) and decide whether I've got it right. You have to be honest about your skills as a driver in a particular car to reach a sound decision on the final values.

    Finally, once I've gotten it right for myself, I expose the AIW to friends. After all, you know your racing buddies and have a good feel for their capabilities, so their experience with the AI will be worthwhile.
  13. Can't believe how everyone just copy pastes this AI calibration text without knowing what they are writing.

    You actually have to type "FINISH" at the end of the AI's run (when you choose) for the AI calibration to be saved to the <trackname>.ini in that cars vehicle folder. You then copy paste that ini into the other teams car folders.
  14. Nice find from the Windy Caves of Ancient Wisdoms... Didn't even know such a feature exists..
  15. hey guys, I dunno about Rfactor but in the Race series you can make a huge difference to the "overall ai performance" by changing this line in the .GBD file

    "AIDryGrip = 1.00"

    I was having major issues with the Ai being exceptionally slow around corners and after tinkering with the racelines to get a real lookin path - i started bumping this line up - finding that the Ai brake later, take corners faster and accelerate smoother - I guess the PC drivers get more confidence :wink:

    Previously the Ai was some 5-6 seconds slower than what I could do - since bumping the "drygrip" line up I now have the AI running at a similar pace to me....a note though is that you may need to tighten up your lines again due to the AI carrying extra speed (current setting is at 1.15)

    Theres a similar line for "wetgrip" as well for rain race days i guess! As well as grip-lines for the players as well- so you could in theory make an ice skating rink!!!!:eek:

  16. You may want to try this on a variety of mods before you spend too much time tweeking it. I did something simular with a setting (dang, can't remember what the waypoint name was) that controlled how agressive the AI would take the section of track. It worked great for forcing AI to brake later or drive faster through a corner that they had been a bit slow on. Worked great for the mod I had been playing with, but as soon as I loaded up a mod where the cars had a different level of "stickyness" and horsepower, they started flying off the track.

    I would caution that you may find the same effect when you start playing with different mods.

    I found the best solution is testing. I use BTB to draw my fast path with as few (control) points as possible (BTB will fill in the way points automatically - I'm just referring to the number of control points in BTB). I then race it with the AI (at 100%) and find the spots where I am consistently catching them. I then observe how I am taking that section, what the AI is doing, and go back to BTB to tweek what they are doing to more closely match what I'm doing. With each change I also let the AI run laps without me and keep record of the fasted lap. My goal is that with each tweek the fastest lap by the AI will continue to get better. It's interesting because in this way I have sometimes corrected the way the AI take a section, and other times adjusted how I take the section.

    With BTB, using as few points as possible, making curves that lead smoothly from one section to another is way easier than using the curve feature in the ISI AIW editor (IMHO). But by correcting the actual fast path, you can avoid having to tweek certain entries that could cause other mods to do some crazy things.
  17. I'll second everything that Dingo-J said.

    I start out with the original rFactor SR Grand Prix cars. We know how they're supposed to race, how fast one should be in relation to them, and they're fairly normal. If your AIW doesn't work with them, then it won't work with other mods.

    Don't try putting F1 cars on a track meant only for club racing. Don't judge your AIW on an F1 track with club racing cars. Do pick on mods that have trouble with rollovers (ETCC Honda is the only one that springs to mind) or pushing (Formula 5000) or are extremely tail-happy (some Historix cars).
  18. rFactor AIW/CAM editor is by far the best tool (IMHO, the only tool) to create natural, smooth fastlines. BTB is good for corridors.