Okay, ignoring the fact that I think more people would be interested in this project than just programmers, I have picked FE1 as the track to start on.Not yet sure the car, but that is not a big deal.
My first step is to compute the theoretical best line, or the line the AI drive will try to drive around. Given that I am trying to resemble how a human would do this I have decided to call this portion of the AIRS project the "Track Walk".
During the Track Walk, the artificial driver will gather all the reference points around the track. Most importantly; Left Edge, and Right Edge. But any other reference points, like signs, cones, curbs, bumps, etc, would also be gathered at this time and stored in the drivers memory for later use. Though I am calling this the Track Walk, it is simply taking the reference point data and tossing it into the artificial driver, in no way is the artificial driver 'walking' the track.
Unfortunately, the Left/Right Edge reference points will need to be ordered as they go around the track, they can't just be random points, as that could cause misjudgment of a hairpin or chicane possibly. But this can be achieved, and is how one would walk around the track anyway.
Once that reference points have been gathered, the center line is computed from the Left Edge and Right Edge reference points. This will be achieved by taking the leftEdge[n] and leftEdge[n + 1], computing the perpendicular to this, ignoring height changes, and checking all rightEdge[m] and rightEdge[m + 1] until a collision occurs. Once this perpendicular 'leftToRightEdge' is found, placing the center point is simply a matter of scaling it back by half. Then continue with n = n + 1, until the track is completed.
This is obviously not the best racing line, yet. But it is the very first step needed to get there. The Track Walk will only be completed once the best line is found. I am starting this project from scratch, using very little to nothing of what I previously wrote. I plan to gather the Left Edge and Right Edge reference points from FE1 and I plan to make the AIRS project display what the AI driver is seeing, to later help with debugging and tracking. Previously I relied on print statements, which proved little help once the car got moving.
One problem I need to overcome to make this work with LFS is the PPJoy calibration. Last time I could not get it calibrated without a giant hack, it seemed holding the steering wheel at -15 degrees was 'straight'. I will have a copy of LFS meant only for the AIRS driver so that I don't need to fiddle with configurations like I did last time.
Lets see if I can do this project setup, and this portion of the Track Walk before June 1st 2013.