Sign in to follow this  
r4d4

2D car AI

Recommended Posts

r4d4    102
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?
[img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]

Share this post


Link to post
Share on other sites
LorenzoGatti    4442
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)?

Share this post


Link to post
Share on other sites
r4d4    102
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?

Share this post


Link to post
Share on other sites
r4d4    102
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this