🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

2D car AI

Started by
2 comments, last by r4d4 12 years, 4 months ago
Hi,

trying to get a car to drive around a track fairly realistically and avoid other cars , overtake etc.
Its a top down perspective.


I tried doing it 'on the rails' but getting the overtaking going proved tricky. I tried making them drive on there own more and turn by actually looking at the track sides but it wasnt very convincing to look at.

Im thinking of trying again 'on the rails' but doing some simplistic way of sort of forcing them to overtake randomly - (if you get what i mean?!)

Any suggestions?
blink.png
Advertisement
What are the inputs of your AI driver? You mentioned "rails"; can you author them for all tracks? Can you afford rails with predefined lane switching points? Or you need an AI that can drive on any track without significant hand holding? Can you make the AI learn tracks by racing against the clock (maybe with dummy opponents to learn where to overtake them)?

Omae Wa Mou Shindeiru

The inputs of the AI drivers willsimply be 'driving skill' and 'experience' with the latter being akin to consistancy / chance of making mistakes.

I can author rails for all the tracks and I could have lane switching points.

- In fact what I tried once was having 2 lanes, outer and inner. The car would switch lanes to obtain a racing line. The had the option of not switching lane if they were close enough to try overtaking. Problem was not taking the racing line was always slower so no one could ever overtake.

In theory I could get the cars to learn the tracks, I wouldnt know how to do that particularly . Would that be a neural net?
It may be the problem was that the cars were too closely matched. I might have the code lying around somewhere
I suppose I could post it

This topic is closed to new replies.

Advertisement