Is that AI driving most of the cars and do you know if track creators need to define things in the track for the AI or whether they just sort of know what to do on these new tracks?
This is a shortened version of how it's done....
As far as I know, every game we play only has what I call the "actual intelligence" hard coded into the game itself. And by that I mean it's basically just how the AI avoid you and the other AI on the track.
Then, they create what I call the "AI Path".
The "AI Path" is track specific and coded after the track is finished.
Basically, they load up the track in a special "AI Editor". Then, they hop in a car and drive around the track. The editor creates waypoints based on the path taken. Save the path/waypoints. Start again and take a slightly different path, save. Repeat until there are enough paths for the AI to take.
In other words, the paths are created by people. I believe this is why some tracks (mostly the mod tracks) have better AI speeds/braking points/etc. than others. As the person creating the track might be really good at modelling said track, but can't drive for shit when it's time to create the paths.