rec.autos.simulators

RACER Lets Start It Again

David Butte

RACER Lets Start It Again

by David Butte » Sat, 25 Aug 2001 09:49:48


2001:

<snip>
<snip>

TM? As in trademark? Have you registered it? Because otherwise (in the
UK, at least) it hasn't got much value.

<snip>

I think you might consider changing that word, given what "ripoffs"
means in English! (Theft, basically.)

<snip>

Be very, very careful about this. In the UK at the moment, football is
trying to stop even non-commercial fansites using certain information
(club badges, fixture lists etc) on their pages without paying (a lot)
for a licence. It's very, *very* unpopular. Of course, a straight
ripoff of the design would be unacceptable anywhere, but I think you'd
be totally unreasonable if you threatened a non-commercial site for
posting (for example) championship standings.

<snip>

Be careful about this, too - sooner or later, you'll get some idiot who
thinks they've been excluded unfairly, and will threaten legal action.
Look at the mess athletics is in because of drug-taking athletes
calling in the lawyers.

I'm sure you've thought about all this already, and I am not trying to
put you down - I think you're doing a good thing - but don't expect it
to be an easy ride, that's all. Good luck!

--
"After all, a mere thousand yards - such a harmless little knoll,
really" - Raymond Mays on Shelsley Walsh.
Nominations for the rest of this sig are currently being accepted...

Haqsa

RACER Lets Start It Again

by Haqsa » Sat, 25 Aug 2001 10:47:41

Well you certainly have much more experience with this than I do, but
please humor me and let me explain my thinking anyway.  As long as
velocities are constant, we can predict everything with 100% accuracy
using extrapolation.  We can predict position, we can predict collisions
with other vehicles, and we can predict collisions with stationary
objects.  This is true no matter what speed the objects are going, as
long as the velocities are constant.  So the only error that can
accumulate is due to unpredicted accelerations.  And the only
unpredicted accelerations are due to player input, because, again, we
can predict collisions.  So the error is a function of the maximum
acceleration the vehicle is capable of, which I gather from another
thread in this newsgroup is about 4G.  If the distance error is only due
to acceleration, then we can calculate it using the familiar (x = 1/2 *
a * t^2) formula.  The distance error caused by a 4G acceleration in 100
msec would be (sorry I can only think in english units)

x = 0.5 * (4 * 32.2) * (0.1)^2
  = 0.644 feet.

So I am going to accumulate at most about 8 inches of positional error
over a 100 msec interval.  And also this is not true positional error,
it is positional error between where the client thinks he is and where
the server thinks he is.  The actual positional error at the server
would be a function of the update rate, not the latency.  If a client is
sending 30 updates per second, which is not unreasonable for a modem,
the maximum error is

x = 0.5 * (4 * 32.2) * (0.033)^2
  = 0.072 feet, or about 0.85 inches.

That doesn't seem all that bad to me.  But admittedly the real issue is
client side error, because that's what makes it difficult to drive.  And
the client side error could be doubled from what I have shown above if
both the client and the server are doing prediction, which is usually
the case.  Also the client side error in position relative to another
player would be due to the sum of their one-way latencies, or IOW the
average of their pings.  So I guess what I am saying is that even though
it is not an ideal solution, I think it would still be just as
applicable to a racing or even a flying sim as it is to shooters.

Regards,
Hal


> The classic problem is that unlike Quake people, racecars travelling
at 200
> MPH go about 90 m/s / 1000 = 9 cm per millisecond...
> so at 100 ms latency, the car will have travelled 9 meters (about 30
feet)
> since the last position update, even though they may be racing with a
1 foot
> gap between them...
> So you of course have to do extrapolation/prediction, but the
higher-order
> your extrapolation, the more wildly off your prediction will be if a
car
> makes a little twitch or correction (and hitting a wall or something
can
> effect a huge acceleration on the car)... it also depends on whether
you
> extrapolate in generic 3D space or in racing-line-space--these will
have
> different strengths and weaknesses...

> It still is a lot easier than writing AI, though, especially if you
drop
> modem support.  Plus, LAN play is a good place to start, as you can
get away
> with pretty brain-dead approaches in this environment...
> Good luck--your Racer program looks pretty impressive already!

> -Dave Pollatsek
>  MGI





> > > On Tue, 21 Aug 2001 21:00:25 GMT, "Haqsau"


- Show quoted text -


> > > >Don't know how Ruud is doing it, but normally the host or server
is
> > the
> > > >one who tells the clients whether they have a collision or not,
for
> > > >precisely that reason.

> > > Right.
> > > And for latency, well, as the stuff is bounding box anyway,
there's a
> > > margin of error ofcourse. Don't know how incredibly bad it will be
> > > with modem connections. Perhaps I'd reduce the bounding boxes a
little
> > > bit so you collide relatively late.

> > Depends on how complicated you want to get.  I'm not familiar with
> > coding for racing sims, but typically in shooters like the Quake
series
> > the server and all of the clients are each running in their own
frames,
> > asynchronously to all the others, and the engine interpolates or
> > extrapolates position and velocity as necessary to resolve them to
the
> > same time base.  Because it is doing this, you can warp the time
base as
> > necessary to correct for latency.

Ruud van Ga

RACER Lets Start It Again

by Ruud van Ga » Sat, 25 Aug 2001 19:53:07

On Thu, 23 Aug 2001 19:30:33 -0500, "Dave Pollatsek"


>The classic problem is that unlike Quake people, racecars travelling at 200
>MPH go about 90 m/s / 1000 = 9 cm per millisecond...
>so at 100 ms latency, the car will have travelled 9 meters (about 30 feet)
>since the last position update, even though they may be racing with a 1 foot
>gap between them...

Still, at this speed most of times you won't deviate as much from the
path but use smooth lines. I hope. ;-) I'll just have to make some (I
have a 10Hz update version now without interpolation using LAN) and
see how it's behaving, whether I need acceleration as well as velocity
(so while turning and loss of connection you still get the car turning
at every client, instead of driving linear lines, like I once thought
I saw happen in GPL).

Yes, I'll just start and see where I need improvements given feedback
from people testing it (on a LAN only probably for the next version).
A wall, hm.

Sure is. :) In fact, all games are now networked in a sense. Hope
everybody got his/hers TCP/IP installed.

Thanks!

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Ruud van Ga

RACER Lets Start It Again

by Ruud van Ga » Sat, 25 Aug 2001 19:55:21



Yes, most important thing is to have the clients drive like they
normally do; server acknowledges before turning are just much too
slow.
As it is now, the clients will receive updates from the server, but
the clients do very little with the data; they just draw the cars, and
let you play like you normally do.
The server will then sent out info on collisions, but perhaps a client
may ultimately do a Request for Collision or something.

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Anthony Bulloc

RACER Lets Start It Again

by Anthony Bulloc » Sat, 25 Aug 2001 20:46:47

On Thu, 23 Aug 2001 09:29:50 +0200, Christoph Schirmer

<HUGE SNIP>

Jesus, some beat Tom........

Regards,
Anthony Bulloch

Tony Whitle

RACER Lets Start It Again

by Tony Whitle » Tue, 28 Aug 2001 00:32:15

"Ruud van Gaal" wrote...


> >Thanx for the info & Racer Ruud!! I like it! :) It is growing on
> >me more every lap! Great on the Multiplayer! I thought AI was
> >easier but I am no programmer so I dont know sqwat about it!
> >Again a job well done & the price is right!! :)

> Thanks! :)
> AI has multiple cars, like Multiplayer. For AI, you must make some
> kind of robot to let them drive the car, or get replays (which aren't
> in yet) and use that as a guiding line. And tweak ad infinitum.
> Ofcourse multiplayer has its problems once you hit modem connections
> and lag, but in my eyes it's less uncontrollable than the improvement
> potential you have in AI (you can improve AI until you die I think).

Ruud,

Reading your reply made me think of an method that I don't think has been
tried yet - real artificial intelligence ("TrueAI"tm :-) that uses the
physics model to learn how to drive the cars fast by taking over the control
inputs and driving round the track, experimenting in an analogue of the way
humans learn. Different scenarios could be used to learn how to drive flat
out, drive at 9/10ths to preserve the car, cope with cold tyres or rain,
overtake, block and so on. Having established values for the parameters,
duplicated simpler versions of the process would be used for multi-AI-player
racing. Or the full TrueAI could run on a separate computer - it would be
interesting to see how it got on in a Turing Test, and against the "Aliens"
(not that well, I suspect).

Of course, the AI driver would need an AI race engineer to tweak the set-up
for him - this might prove useful to those like me (and Jim Clark :-O )
who'd rather just drive the car.

Sounds like fun. It can't be as difficult as what you've taken on. When I've
got a couple of months (years?) to spare I might have a go!

--

Tony Whitley
GPLRank -0.54
MonsterRank 407 and falling...

Ruud van Ga

RACER Lets Start It Again

by Ruud van Ga » Tue, 28 Aug 2001 21:55:38

On Sun, 26 Aug 2001 16:32:15 +0100, "Tony Whitley"

Hm, you have an URL with some sample TrueAI classes? ;-)
I don't think passing a Turing test would make the driver be able to
drive; a lot of humans are worse at driving than they are at a Turing
test, hehe. :)

Ok, I'll create the .h file, you do the .cpp ok?

Sure thing, but actually I have a feeling that the CPU's aren't fast
enough yet to do it like this (I accidentally used full physics on a
network car, hm). Still, robots are the way of the future. The distant
future. The oh so distant future. :)

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Steph

RACER Lets Start It Again

by Steph » Wed, 29 Aug 2001 13:31:52

This is not so difficult and could be done whilst not racing and not
in real time. A program which creates the best driving line by  trial
and error could attempt to get a car to perform as well as possible (
and this includes adjusting the setup as well as driving lines and
throttle gear brake positions). Several possible lines could be
calculated which are then saved for use in the race similar to those
used in GPL.
I think until we can have computers fast enough to to allow the AI to
work in realtime during the race this is the best that we can hope to
achieve.
Obviously once other factors such as other cars are involved the AI
has to choose which of its possible lines to use and would have some
simple procedures to say brake early if the car in front is braking,
and to allow for slipstreaming.
Ruud van Ga

RACER Lets Start It Again

by Ruud van Ga » Wed, 29 Aug 2001 21:08:04



>This is not so difficult and could be done whilst not racing and not
>in real time. A program which creates the best driving line by  trial
>and error could attempt to get a car to perform as well as possible (
>and this includes adjusting the setup as well as driving lines and
>throttle gear brake positions).

Yes, offline, hm, but certainly not a piece of trivial software! :)
I'd rather drive some laps on my own and use that (although far less
than perfect) as a basis for AI lines. Or call Rent-a-Huttu and let
the aliens drive for a while and use those replays. ;-)

It's a bit like the physics, although worse. Physics were constrained
by the CPU. Now, the physics are less and less constrained, since most
of the work at this point is in the graphics. Same for AI; they must
use both the physics and react on that. Perhaps it's not all that bad,
but when you have 43 cars on the track... it's still better to take
some shortcuts yes.

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Doug Millike

RACER Lets Start It Again

by Doug Millike » Tue, 04 Sep 2001 06:54:54

http://www.adams.com/product/partner/

Then select the product from the ADAMS Product list called "driver" --this
is an AI driver...but it takes hours of cpu time to drive one lap of a race
track.


> On Sun, 26 Aug 2001 16:32:15 +0100, "Tony Whitley"

> >Reading your reply made me think of an method that I don't think has been
> >tried yet - real artificial intelligence ("TrueAI"tm :-) that uses the
> >physics model to learn how to drive the cars fast by taking over the control
> >inputs and driving round the track, experimenting in an analogue of the way
> >humans learn. Different scenarios could be used to learn how to drive flat
> >out, drive at 9/10ths to preserve the car, cope with cold tyres or rain,
> >overtake, block and so on. Having established values for the parameters,
> >duplicated simpler versions of the process would be used for multi-AI-player
> >racing. Or the full TrueAI could run on a separate computer - it would be
> >interesting to see how it got on in a Turing Test, and against the "Aliens"
> >(not that well, I suspect).

> Hm, you have an URL with some sample TrueAI classes? ;-)
> I don't think passing a Turing test would make the driver be able to
> drive; a lot of humans are worse at driving than they are at a Turing
> test, hehe. :)

> >Of course, the AI driver would need an AI race engineer to tweak the set-up
> >for him - this might prove useful to those like me (and Jim Clark :-O )
> >who'd rather just drive the car.

