Neural network for racing AI
As an aside, I found that the "driving license" mode of GT4 does an excellent job of explaining proper cornering technique, in easy terms.
Quote: Original post by SteadtlerYes, of course, I admit it. It just took me some time to find out how to do it exactly.
Thats pretty much the same as following a well-defined raceline, dont you think?
Quote: Original post by SneftelWell it's not that I don't know anything about NNs. We used them for pattern classification at uni and I have a feeling for what they can and can not. Just wanted to give it a try, but since the AI is fast enough with my current approach NNs aren't needed anymore anyways.
1. Those who understand the tradeoffs between NNs, bayesian networks, naive bayesian networks, ridge regression, linear regression, logistic regression, etc.
2. Those who think that "neural network" sounds all cool and brainy.
Quote: Original post by vokuhila
Well it's not that I don't know anything about NNs.
It's not a matter of knowing anything about NNs. NNs are a pretty simple concept. It's a matter of knowing about the alternatives to NNs, and the conceptual framework in which NNs are relevant.
I recommend this link about an interview with Jeff Hannan, creator of the Artificial Intelligence for the excellent Colin McRae Rally 2.0. A "commercial game" that uses neuronal networks to implement a rally car controller:
http://www.generation5.org/content/2001/hannan.asp
http://www.generation5.org/content/2001/hannan.asp
A waypoint system which defines a best line for the ai cars to follow is usually suitable for most racing games. Which is actually what was used in Colin Mcrae 2. Great game by the way.
As used in my game "Auto Cross Racing" available at www.kjmsoftware.co.uk/
to see the system in action.
Each ai car aims for the next waypoint and moves on to the next in the sequence when it comes into range of it's target waypoint.
Each waypoint can also have a desired speed variable, which the ai cars would aim to achieve when they reach that waypoint. This way the ai cars are give direction and speed inputs. The ai cars outputs are steering and throttle / brake.
A simple Dot product of two vectors will tell each ai car if it is either to the left or right of each waypoint.
Direction vector 1 = Unit vector rotated by the cars yaw orientation
Direction vector 2 = Unit vector from cars position to waypoint position
The sign of the Dot product between both vectors should tell you to which side of the waypoint the car is pointing. eg, Left = negative, Right = positive.
Hope that helps
KJM
As used in my game "Auto Cross Racing" available at www.kjmsoftware.co.uk/
to see the system in action.
Each ai car aims for the next waypoint and moves on to the next in the sequence when it comes into range of it's target waypoint.
Each waypoint can also have a desired speed variable, which the ai cars would aim to achieve when they reach that waypoint. This way the ai cars are give direction and speed inputs. The ai cars outputs are steering and throttle / brake.
A simple Dot product of two vectors will tell each ai car if it is either to the left or right of each waypoint.
Direction vector 1 = Unit vector rotated by the cars yaw orientation
Direction vector 2 = Unit vector from cars position to waypoint position
The sign of the Dot product between both vectors should tell you to which side of the waypoint the car is pointing. eg, Left = negative, Right = positive.
Hope that helps
KJM
Quote: Original post by K_J_M
A waypoint system which defines a best line for the ai cars to follow is usually suitable for most racing games.
I think it's worth stressing that although in some cases waypoint systems are appropriate, that isn't always the case.
If you use just a waypoint system you are implicitly relying on the fact that the vehicle controller can accurately track linear segments, and that the dynamics effects of switching between segments are negligible. For some vehicles this may be acceptable, and for others it might not.
There are lots of examples where a level designer / artist could place either too few or too many waypoints without having a sufficiently good understanding of the underlying dynamics to predict what the results will be. Think about sharp 'S' bends and the results of under or over damped response tracking a linear segment.
Waypoint based planning has it's merits, but there are alternative path representations (including splines), which may be more appropriate depending on dynamics and control.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement