>If something is calculated using constant values it itself must surely be constant, right? Can't see any way out of that.
Only at the certain point of the track. At other points the calculation will be different as the input values will be different.
However, this doesn't mean the input values are not constant. You just has to look then up in an array or matrix or whatever.
>Now if the cars were nice and simple. No aero, no fancy springs, constrained to a 2D plane of the track with a grip that >doesn't vary at all around the corner we'd perhaps have a chance at finding the best line, especially for simple single >corners. As it is, with the grip at every simulation tick dependant on all the previous ticks? No chance.
Why are you insisting that the best line cannot be pre-calculated? Even F1 2011 does this with that driving aid.
>Incorrect. Cold tyres, worn tyres, options/primes, amount of water on the track, track temperature, fuel quantity, damage, >horsepower, brake wear, whether KERS/DRS are available, fuel mix... these things can only be known as the car is >actually going around the track. Even if these we all known see above for why it can't simply be calculated.
As I said this just modifies the car's grip value. Cold tyres, worn tyres: subtract some value from the grip, options/primes: different initial grip and tyre wear, etc. Let's see an example:
Assume that an AI car's default grip value is 200 in Monza. Let's say we have 50% fuel and worn tyres. Let's say this will reduce the grip value to 100. Now, let's see other parameters like brake wear. Let's say the maximum deceleration is 4.5g (predefined value). Break wear, tyre wear and fuel load decrease this to eg. 4g (wings does not count, they are factored in the default grip value).
Let's say the AI car is travelling at the start/finish line at 300kph with calculated grip value 100. The AI looks ahead and see the first right hand turn. It sees that at the slowest point of the turn the track grip value is -500. Also, the wheels have to turn also and that's further reducing grip, let's say -30 (just look it up in a table). So, the calculation will show 100 + (-500) + (-30) = -430 for the grip value. Grip 0 means the car is on the limit, so grip -430 means it has to break to manage the turn.
At this point the AI looks into a table and finds out at which speed the car grip value will be 530. Let's say it finds that at 90kph. So, it has to be slow down from 300kph to 90kph. That's 210kph difference. With 4g deceleration is can easily calculate the break distance. If the track is wet the grip of the track at this point will not be -500, but eg. -1000. And the deceleration will be eg. 2g not 4g. And that's all. With just changing some values you simulated wet track.
Now, tell me how this cannot be done at real time.