Making AI_Adjustments For A Human Condition


by fortine_oo

last upd 5-30-07
*__couldn't find noticable change
#__needs further review

AI Speed And Handling Control

Track Folder ( each track )

1. smooth race.lp before other tweaks
2. fast.(series).car
3. track.ini

[ TRACK ]

A. major adjustments:

1) track_asphalt_grip
2) track_concrete_grip
3) track_tire_heat
4) track_tire_wear
5) track_tire_wear_loss
6) track_tire_wear_exp
7) starting_grid_0 (1)
8) pace_speed_limit_mph
9) starter_decision

[ AI_TRACK ]

A. major adjustments

1) ai_grip_modifier
2) ai_drag_modifier

B. fine adjustments

1) ai_accel_modifier
2) ai_decel_modifier
3) ai_line_modifier
4) ai_inverse_slipcurve_k
5) ai_drag_modifier
6) ai_dlongpad_scale
7) ai_tire_wear_left (right)
8) ai_squeeze_pcnt
9) ai_qual_modifier
10) ai_fuel_use
11) Use all three stategies together
12) ai_panic_decel
13) ai_dlat_pad

C. ai to ai

1) ai_wall_offset
2) ai_pacing_distance & ai_bunching_distance
3) ai_drafting_distance

D. miscellaneous

1) pace_speed_limit_mph
2) speed_limit_MPH ( pit lane )
3) [ pit_lane_0 (1) ]


Papy_ai_ini ( NASCAR Racing 2003 Season_folder )


Track Folder ( each track )

1. smooth race.lp before other tweaks __need to drive as fast as you can, speed counts. If you try to do it at 3/4 speed for example, no matter how smooth, the game knows it was 3/4 speed, and will translate that to every other series at 3/4 speed. You can use any speed you want, but it'll just take more ( higher numerical values ) track ini tweaking to get the ai to perform the proper laptimes, and it's not always easy to correct a driving flaw. The ai will run more like a real person ( at least as far as speeding up and slowing down only at the proper times ) if you capture a real race-type lap. It also makes the raceline lp show the correct slowing, braking, and acceleration zones. The ai WILL exaggerate any wheel and throttle movement. So, when driving the lap, you can't drive exactly like you would in a race. It's okay to go to a WOT, but not if you have to then back off, and then WOT again ( like during a turn ). The ai will magnify that back off and really lose momentum, which will kill the laptime. The best solution is to approach the corner with a constant throttle, at a speed at which you can continue to accelerate to the next shift point. You sometimes need a setup just for making lp's. This also is very imporant for fast, sweeping corners. The ai want to slow down for every corner, even if it's not needed. The other ai bug is esses. The ai want to turn at every bend of the track, even stretched out esses where you could drive straight through. And, they're technically corners, so they want to slow down. Two ways to try and overcome this. One is to approach the first turn with a constant throttle from a late apex. Then, don't turn the wheel as much as just lean on it ( kind of like taking a corner on a bike, just a bit of pressure on the wheel ). Now, go from the constant throttle to an increasing throttle ( like the turn scenario already mentioned), while shifting the wheel pressure in the opposite direction. (piece of cake...ha ha ha) The second trick is added to the first. Make the race lp cut across the non-racing surface apex of each bend. The ai will usually still race only on the pavement ( but I've had some tracks where they will put two wheels off ) but may cut the corner if they're crowded off. Even if you make an lp where you put two wheels off, and the lp is completely on the track, make the min/maxrace go considerably off the racing surface; it sometimes lets the ai get closer to the actual apex.

2. A fast.series.car __need enough gear for speed. Other car parameters affect the ai car, such as wing, but not to a large degree, may help for fine tuning instead of track ini, but will usually make enough of a difference that it will make you redo the track ini settings. The best advice is to come up with a very competitive car setup before you start to tweak the ini. I usually use "my" setup after I make the top gear higher by one or two clicks, and then re-label it "fast.xxx.sim". This just ensures the ai will be able to reach top speed. The other thing you'll need before any tweaking begins is an ai roster ( in each series ) in which you already know how they will run against you. I have 2 very strong cars ( 80-90 or 90-95 in the "big factor" catagories ) in each series that will run as fast or faster than me, and 2 that are just below that ( cars that I should be able to stay ahead of, even if I'm not perfect ). Develop these ratings on a track where you're extremely proficient. You can then use their laptimes to help determine if you've got a fast setup in a series where you're not as fast as your favorite. A way to further hone your base ai is to go to a track that is raced online by quality ( fast ) drivers, and measure your laptimes against theirs. Then if you're not particularly adept at a series, you can adjust your ini tweaking to meet a qualified guess for 100% ai.

