Forums

Full Version: AI doesn't know when to use the reverse gear
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

i watched the AI. How the AI drives and come to the conclusion that the AI do not use the reverse Gear. In some situation when the car touchs a crash barrier the car has no chance or it cost to many time to get on the road again. In this situation it should use a reverse gear.

Code:
y1=course of the crash barrier
y2=course of the AI to the road
x=sharpest curve factor
IF y1(x)==y2(x):
    use reverse gear

This doesn't work. Maybe somebody has a good idea ?

regards Markus
It would probably be sensible to instruct the AI to employ reverse and appropriate whenever it is stopped and the direction of the nearest point on the course is more that 3 * M_PI / 4 (135°) from the direction the vehicle is facing.

But there's a lot of work needs doing to the AI. Most of what it does seems from observation to be guess work, so many cars fail to even turn corners properly (M7 is an example of this behaviour IIRC). Also, there is no collision avoidance. These are not trivial tasks by any means.
Indeed, the current AI is just a simple steering algorithm. I was looking at the TORCS AI and boy, it's complicated.
joevenzon Wrote:Indeed, the current AI is just a simple steering algorithm. I was looking at the TORCS AI and boy, it's complicated.

Me gets a thougt... What about a TORCS-AI layer so torcs AI's can run in VDrift? (ofcourse no binary compat, only source code compat) Or would that be just plain impossible to program, or would it give a too huge performance penalty because then we have to convert (track and car ) data from one API/structure to another?
I think it's a good idea, but it'd be a lot of work.
joevenzon Wrote:I think it's a good idea, but it'd be a lot of work.

Probably its a lot more effort to port the torcs AI's or write a lot of good AI's ourselves.

Also note that torcs robots are pretty good + torcs got new attention with torcs-ng (torcs-ng.sf.net)