Does anyone have pointers to articles or resources on the web where I
can research this topic? I want to learn about the various approaches
that have been tried, and understand their benefits and drawbacks.
Notable threadHow racing game AI drivers are programmed
A request for resources on racing AI drew detailed explanations from developers including J. Todd Wasson and Jeff of Razorworks, who described following predefined lines with steering formulas versus fully free AI that reads the road. Ruud van Gaal argued AI should aim for good gameplay and could cheat slightly on grip rather than emulate humans, while Peter Ives wanted varied, human-like braking behaviour. TORCS developer Bernhard Wymann pointed to TORCS and RARS as open AI projects, and the original poster mentioned a job opening for a race AI programmer.
With Jeff (Razorworks); J. Todd Wasson (Performance Simulations); Bernhard Wymann (TORCS)
Automated summary.
On Tue, 11 May 2004 17:48:20 GMT, Joe62
<[email hidden]> wrote:
>Does anyone have pointers to articles or resources on the web where I
>can research this topic? I want to learn about the various approaches
>that have been tried, and understand their benefits and drawbacks.
Good question. I was just pondering that the other day.
I'm no programmer, but I wondered just how much "hand-
holding" an AI needs. For example, AFAIK most racing
AIs are coded using various racing lines made by human
programmers, which tell the AI where to go on the track
in various situations.
Would it be more advantageous to make it so that the AI
can "tell" what the best line is through a corner without
someone (human) having to draw a line on the track for it
to follow? Or would the advantages of that approach be
more than offset by the huge programming challenges
that would entail? Will sims still be using LP lines 20 years
from now?
John DiFool
In article <[email hidden]>, John DiFool
<[email hidden]> writes
Let's hope not. In my view, AI won't come of age until you can give it
a track and it can learn how to drive around it just like us humans,
whilst at the same time, having various weightings which allow some AI
to learn and drive better than others.
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -25.01
Quoted text (22 lines)
>On Tue, 11 May 2004 17:48:20 GMT, Joe62 ><[email hidden]> wrote: > >>Does anyone have pointers to articles or resources on the web where I >>can research this topic? I want to learn about the various approaches >>that have been tried, and understand their benefits and drawbacks. > >Good question. I was just pondering that the other day. >I'm no programmer, but I wondered just how much "hand- >holding" an AI needs. For example, AFAIK most racing >AIs are coded using various racing lines made by human >programmers, which tell the AI where to go on the track >in various situations. > >Would it be more advantageous to make it so that the AI >can "tell" what the best line is through a corner without >someone (human) having to draw a line on the track for it >to follow? Or would the advantages of that approach be >more than offset by the huge programming challenges >that would entail? Will sims still be using LP lines 20 years >from now? >Papyrus made a game called SODA Off Road Racing in 1997.You could make your
own tracks. The thing is before you could race the AI on your track, they
had to "learn" it.Could take 10 minutes or an hour or so, depending on how
complex the track was.The AI , just looking now, seems to be in a dat file
for each class of vehicle( 3 classes).No LP files like GPL
--
Steve H
GPL Rank -17.90
Can't help about the shape i'm in
Can't win,it ain't pretty and my tires are thin..
"Peter Ives" <[email hidden]> wrote in message
news:[email hidden]...
> In article <[email hidden]>, John DiFool
> <[email hidden]> writes
> >On Tue, 11 May 2004 17:48:20 GMT, Joe62
> ><[email hidden]> wrote:
> >
> >>Does anyone have pointers to articles or resources on the web where I
> >>can research this topic? I want to learn about the various approaches
> >>that have been tried, and understand their benefits and drawbacks.
> >
> >Good question. I was just pondering that the other day.
> >I'm no programmer, but I wondered just how much "hand-
> >holding" an AI needs. For example, AFAIK most racing
> >AIs are coded using various racing lines made by human
> >programmers, which tell the AI where to go on the track
> >in various situations.
> >
> >Would it be more advantageous to make it so that the AI
> >can "tell" what the best line is through a corner without
> >someone (human) having to draw a line on the track for it
> >to follow? Or would the advantages of that approach be
> >more than offset by the huge programming challenges
> >that would entail? Will sims still be using LP lines 20 years
> >from now?
> >
>
> Let's hope not. In my view, AI won't come of age until you can give it
> a track and it can learn how to drive around it just like us humans,
> whilst at the same time, having various weightings which allow some AI
> to learn and drive better than others.
> --
> Peter Ives (AKA Pete Ivington)
> Remove ALL_STRESS before replying via email
> If you know what's good for you, don't listen to me :)
> GPLRank Joystick -50.63 Wheel -25.01
> Papyrus made a game called SODA Off Road Racing in 1997.You could makeyour
> own tracks. The thing is before you could race the AI on your track, they
> had to "learn" it.Could take 10 minutes or an hour or so, depending on how
> complex the track was.
Isn't that how LFS is? They supposedly get smarter the more they run the
track. I never got to that point though. Last time I played, they were
still running into tire stacks and such.
Alan
Quoted text (11 lines)
>From: John DiFool [email hidden] >Date: 5/11/2004 6:21 PM Central Daylight Time >Message-id: <[email hidden]> > >On Tue, 11 May 2004 17:48:20 GMT, Joe62 ><[email hidden]> wrote: > >>Does anyone have pointers to articles or resources on the web where I >>can research this topic? I want to learn about the various approaches >>that have been tried, and understand their benefits and drawbacks. >Quoted text (7 lines)
>Good question. I was just pondering that the other day. >I'm no programmer, but I wondered just how much "hand- >holding" an AI needs. For example, AFAIK most racing >AIs are coded using various racing lines made by human >programmers, which tell the AI where to go on the track >in various situations. >Good post Todd, just to add my 2p to the thread as another developer:
Racing AI at the bottom end tends to be totally pre-determined, and at the
top end totally "free" (i.e. the AI works everything out for itself on the
fly). The main problem is, totally free is complex, and the hardest part is
"reading the road" - mainly because of the volume of data you have to
process to get good results. Think about what it takes to work out a racing
line - a mental representation of the road, experience of having driven it,
knowledge of your car, track conditions, etc, and then add on all the stuff
in your brain that processes spatial information!
So what tends to happen is you approximate. Racing lines will probably be
around for a while yet, because its a massive compression of complex
information into simple information. I've written a Genetic Algorithm to get
cars creating their own racing line and it works, but it takes quite a
while. You wouldn't let a consumer run it on the their PC or PS2.
You can relax a lot of the other constraints though - for example, if your
AI "knows" how much grip it's got, the width and radius of the track and a
racing line at various points, it can calculate it's braking and
acceleration and can wander off the line, or modify it on the fly to try out
variations or avoid other cars, giving an impression of a sentient driver.
You can also play with these values based on the drivers personality and
"emotion" to further vary it. I've used a method like this for a while and
it works well.
To answer the initial post, you won't find too much. I once saw a paper on
Midtown Madness AI, but that's it. Try to think of all the data an AI needs,
then think about how to represent this in a way that can be used realtime,
then think about how you can modify the information on the fly. Think about
the constraints of your system, and what happens if you can relax them. You
should be able to come up with quite a few ideas, but many will have been
done before! Other key things are, you have to consider the ability levels
of your players, whether your AI will cheat ,and ideally all behaviour will
be deterministic.
Have fun,
Jeff.
And apologies if I got your name wrong as a collegue just told me I had!
"Jeff" <[email hidden]> wrote in
news:c7tgot$4gq$1$[email hidden]:
Wow! maybe that's my problem. I was always told to drive with the
seat of my pants. Whats this Brain thingie?
>
(snip)
Has any sim attempted to creat BOTS rather than packs? From what I
gather, all the AI cars try to basically follow the same set of
parameters regarding lines, speed, etc. I know many sims allow a range
of responses within that set, but still, the whole field is all using the
same info. Would not a BOT system, similar to the FPS games allow more
freedom from each car/driver?
For instance, Michael Andretti has always taken flat ovals in a
Diamond patterned turn. Instead of starting wide and clipping the middle
of an oval's corner, he regularly dives sharply early and apexes halfway
up the track surface. Almost squaring the corner. Most of the rest of
the field he's competed against take a smoother late entry line. Could
this sort of behaivor be simulated?
dh
>
Quoted text (11 lines)
> Good post Todd, just to add my 2p to the thread as another developer: > > Racing AI at the bottom end tends to be totally pre-determined, and at > the top end totally "free" (i.e. the AI works everything out for > itself on the fly). The main problem is, totally free is complex, and > the hardest part is "reading the road" - mainly because of the volume > of data you have to process to get good results. Think about what it > takes to work out a racing line - a mental representation of the road, > experience of having driven it, knowledge of your car, track > conditions, etc, and then add on all the stuff in your brain that > processes spatial information!Quoted text (17 lines)
> > To answer the initial post, you won't find too much. I once saw a > paper on Midtown Madness AI, but that's it. Try to think of all the > data an AI needs, then think about how to represent this in a way that > can be used realtime, then think about how you can modify the > information on the fly. Think about the constraints of your system, > and what happens if you can relax them. You should be able to come up > with quite a few ideas, but many will have been done before! Other key > things are, you have to consider the ability levels of your players, > whether your AI will cheat ,and ideally all behaviour will be > deterministic. > > Have fun, > > > Jeff. >Very true.
From a Game-Development perspective another thing to consider is "what is actually perceivable by the consumer?" and "What is the
minimum work to do the job effectively and efficiently?".
Given the tight deadlines that games are developed to nowadays there is little point investing a year developing a really clever
algorithm that automatically calculates the best racing line, braking points and everything when a simple hand-drawn racing line
will give the same results in a fraction of the time.
Its kind of sad really but unless there are some really noticeable advantages of the more complex techniques I can't see games
moving on.
Regards,
Todd.
"Jeff" <[email hidden]> wrote in message news:c7tgot$4gq$1$[email hidden]...
Quoted text (42 lines)
> Good post Todd, just to add my 2p to the thread as another developer: > > Racing AI at the bottom end tends to be totally pre-determined, and at the > top end totally "free" (i.e. the AI works everything out for itself on the > fly). The main problem is, totally free is complex, and the hardest part is > "reading the road" - mainly because of the volume of data you have to > process to get good results. Think about what it takes to work out a racing > line - a mental representation of the road, experience of having driven it, > knowledge of your car, track conditions, etc, and then add on all the stuff > in your brain that processes spatial information! > > So what tends to happen is you approximate. Racing lines will probably be > around for a while yet, because its a massive compression of complex > information into simple information. I've written a Genetic Algorithm to get > cars creating their own racing line and it works, but it takes quite a > while. You wouldn't let a consumer run it on the their PC or PS2. > > You can relax a lot of the other constraints though - for example, if your > AI "knows" how much grip it's got, the width and radius of the track and a > racing line at various points, it can calculate it's braking and > acceleration and can wander off the line, or modify it on the fly to try out > variations or avoid other cars, giving an impression of a sentient driver. > You can also play with these values based on the drivers personality and > "emotion" to further vary it. I've used a method like this for a while and > it works well. > > To answer the initial post, you won't find too much. I once saw a paper on > Midtown Madness AI, but that's it. Try to think of all the data an AI needs, > then think about how to represent this in a way that can be used realtime, > then think about how you can modify the information on the fly. Think about > the constraints of your system, and what happens if you can relax them. You > should be able to come up with quite a few ideas, but many will have been > done before! Other key things are, you have to consider the ability levels > of your players, whether your AI will cheat ,and ideally all behaviour will > be deterministic. > > Have fun, > > > Jeff. > >> Has any sim attempted to creat BOTS rather than packs? From what I
> gather, all the AI cars try to basically follow the same set of
> parameters regarding lines, speed, etc. I know many sims allow a range
> of responses within that set, but still, the whole field is all using the
> same info. Would not a BOT system, similar to the FPS games allow more
> freedom from each car/driver?
Well, I'd think of a car / driver system as a kind of paired bot system -
and yes, there are games that have treated drivers as bots - the one
semi-sim I worked on did for instance, I'm sure many others do, not least F1
games.
Without a doubt. As long as you isolate your driver code from your racing
code and your car code, it should be fine. You could either model sections
of racing line, or in a nicer way, set some parameters that define how that
driver tweaks the racing line in a given set of circumstances. This would be
a fun one to play with, because your relaxing few constaints and adding a
lot of personality to your game.
Quoted text (9 lines)
> For instance, Michael Andretti has always taken flat ovals in a > Diamond patterned turn. Instead of starting wide and clipping the middle > of an oval's corner, he regularly dives sharply early and apexes halfway > up the track surface. Almost squaring the corner. Most of the rest of > the field he's competed against take a smoother late entry line. Could > this sort of behaivor be simulated? > dh > > >"Alan Le" <[email hidden]> wrote:
| Isn't that how LFS is? They supposedly get smarter the more they run the
| track. I never got to that point though. Last time I played, they were
| still running into tire stacks and such.
I don't know about "smarter", but LFS AI drivers become more familiar
with the track. They don't, however, keep their cars off your paint job,
but they do pull some quick lap times.
What I've done before is make a car setup with zero damping, maximum
ride height, nice springy springs (not absolutely stiff), outrageous
positive camber and toe-out, and run high-pressure knobbies.
Despite this horrible setup, the AI are able to somewhat maneuver
these jacked-up GTIs around the track, bobbling around. This was done
to watch how the AI re-learns the track with such poor handling.
[plus it's fun to get in the MRT5 and zig-zag through the slow field...]
But I digress.
-bpb
On Tue, 11 May 2004 23:21:18 GMT, John DiFool
<[email hidden]> wrote:
There's a book called 'AI Programming Wisdom' which has a couple of
chapters on AI driving. Some presumably from a programmer who did
Midtown Madness, others by people who tackled the program in a far
more elegant way. ;-)
>I'm no programmer, but I wondered just how much "hand-
>holding" an AI needs.
Quite a bit it seems. Depends on how far you want to stretch your
driver model. The better the driver model, the less performance
CPU-wise, and the less hand-holding.
Advantageous in what way? It WILL cost more CPU, so that's not an
advantage. The driving line from a human driver is a nice starting
point, even when the AI would make up its own mind. At least it has a
starting point and then can choose to brake later, brake sooner, turn
in more etc...
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (8 lines)
>On Tue, 11 May 2004 17:48:20 GMT, Joe62 ><[email hidden]> wrote: > >>Does anyone have pointers to articles or resources on the web where I >>can research this topic? I want to learn about the various approaches >>that have been tried, and understand their benefits and drawbacks. > >Good question. I was just pondering that the other day.Quoted text (9 lines)
> For example, AFAIK most racing >AIs are coded using various racing lines made by human >programmers, which tell the AI where to go on the track >in various situations. > >Would it be more advantageous to make it so that the AI >can "tell" what the best line is through a corner without >someone (human) having to draw a line on the track for it >to follow?On Wed, 12 May 2004 01:40:50 +0100, Peter Ives
<[email hidden]> wrote:
>In article <[email hidden]>, John DiFool
><[email hidden]> writes...
>>Would it be more advantageous to make it so that the AI
>>can "tell" what the best line is through a corner without
>>someone (human) having to draw a line on the track for it
>>to follow?...
>In my view, AI won't come of age until you can give it
>a track and it can learn how to drive around it just like us humans,
>whilst at the same time, having various weightings which allow some AI
>to learn and drive better than others.
I'm not that sure; the point of AI is give nice gameplay, not be the
smartest driver ever. That's another area of research which doesn't
intersect that much with racing sims, I think.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
In article <c7tigq$1qo$1$[email hidden]>, [email hidden]
(Todd Gibbs) wrote:
> From a Game-Development perspective
Oi! Stop working on driving games and get back to a sequel to EECH!
Please?
Pretty please?
<pregnant pause>
No?
Bugger. What's wrong, you guys want to make a profit? ;-)
Andrew McP... living in a dreamworld :-)
In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_A
[email hidden]> writes
But the trouble is with most sims that I've played, after a while you
realise that the variation in AI lines into a corner is absolutely zero.
This makes them very predictable and nothing like human drivers which
destroys the illusion of racing against other real drivers.
I'm not sure I agree with the point of AI is to give nice gameplay
either, unless of course you mean by gameplay the feeling that you are
racing against other 'intelligent' and 'unpredictable' drivers of
course. :)
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -25.01
Quoted text (21 lines)
>On Wed, 12 May 2004 01:40:50 +0100, Peter Ives ><[email hidden]> wrote: > >>In article <[email hidden]>, John >DiFool >><[email hidden]> writes >... >>>Would it be more advantageous to make it so that the AI >>>can "tell" what the best line is through a corner without >>>someone (human) having to draw a line on the track for it >>>to follow? >... >>In my view, AI won't come of age until you can give it >>a track and it can learn how to drive around it just like us humans, >>whilst at the same time, having various weightings which allow some AI >>to learn and drive better than others. > >I'm not that sure; the point of AI is give nice gameplay, not be the >smartest driver ever. That's another area of research which doesn't >intersect that much with racing sims, I think. >In article <[email hidden]>, J. Todd
Wasson <[email hidden]> writes
<snip>
But are the AI cars braking as efficiently as a human driver? Also, how
do you create a little variety in their braking ability to avoid them
all braking at exactly the same point and at the same rate of
deceleration?
Is that because the cars are slower through the corner or into the
corner? You already have a way of measuring whether they are drifting
away from the ideal line under braking. Did you use method 1 to
determine the optimum speed through the corner as well? If so, then
perhaps the algorithm used is too slow in that it allows the AI driver
to lift/brake for too long before getting back on the ideal line or
waits too long before determining whether the car has drifted too far
off the line?
Mind you , I just noticed that you stated later that your AI cars just
understeer at the moment. I'm sure that goes a long way to preventing
decent laps. A human driver probably makes 10 or 20 minor adjustments
from understeer to oversteer whilst taking any one corner. If all we
could do as drivers was to turn in and hope the car wasn't going to
understeer away from the corner then I'm sure our laps would be pretty
shabby as well.
<snip>
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -25.01
Quoted text (33 lines)
> >Aside from the steering controller is a throttle/brake controller. I've tried >2 different things: > >1) The first way I tried was to use the same type of approach as was done >for >steering. Using the distance and tangential speed from the racing line the >car >wanted to follow, the throttle gain might be reduced. I.e., if the car went a >bit too far off the line the throttle is "slowly" released and if that's not >enough to fix the situation, the brake is progressively applied. Eventually >the car slows down enough to get back on the line, and the throttle increases >again on its own. > >That works pretty well as long as you're not coming off a straight into a tight >turn. The car won't see ahead far enough to know that it's going to go off the >line. So what I did was come up with a learning algorithm that was pretty >slick. The cars would run through a learning phase (just during >development). > > >The car would basically race full blast into the first turn and if it went too >far off the line, it would create a braking point some distance behind where it >went off. Eventually the car would return to the line and it would remember >an >"end brake" point. So basically it created its own braking zone. It would >then run the rest of the track (while possibly going off at all the other >corners) and when it ran through turn 1 again it would adjust the "start >braking" point forward or backwards a little bit each lap until the car didn't >go too far off the line. Then it would adjust the "end braking" point to the >spot where the car went the furthest off the track, and voila, it would >eventually learn to brake enough to make the turn on its own. >Quoted text (17 lines)
>Then it would proceed to the next spot where the car goes off, and after >several laps it would learn where to brake and for how long. Eventually after >60-100 laps the cars would learn the whole track and turn not too shabby >laptimes. It's neat to watch them learn the track that way, but they are still >following racing lines that I'd lay down with a spline editor tool. > >2) The method above turned out not work as well as I'd hoped for my >particular >application. The cars weren't as fast through the turns as they could be. So >instead, I just recorded a bunch of my laps and set the AI throttle controller >to simply try to match the speed I was running at various points around the >track. This looks a lot better and the cars are faster, even though it's >infinitely simpler to implement and the cars aren't really learning anything. >Who knows though, maybe somebody else could make method 1 work >better than 2... >:-) >>And ultimately is it worth while at all going to the lengths to get an AI to
>ack like a human when our technology is improving all the time for "online"
>human vs human racing.
Sure, it's worthwhile. Some people don't have a fast enough internet
connection. Others tire of getting beat everytime they go online. Having AI
in the game means they can run in a fairly competitive race occasionally.
Eldred
--
http://www.umich.edu/~epickett
Screamers League
IICC League
GPLRank -6.0 MoGPL rank +267.80
Ch.Rank +52.58 MoC +741.71
Hist. +82.34 MoH:na
N2k3 rank:in progress
Slayer Spektera lvl 72 assassin
Slayer Spectral_K lvl 38 Necro
US East
>If all we
>could do as drivers was to turn in and hope the car wasn't going to
>understeer away from the corner then I'm sure our laps would be pretty
>shabby as well.
>
You've been spying on me, haven't you?
Eldred
--
http://www.umich.edu/~epickett
Screamers League
IICC League
GPLRank -6.0 MoGPL rank +267.80
Ch.Rank +52.58 MoC +741.71
Hist. +82.34 MoH:na
N2k3 rank:in progress
Slayer Spektera lvl 72 assassin
Slayer Spectral_K lvl 38 Necro
US East
Its a nice idea... how about if we strap a radar and some Hellfires to a Mustang 68' instead ? :)
Todd.
"Andrew MacPherson" <[email hidden]> wrote in message
news:[email hidden]...
Quoted text (17 lines)
> In article <c7tigq$1qo$1$[email hidden]>, [email hidden] > (Todd Gibbs) wrote: > > > From a Game-Development perspective > > Oi! Stop working on driving games and get back to a sequel to EECH! > Please? > > Pretty please? > > <pregnant pause> > > No? > > Bugger. What's wrong, you guys want to make a profit? ;-) > > Andrew McP... living in a dreamworld :-)In article <c7vbe6$l0d$1$[email hidden]>, [email hidden]
(Todd Gibbs) wrote:
> Its a nice idea... how about if we strap a radar and some Hellfires to
> a Mustang 68' instead ? :)
Stop it, you're playing with my dreams ;-)
On a serious note, EECH really was only a few major tweaks away from being
the perfect combination of simulation and game. The gameplay side of thing
has been ignored by far too many developers. So thanks for that and good
luck in your current/future projects. As long as you guys are still
working there's always hope you'll get filthy rich and return to your
flight sim roots as a hobby to stop you getting bored ;-)
Andrew McP
Thanks Andrew :)
Are you involved in the open-source EECH development project ? If you are interested I can provide a link/email address. Perhaps
email me personally for more info.
Kind Regards,
Todd.
"Andrew MacPherson" <[email hidden]> wrote in message
news:[email hidden]...
Quoted text (16 lines)
> In article <c7vbe6$l0d$1$[email hidden]>, [email hidden] > (Todd Gibbs) wrote: > > > Its a nice idea... how about if we strap a radar and some Hellfires to > > a Mustang 68' instead ? :) > > Stop it, you're playing with my dreams ;-) > > On a serious note, EECH really was only a few major tweaks away from being > the perfect combination of simulation and game. The gameplay side of thing > has been ignored by far too many developers. So thanks for that and good > luck in your current/future projects. As long as you guys are still > working there's always hope you'll get filthy rich and return to your > flight sim roots as a hobby to stop you getting bored ;-) > > Andrew McPIn article <c7vm5g$8mc$1$[email hidden]>, [email hidden]
(Todd Gibbs) wrote:
> Are you involved in the open-source EECH development project ?
Only as an interested onlooker. I got as far as looking at the source
code, then remembered it's ten years since I did any programming, and then
it was pure ARM assembler. Curly brackets still scare the sh*t out of me
:-)
There's obviously a limit to how far the EECH code can be tweaked by
enthusiasts, but I admire their efforts greatly. What I was looking for in
the imaginary sequel was something that would allow complete (or at
least more advanced) planning of the battlefield... tasking ground forces
and creating missions (including establishing supply lines) to support
them rather than having the campaign engine in full control.
Still, at least it has a campaign engine, that's better than most! And I
still think the virtual cockpit of the Hokum is *the* most immersive
flight sim cockpit ever. Amazing detail, great sim.
Anyway, I'm wildly off topic for the group. I'll stop leading you astray
down memory lane. ;-)
Andrew McP
On Wed, 12 May 2004 22:22:23 +0100, Peter Ives
<[email hidden]> wrote:
That can be resolved in software.
I do mean that indeed. :) The point I'm trying to make is that just
because we humans use a sophisticated neural network to drive, your
goal is not to come to a point where you use a similar neural network
in the computer to do the same thing. Your goal is still to fake the
human into thinking the drivers are as human as online players.
The methods too achieve that are irrelevant to the user; they just
want to see it work. From an engineering perspective though, it is
ofcourse relevant. And you can take a lot of shortcuts that make it a
lot simpler to simulate a basic AI driver. Then you start to add
varying behavior, based on the things you miss.
Realise that to do it the Wests' way takes ages and doesn't
necessarily provide a better result. Simple principles are more easily
adapted to include tiny things. Some basic principles even allow for a
whole lot of complex behavior, see the laws of physics for example.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (8 lines)
>In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_A >[email hidden]> writes >>I'm not that sure; the point of AI is give nice gameplay, not be the >>smartest driver ever. That's another area of research which doesn't >>intersect that much with racing sims, I think. > >But the trouble is with most sims that I've played, after a while you >realise that the variation in AI lines into a corner is absolutely zero.Quoted text (7 lines)
>This makes them very predictable and nothing like human drivers which >destroys the illusion of racing against other real drivers. > >I'm not sure I agree with the point of AI is to give nice gameplay >either, unless of course you mean by gameplay the feeling that you are >racing against other 'intelligent' and 'unpredictable' drivers of >course. :)On Wed, 12 May 2004 22:45:54 +0100, Peter Ives
<[email hidden]> wrote:
>In article <[email hidden]>, J. Todd
>Wasson <[email hidden]> writes...
>But are the AI cars braking as efficiently as a human driver?
Would be nothing wrong in just modifying the grip a little for AI to
get them at the same level of braking ability compared to humans (who
can perhaps more intelligently process the brake). Instead of going
through lengths to learn AI to trailbrake. ;-)
> Also, how
>do you create a little variety in their braking ability to avoid them
>all braking at exactly the same point and at the same rate of
>deceleration?
That's easy, just add a random number to the brake point distance...
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Hi all
> Does anyone have pointers to articles or resources on the web where I
> can research this topic? I want to learn about the various approaches
> that have been tried, and understand their benefits and drawbacks.
There are two AI racing simulation projects (freely) available:
- TORCS, www.torcs.org
- RARS, rars.sf.net
TORCS is a very sophisticated simulation, it supports also input
devices, so you can drive a car yourself. There is a tutorial about how
to implement a basic AI-driver at www.berniw.org in the TORCS section.
In commercial games the AI-drivers follow more or less a given (by the
developers) trajectory. In some games I have the impression that the AI
physics is not simulated the same way like the players car.
In TORCS and RARS you can find various implementations:
- Searching a trajectory in a pre-process on- or offline (optimization
problem -> least squares, A*, neural networks, other machine learning
approaches, etc.).
- Reactive behaviour without preprocess.
bye, Bernhard.
--
visit my homepage http://www.berniw.org
> There are two AI racing simulation projects (freely) available:
> - TORCS, www.torcs.org
> - RARS, rars.sf.net
>
I found TORCS and RARS useful when I was researching racing AI, it's a good
place to start. There were some pretty clever methods in there.
There's no reason not to cross the offline and online elements, you get the
best of both worlds - intelligent basic behaviour with individual reactive
elements that players hopefully notice.
What's nice is when you get quasi-emergent behaviour from AI drivers, it's
just that in reality, players rarely notice. One of my main aims (kind of
ongoing research and application) is to look at what players do and try to
emulate that as an extra dimension to the AI. You get much more noticable
reactions from players racing the AI.
We currently use the same physics for AI as the player, even the same car
model, so the AI has the same interface as the player, i.e. via steering,
throttle, brake and gears. In the past we've used simpler models for the AI,
because you can't have 20 cars racing with a full physics and car model. If
we went back to that number of cars I'd look at some kind of LOD'ing scheme.
It's easier with one model though, you don't have to match the performance
across the two, which is a nightmare job.
When (if) we make another sim fitting for this forum, I'll be sure to let
you all know what sort of techniques we use, hell, you'll probably be able
to test the thing!
Jeff.
And ultimately is it worth while at all going to the lengths to get an AI to
ack like a human when our technology is improving all the time for "online"
human vs human racing.
Take care
Nigel
--
Redline Race Controls
http://www.wave.co.nz/~lakewood/Redline2.htm
In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_A
[email hidden]> writes
But won't that just even out the braking ability for all AI drivers?
What I want is for some AI drivers to be harder to outbrake into the
corner than others. Just like human opponents.
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -25.01
Quoted text (21 lines)
>On Wed, 12 May 2004 22:45:54 +0100, Peter Ives ><[email hidden]> wrote: > >>In article <[email hidden]>, J. >Todd >>Wasson <[email hidden]> writes >... >>But are the AI cars braking as efficiently as a human driver? > >Would be nothing wrong in just modifying the grip a little for AI to >get them at the same level of braking ability compared to humans (who >can perhaps more intelligently process the brake). Instead of going >through lengths to learn AI to trailbrake. ;-) > >> Also, how >>do you create a little variety in their braking ability to avoid them >>all braking at exactly the same point and at the same rate of >>deceleration? > >That's easy, just add a random number to the brake point distance... >On Tue, 11 May 2004 17:48:20 GMT, Joe62
<[email hidden]> wrote:
>Does anyone have pointers to articles or resources on the web where I
>can research this topic? I want to learn about the various approaches
>that have been tried, and understand their benefits and drawbacks.
I can't answer your question, but I would recommend ignoring this
entire thread and trying to see if you can find contact information
for Geoff Crammond. He's the only person in the history of driving
games who has made believable AI.
Jason
On Fri, 14 May 2004 00:44:48 +0100, Peter Ives
<[email hidden]> wrote:
Not if you adjust it per AI driver.
>What I want is for some AI drivers to be harder to outbrake into the
>corner than others. Just like human opponents.
Then you add some braking ability per AI, based on a personality
factor. If that means braking a bit better than possible according to
the physics model, you give it a little bit more grip, or add some to
the resulting deceleration.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (16 lines)
>In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_A >[email hidden]> writes >>On Wed, 12 May 2004 22:45:54 +0100, Peter Ives >><[email hidden]> wrote: >> >>>In article <[email hidden]>, J. >>Todd >>>Wasson <[email hidden]> writes >>> Also, how >>>do you create a little variety in their braking ability to avoid them >>>all braking at exactly the same point and at the same rate of >>>deceleration? >> >>That's easy, just add a random number to the brake point distance... >> >But won't that just even out the braking ability for all AI drivers?Quoted text (32 lines)
>From: Peter Ives [email hidden] >Date: 5/13/2004 6:44 PM Central Daylight Time >Message-id: <[email hidden]> > >In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_A >[email hidden]> writes >>On Wed, 12 May 2004 22:45:54 +0100, Peter Ives >><[email hidden]> wrote: >> >>>In article <[email hidden]>, J. >>Todd >>>Wasson <[email hidden]> writes >>... >>>But are the AI cars braking as efficiently as a human driver? >> >>Would be nothing wrong in just modifying the grip a little for AI to >>get them at the same level of braking ability compared to humans (who >>can perhaps more intelligently process the brake). Instead of going >>through lengths to learn AI to trailbrake. ;-) >> >>> Also, how >>>do you create a little variety in their braking ability to avoid them >>>all braking at exactly the same point and at the same rate of >>>deceleration? >> >>That's easy, just add a random number to the brake point distance... >> >But won't that just even out the braking ability for all AI drivers? >What I want is for some AI drivers to be harder to outbrake into the >corner than others. Just like human opponents. >-- >Peter Ives (AKA Pete Ivington)Quoted text (7 lines)
>From: "Jeff" [email hidden] >Date: 5/12/2004 10:56 AM Central Daylight Time >Message-id: <c7thdp$580$1$[email hidden]> > >And apologies if I got your name wrong as a collegue just told me I had! > >Quoted text (12 lines)
>From: Peter Ives [email hidden] >Date: 5/12/2004 4:45 PM Central Daylight Time >Message-id: <[email hidden]> > >In article <[email hidden]>, J. Todd >Wasson <[email hidden]> writes ><snip> >> >>Aside from the steering controller is a throttle/brake controller. I've >tried >>2 different things: >>Quoted text (8 lines)
>>Who knows though, maybe somebody else could make method 1 work >>better than 2... >>:-) >> >Is that because the cars are slower through the corner or into the >corner? You already have a way of measuring whether they are drifting >away from the ideal line under braking. Did you use method 1 to >determine the optimum speed through the corner as well?Quoted text (8 lines)
>Mind you , I just noticed that you stated later that your AI cars just >understeer at the moment. I'm sure that goes a long way to preventing >decent laps. A human driver probably makes 10 or 20 minor adjustments >from understeer to oversteer whilst taking any one corner. If all we >could do as drivers was to turn in and hope the car wasn't going to >understeer away from the corner then I'm sure our laps would be pretty >shabby as well. >Quoted text (11 lines)
>-- >Peter Ives (AKA Pete Ivington) >Remove ALL_STRESS before replying via email >If you know what's good for you, don't listen to me :) >GPLRank Joystick -50.63 Wheel -25.01 > > > > > >On Fri, 14 May 2004 02:06:28 GMT, [email hidden] (Jason Moyer)
wrote:
>I can't answer your question, but I would recommend ignoring this
>entire thread and trying to see if you can find contact information
>for Geoff Crammond. He's the only person in the history of driving
>games who has made believable AI.
Well, on that note ... if anyone knows an experienced race-AI
programmer who's looking for work (Geoff or otherwise!) ... please
pass along my email address. This would be for a real opportunity at a
quality game dev company that's had some success with driving games.
Online programming an asset.
In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_
[email hidden]> writes
Not sure I made myself clear. What I meant was, that it appears that by
just adding a random number for each driver that all you end up with are
drivers who's braking ability varies each lap, but around the same
braking point. So over a course of laps all drivers braking would even
out.
In my view, what would also need to be included is some kind of
weighting factor per driver that influences the random number generated
so that better AI drivers tend to brake nearer the perfect braking
point, whilst lesser AI drivers tend to brake further away from it (both
too early or too late). Similar to what you stated below, perhaps,
though I'm just clarifying things. ;-)
Only necessary if you cannot get the AI to brake as well under same
physics as a human, of course. :)
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -25.01
Quoted text (23 lines)
>On Fri, 14 May 2004 00:44:48 +0100, Peter Ives ><[email hidden]> wrote: > >>In article <[email hidden]>, Ruud van Gaal ><_KI_LLSP_A >>[email hidden]> writes >>>On Wed, 12 May 2004 22:45:54 +0100, Peter Ives >>><[email hidden]> wrote: >>> >>>>In article <[email hidden]>, J. >>>Todd >>>>Wasson <[email hidden]> writes >>>> Also, how >>>>do you create a little variety in their braking ability to avoid them >>>>all braking at exactly the same point and at the same rate of >>>>deceleration? >>> >>>That's easy, just add a random number to the brake point distance... >>> >>But won't that just even out the braking ability for all AI drivers? > >Not if you adjust it per AI driver. >Quoted text (8 lines)
>>What I want is for some AI drivers to be harder to outbrake into the >>corner than others. Just like human opponents. > >Then you add some braking ability per AI, based on a personality >factor. If that means braking a bit better than possible according to >the physics model, you give it a little bit more grip, or add some to >the resulting deceleration. >On Fri, 14 May 2004 21:56:59 +0100, Peter Ives
<[email hidden]> wrote:
As you stated just the implementation, that's certainly possible. ;-)
That's the whole point; getting to that limit is very hard to do by
emulating a human, and much much easier by just cheating a little bit.
For a game, you quickly use the cheat, and as Todd found out,
sometimes the cheating way is even better than trying to do the 'real
thing'. :)
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
Quoted text (19 lines)
>In article <[email hidden]>, Ruud van Gaal <_KI_LLSP_ >[email hidden]> writes >>>>That's easy, just add a random number to the brake point distance... >>>> >>>But won't that just even out the braking ability for all AI drivers? >> >>Not if you adjust it per AI driver. > >Not sure I made myself clear. What I meant was, that it appears that by >just adding a random number for each driver that all you end up with are >drivers who's braking ability varies each lap, but around the same >braking point. So over a course of laps all drivers braking would even >out. > >In my view, what would also need to be included is some kind of >weighting factor per driver that influences the random number generated >so that better AI drivers tend to brake nearer the perfect braking >point, whilst lesser AI drivers tend to brake further away from it (both >too early or too late).Quoted text (10 lines)
>>>What I want is for some AI drivers to be harder to outbrake into the >>>corner than others. Just like human opponents. >> >>Then you add some braking ability per AI, based on a personality >>factor. If that means braking a bit better than possible according to >>the physics model, you give it a little bit more grip, or add some to >>the resulting deceleration. >> >Only necessary if you cannot get the AI to brake as well under same >physics as a human, of course. :)Joe62 wrote:
> Does anyone have pointers to articles or resources on the web where I
> can research this topic? I want to learn about the various approaches
> that have been tried, and understand their benefits and drawbacks.
They all seem to drive like graduates from the Michael Andretti Driving
School for the Blind.
Hi Joe62
> Well, on that note ... if anyone knows an experienced race-AI
> programmer who's looking for work (Geoff or otherwise!) ... please
> pass along my email address. This would be for a real opportunity at a
> quality game dev company that's had some success with driving games.
> Online programming an asset.
I'm an AI-Programmer of the TORCS (www.torcs.org) project. If you are
interested in me, please visit my homepage www.berniw.org, you can find
there a shortened CV of me and my TORCS robot (AI) tutorial.
bye, Bernhard.
--
visit my homepage http://www.berniw.org


