3. track.ini

Track


A. major adjustments:

1) track_asphalt_grip : set no higher than is necessary to get your car to feel like it has the right grip ( from driving experience ). The higher the grip, the looser the setup needs to be. When grip is too high, it's harder to free up the car. On roadcourses I've been using 1.03 for the Papy folder ( cup, cts, pta ), and 1.05 for gtp. When the ai cars bounce when you hit them ( in GTP ), there's too much grip. When the ai car hits you and causes an easy rollover, there's too much grip. All cars drift, even gtp. All cars can spin the wheels accelerating from a corner, they're high horsepower race cars.

2) track_concrete_grip : technically concrete has less grip than asphalt. I normally make the grip the same. ( I believe the exe applies less grip ( than asphalt at the same setting ) to the "concrete" designation. ) Sometimes, especially in gtp, the ai can outbrake the player no matter the ini setting ( often happens at the end of an 'accelerating straight' to a heavy braking corner ). In other words, you lower the "ai_decel_modifier" so far that you run into the back of the ai at that corner, but they still nail you if you're in front. If you change the asphalt property characteristic in sandbox to concrete ( for the section leading to the corner, you can raise the grip level at that particular location ( which will give you more stopping power ) without raising the grip for the whole track. The ai probably won't gain as much benefit as the player.

3) track_tire_heat : tires start losing grip above 220 degrees. Make your best setup, then adjust the setting to give as high a temp to 220 as possible, although it may go to 230 at some places if it then goes back down. I just try to reward a good rolling, smooth driving setup and penalize a poor, wheel sawing sliding one.

4) track_tire_wear : generally just transfer from track to track. Exception would be for cup. I got tired of tires not lasting for a fuel run, because I then had to tweak the ai gas mileage to let them run as fast as I could and pit when my tires blew out. Now I set it in cup to make my tires just last a fuel run ( as long as I don't spin more than once ), and adjust the ai wear out range to match my wear out laptimes.

5) track_tire_wear_loss = 0.08 to 0.20 : consider yourself the tire manufacturer, you build the tire that gives the desired results

6) track_tire_wear_exp = 1.00 to 1.75: consider yourself the tire manufacturer, you build the tire that gives the desired results

7) starting_grid_0 (1)= 1 : 1= left side pole; 2=right side pole
Make pole starting grid position "stall_0" in "pace grid" on the proper side, then work the rest of the field off that. If the pole position is the starting position closest to the track's centerline, and the second line is on the outside of the track, there will be less passing and mayhem into T1 because there's no passing on the inside before the S/F line, and there's no room to pass on the outside ( the two rows are on the outside half of the track ).

8) pace_speed_limit_mph : For short pace, a slower pace speed allows the back of the pack to get set before the green flag drops. A faster pace speed may not let the back of the field catch up ( roadcourses ) before the green flag. The disadvantage of that is it spreads the field ( usually for no more than 1 or 2 turns ), the advantage is it can alleviate congestion at T1.

8) starter_decision : from S/F line, usually 100 (far) to 50 (close). It gives ai time to get lined up and the late start keeps the back cars from getting a run to the first turn, which helps keep the field a little spread out and less of a T1 mayhem.

AI_Track


Required: It's essential that you have a base core of cars that you can predict their laptimes and final results based on your laptimes/results. (In other words) Ai ratings { Main Page > Opponent Manager > Ratings } that have results at a track where you know their strength/results. You can judge their ability/laptimes vs. yours; this creates a baseline for you to adjust their results based on yours. There are so many variables in the track.ini entries that it's not possible to get a consistenly good result without a good ai baseline. Include an ai car that has 100% ratings in each category. It gives a consistent laptime with every lp, so a new lp can evaluated with previous versions. I don't worry about pitting stategy with the 100% car, the 100 ratings seem to skew their pitting ( often first in_early, or not pitting_out of fuel ).

