[gameprogrammer] Re: AI for race games

On Saturday 09 December 2006 03:13, Edilson Vasconcelos de Melo Junior 
wrote:
> Hi,
>
>
>
> What is the best AI algorithm for race games?
>

Racing is whole a lot different thing in AI than anything else.

There is only "one way" the racer can go.
The optimal racing line is an other thing,
but it has nothing to do with AI (when there is no one immediately in 
front of the driver). So because the racing line is constant on "empty"
track it can be saved with the track.

The only thing that you need AI is to how to act, when cought behind an 
slower driver or faster driver trying to pass the AI-driver.

One has two or three options debending on the situation when there is 
slower driver in front.
One is to try really hard and pass the other driver.
Other options is to go on ecenomy mode and drive saving fuel and tires.
The thirth one I mentioned is the possibility to pit now. The last 
option needs to be "thought" carefully, because it will add the fuel 
load and heavier cars are harder for tires and slower than light cars.

When some one is coming behind and it is in the same lap change the 
driving line to be more covering ie change braking in lines a litle bit 
more to the inside of the corner and reduce the speed more so that the 
exit line can be made optimal. this way the one behind you has to more 
or less do that too. Of course if the performance difference is too big 
then the other driver will most likely out break the AI-driver after 
the longest straight in the track.

PS. To get some help look torcs.org and see how they have the robot 
drivers AI done. You can also try to build your own driver robot to 
torcs to test your ideas in a well behaving environment. Then simply 
change thease ideas to your own game.


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: