ID:153865
 
I have been working on a racing game, and up until this point it has been quite easy. Now comes the hard part, adding AI racers. I have almost no idea where to begin. I could put invisible checkpoints on the map and program the AI racers to go to them in order, but that would require a lot of checkpoints. Also, I would need some way to have them determine when to brake, and when to accelerate. Does anyone have any ideas?
The first thing I would focus on is getting a single AI racer to complete a lap of the course. They should take the turns tight, and always know where the inside of the track is. The closer you are to the inside, the shorter the course is. After that I would have two AI racers run the course, and see where adjustments need to be made. If your moving faster than the guy in front of you, try to take the inside lane and pass him, if that's not possible, take the outside or wait until it is possible by slowing to his speed.

~X
In response to Xooxer
The problem is that I don't want to program an AI opponent for the one course I have done now. I want it to be easy to make a new course and have AI work for that course too. I will probably put invisible markers for each turn, actually it'll have many for each turn. Also, they will have to take turns somewhat properly, so that they don't wear out their tires after one lap. But for now, seeing as how I have no AI programmed yet, I will work on having one AI racer be able to complete a lap.