A. major adjustments:

1) ai_grip_modifier : { series physics ( i.e. mods ) , race.lp, and individual track physics determine ultimate effect } Except for a new faster race lp ( and ai_line_modifier ), the only way to get the ai faster laptimes. This is why it's much easier to "do" ai when you use a real race type lap as the race lp. The higher the value, the better grip the ai have, so if you have a slow race lp, you need to raise this and the ai sticks better than you. They'll corner faster, and contact with them will be detrimental to you. "ai_inverse_slipcurve_k " will combat this some, but not enough if you have to set it to high.

2) ai_drag_modifier : { when used in large increments, i.e. .20 and .50 jumps } I only include this here as a reminder to see if their top speed is the same as yours before you over-tweak the grip modifier.

B. fine adjustments:

1) ai_accel_modifier : { .x to .0x range } adjust to player accel/ideal track laptime (micro adjustment). It's sometimes hard to tell if their too quick. The easiest place to check is leaving a turn to a long, fast straight. It's easier to tell if they're not quick enough. Any tight turn where they're in front and you're able to catch and pass them in a relatively short distance with no discernable alien driving by yourself. !!! { May need adjustment if the is raised or lowered significantly. }

2) ai_decel_modifier : { .x to .0x range } adjust to player braking. I don't like getting punted, and I don't like getting brake checked and then they speed off. !!! { May need adjustment if the is raised or lowered significantly. }

3) ai_line_modifier : The AI line modifier changes the AI's perception of their grip limit. At 1.0 they see 100% of the actual grip they have available to them ( as set by their grip value in the track.ini ). Decreasing its value will make them drive like they have less grip and run easier into and out of the corners, and will also slow their speeds slightly. Raising the value above 1.0 will make them think they have more grip then they actually do, and they will charge the corners harder. In some cases going slightly higher then 1.0 can help make them ( ai to ai ) race better and race you harder ( they try and pass you, or run through you, all the time ). It's like giving them an adrenellin shot of agression. Going to high may cause them to over drive, and wash up the track or check up as they slip beyond their grip threshold, but you'll "kill 'em" before they reach that stage. I've used it to help them negotiate ai bugs or just as a little pick 'em up instead of giving them more grip. I've used 1.07 down to 1.005. When nothing else is helping, or you just feel all the parameters are about right but they're still a little slow, give it a shot. About the only time I use less than 1.00 is if they want to drift too much in a corner, but this also slows them down, so you'll have to get them some more speed from somewhere else. I'd rather just make a new race lp.

Added for GTP: On tracks that the ai are bouncing, and can't even drive a lap, lowering this to well below 1.00, say 0.40 to 0.80, will allow the ai to drive but may still bounce upon contact. When using such a low line_modifier setting, the ai will crawl through the corners. The "accel & decel" modifiers will need to be raised closer to 1.00. The whole deal is a lot of trial and error. ( tweak discovered by DjKane )

4) ai_inverse_slipcurve_k : when used in small increments, i.e. .05 and .10, to get ai to stick, while still allowing ai to to break loose when bumped (not always achieved). May be used to simulate player-like slide offs/traction loss if occurs infrequently (could also depend on driver ratings.) I just don't like to be the only accident recipient, whether I'm bumped or I do the bumping. Normal settings for me 60-75, as low as I can get it without the ai losing it in the corners, or as soon as they have an equal a chance of losing control upon contact as I have.

5) ai_drag_modifier : controls ai top speed. Higher number gives more drag, slows them down.

6) ai_dlongpad_scale : used to get ai to take fast corners without using brakes or checking up. 0.3 seems to work without any bad effects. Haven't seen any improvement by going lower. Tried to use it with a higher setting to get them to slow up, didn't help, used the concrete for asphalt remedy.

7) ai_tire_wear_left (right) : adjust so ai tires wear at the same rate as the player's. Figured by player vs. ai laptimes, lap for lap.

Gtp tire wear does not degrade performance, so I set it at 0.25-0.45, and check laptimes against mine for match up ( for all series )

Pta tire wear usally does not degrade performance, but there may be a slight fall off in laptimes. usual would be 0.35 to 0.50.