> Ok, I'll create the .h file, you do the .cpp ok?

> >Sounds like fun. It can't be as difficult as what you've taken on. When I've
> >got a couple of months (years?) to spare I might have a go!

> Sure thing, but actually I have a feeling that the CPU's aren't fast
> enough yet to do it like this (I accidentally used full physics on a
> network car, hm). Still, robots are the way of the future. The distant
> future. The oh so distant future. :)

> Ruud van Gaal, GPL Rank +53.25
> Pencil art    : http://www.marketgraph.nl/gallery/
> Free car sim  : http://www.marketgraph.nl/gallery/racer/

Tony Whitle

RACER Lets Start It Again

by Tony Whitle » Wed, 05 Sep 2001 03:10:27

Maybe a slight overkill for this :-) I've been looking at the RARS project
(http://rars.sourceforge.net/) but although the "robots" are much less
processor-intensive most of them seem to rely on their own calculation of
the physics model than simulating the way a human learns a race track. The
damage model is somewhat less realistic than Test Drive too. It is food for
thought though - I'll simply get TrueAI to the point that it can whip all
the RARS opposition and then hand it over to Ruud to integrate into Racer!

--

Tony Whitley
P.S. Don't hold your breath!


> > On Sun, 26 Aug 2001 16:32:15 +0100, "Tony Whitley"

> > >Reading your reply made me think of an method that I don't think has
been
> > >tried yet - real artificial intelligence ("TrueAI"tm :-) that uses the
> > >physics model to learn how to drive the cars fast by taking over the
control
> > >inputs and driving round the track, experimenting in an analogue of the
way
> > >humans learn. Different scenarios could be used to learn how to drive
flat
> > >out, drive at 9/10ths to preserve the car, cope with cold tyres or
rain,
> > >overtake, block and so on. Having established values for the
parameters,
> > >duplicated simpler versions of the process would be used for
multi-AI-player
> > >racing. Or the full TrueAI could run on a separate computer - it would
be
> > >interesting to see how it got on in a Turing Test, and against the
"Aliens"
> > >(not that well, I suspect).

> > Hm, you have an URL with some sample TrueAI classes? ;-)
> > I don't think passing a Turing test would make the driver be able to
> > drive; a lot of humans are worse at driving than they are at a Turing
> > test, hehe. :)

> > >Of course, the AI driver would need an AI race engineer to tweak the
set-up
> > >for him - this might prove useful to those like me (and Jim Clark :-O )
> > >who'd rather just drive the car.

> > Ok, I'll create the .h file, you do the .cpp ok?

> > >Sounds like fun. It can't be as difficult as what you've taken on. When
I've
> > >got a couple of months (years?) to spare I might have a go!

> > Sure thing, but actually I have a feeling that the CPU's aren't fast
> > enough yet to do it like this (I accidentally used full physics on a
> > network car, hm). Still, robots are the way of the future. The distant
> > future. The oh so distant future. :)

> > Ruud van Gaal, GPL Rank +53.25
> > Pencil art    : http://www.marketgraph.nl/gallery/
> > Free car sim  : http://www.marketgraph.nl/gallery/racer/

Ruud van Ga

RACER Lets Start It Again

by Ruud van Ga » Wed, 05 Sep 2001 05:08:38

On Mon, 3 Sep 2001 19:10:27 +0100, "Tony Whitley"

Wow, it's on SGI. No wonder it takes hours these days. ;-)

Just a bit. Especially considering 1 player and 42 AI players on the
track? ;-)

RARS uses the force=-slipVelocity*frictionCoefficient technique IIRC.
Great stable method, but a bit too simplistic. In Racer, I'd say the
physics are too complex by now to anticipate like that, and either a
(p)replay should be targeted or real driver characteristics should be
simulated. Ofcourse, the latter one will easily fail people's
expectations quickly.
Fortunately internet multiplayer is easier and more fun. But ofcourse,
one day, an AI driver (which actually dares to push the throttle)
should be initiated. Just fill in the blanks in rrobot.cpp. ;-)

That would be most helpful. :)

Ruud van Gaal
Free car sim  : http://www.marketgraph.nl/gallery/racer/
Pencil art    : http://www.marketgraph.nl/gallery/


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.