>>40
what
>>42 says. A lot of game ai can be modeled with simple state machines. When a car has lost control and exits the track, it can transfer its state to the ``get back on the track state''. Then once it is back on the track it can go into the ``go as fast as possible without hitting the walls on the turns'' state. And then when it approaches the player from behind, it can choose to go into the ``try to fishtail the target'' state, where the target has been assigned to you. When the driver is in each of these states, optimal driving patterns can usually be calculated using some physics. Something this simple can end up producing a very brutal and unbeatable opponent. It actually takes more effort to make an AI that drivers dumber so that the player wont be completely frustrated.