Cup definitely has tire wear and it degrades performance. I try to make the player's tires just last for a fuel run ( with no allowance for abuse ) by adjusting the settings in the "track_cup" stanza. Then tweak the ai ini tire wear to match my performance.

Cts is basically the same as cup, but I allow less fall off in performance than in cup since the trucks are lighter and more nimble.

8) ai_squeeze_pcnt : no one knows for sure. I've used it to hinder ( a braking situation I think ) and help ( a cornering problem because of a track flaw ) the ai. I do know, if it's too high, the ai just drive off the road for no reason.

9) ai_qual_modifier : raise or lower to get the ai qualifying time where you want. I set it so the 2 fastest are faster than me, but not so fast that I can't beat it if I have a real good lap ( every once in a while ).

10) ai_fuel_use = 1.00 : know what the player's max is, then make the ai run out at the same time ( use the 4 fastest cars as a gauge ). Getting the ai to pit properly, before they run out of fuel but not for tire wear ( adjust that to match player wear ), is another tweak. (See 11--next). !!! { To get the ai to not pit ( so they run out of fuel ), to find their maximum fuel range, make strategy_base_pitting_cost = 1.5 or more. }

11) Pitting--use all three stategies together to get the ai to pit like the player. It's trial and error. The ai may pit differently if there's less than 24 cars than they do if there's more than 24 cars. Depending on the track length ( roadcourses ), proper pitting for 1x fuel may require different settings than 2x fuel.

strategy_lap_time_wear_loss ___ strategy_base_pitting_cost
Use this to make them pit by raising it ( 8-30 usually works ), or make them stay out by lowering it ( 1 or .xx )

strategy_lap_time_fuel_use_gain ___ lap time gain from low fuel
Use this to make them pit by lowering it ( 1 or .xx ), or make them stay out by raising it ( 5-8 )

strategy_base_pitting_cost ___ time lost to a stop & go pitstop
Normal setting is 50.0. You can also use this to make them pit ( lower ) or stay out (higher ), but it's a lot trickier, so I use the other two first.

12) ai_panic_decel : G's of extra deceleration inducing panic. When the ai panic they can either brake very hard or change lanes. I don't care as long as they don't run into me, but they shouldn't be doing it all the time ( they also panic for other ai ). I go as high as the teens ( pta ), but I normally use 3, 4 if I see bumping.

13) ai_dlat_pad : this is how close the ai will run side to side. I'm not sure if it relates to only ai to ai, or if it also is ai to player. I've gone as low 0.45 in gtp, but 0.65 is my standard. If you get a lot of side to side collisions, I'd raise it. I would consider 0.85 to be high, but at some point I forgot what a good setting was and was using 1.45 and it didn't make a noticeable difference. Too high can inhibit passing.

AI To AI


1) ai_wall_offset : how much contact is not felt by ai to ai. At 1.00, it's the same as player contact. At 0.0, they'll morph into each other. 20 seems to look like it's normal contact, but they bump each other without wrecking.

2) ai_pacing_distance & ai_bunching_distance : 2.0 is my standard, but I've used 1.75 to 4.00. I normally use the same value for each. At one very fast track ( Forest Park ) I had the gtp pace at 1.75 and bunch at 3.0 because they were so fast they'd all come together out of T1 and cause a big fiasco. At roadcourses, depending on the last turn and the S/F line, the field gets strung out, not a bad thing as the tail end catches in T1 anyway. I just space them to get as little mayhem in the first half lap as possible.

3) ai_drafting_distance : another of the "I'm not sure if it relates to only ai to ai, or if it also is ai to player" entry. 1.07 doesn't usually cause problems ( collisions ) or inhibit passing ( although it may take a little longer to happen ). If I don't see much passing, I'll lower it to 1.05.

Miscellaneous


1) pace_speed_limit_mph : 70-75 for big fast tracks. 45-70 if track requires it.

2) speed_limit_MPH ( pit lane ) : This ain't the real world, I hate 35mph down a quarter mile pit lane. 70 or 75 is the highest the spotter will call, so that's what I go with. A narrow short pit lane would require a slower speed, but that's the only reason.

3) [ pit_lane_0 (1) ] :
a) merge_from_pit_line_dlong : Make pit0 lp coincide to race lp at a dlong location ( distance from s/f line ) where the ai can merge from race traffic without causing slowndowns to cars at speed or creating accidents. Then enter this number in the track ini.
b) merge_to_pit_line_dlong : Make pit0 lp coincide to race lp at a dlong location ( distance from s/f line ) where the ai can merge to race traffic without causing slowndowns to cars at speed or creating accidents. Then enter this number in the track ini.3) [ pit_lane_0 (1) ] :
c) merge_to_pit_line_length : length in meters from to the last chance for the ai to enter the pits_this can help get ai to pit if they are held up from getting to the pit lp by another car, or if they run out of fuel after passing the pit merge dlong.
d) pace_merge_from_pit_line_dlong & pace_merge_to_pit_line_dlong : these lines are required for proper "full pace lap" compliance by the pace car. If these are left out, the pace car will immediately turn off the track and the green flag is waved.


Papy AI


papy_ai.ini : { affects all series; probably best left to a specific mod shortcoming [ as it relates to offline player ] }
{ adjust if track folder adjustments come up short of wanted results }
!!! { These are the numbers I currently run, and have run for two years. I only had 2 tracks that may have been negatively affected, but I never confirmed that. }

A. [ driver ]

1). ai_strength_to_traction_circle : { lowered_1.0 to 0.8 }
2). ai_strength_to_aero_drag : { lowered_0.3 to 0.1, based on Lemans 67 actions }
3). ai_strength_to_aero_drag_spread : { lowered_4.0 to 2.0, based on Lemans 67 actions }
4). driver_roadcourse_to_traction_circle = 0.03
5). vehicle_aero_to_aero_drag = 0.13
6.) driver_consistency_to_driver_commitment_dev = 0.07 ;{{ DEFAULT }} {{ 0.03 }} @5.0kicks to desk up to .15ok ++= 0.13
7.) driver_consistency_to_dlong_lookahead_dev = 0.25 ;{{ 0.4 }} ?0.8 at one time? @9.0?
8.) driver_consistency_to_dlat_lookahead_dev = 1.95 ;{{ 1.50 }} ++= 0.95
9.) driver_consistency_to_left_offset_dev = 0.58 ;{{ 0.08 }} ++= 0.98

B. [ mechanical ]

*1) suspension_problem_roll_adj_coeff = 0.1 { value * susp. condition adjusts roll }
*2) suspension_problem_slip_angle_adj = 0.15 { value * slip angle * k is added to suspension coeff. }

C. [ physics ]

1) alt_accel_k1 : { k1 for altitude control spring/damper__0.085 original papy } { gtp physics : 1.085=bouncing cars; 0.005=poploose@bank; stick@0.01_hispeed corner +14mph .015= +2mph@corner___@ Lemans 67}
*2) alt_accel_k2 : { k2 for altitude control spring/damper__0.28 original papy }
{ 1.28=bouncing cars; .03=bouncy cars @speed } *3) pitch_accel_coeff =3.0 : { value * averaged_applied_tire_dlong_accel = radians of pitch } { 13.0,0.1 }
*4) roll_accel_coeff = 4.0 : { value * dlat_accel = radians of roll } { 10.0, 2.0, 0.9 }
*5) yaw_accel_k1 = 0.02 : { k1 for yaw accel. spring/damper}
*6) yaw_accel_k2 = 0.2 { k2 for yaw accel. spring/damper } { 2.0 = no traction }
*7) yaw_accel_control_angle = 2.6 { slip factor above which accel spring/damper effect is reduced }
*8) yaw_accel_control_dropoff = 5.0 { dropoff factor above control angle }

D. ***CAR CLASS PARAMETERS***

# 1) braking_efficiency_coeff :
# 2) nominal_max_accel :
# 3) nominal_traction_circle :


AI To AI Control

1. papy_ai.ini

a. driver_consistency_to_driver_commitment_dev = 0.03
b. driver_consistency_to_dlong_lookahead_dev = { raised_1.0 fom 0.4 }
c. driver_consistency_dlat_lookahead_dev = 0.75

last upd 5-30-07
*__couldn't find noticable change
#__needs further review