Th3Ya0vi / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

AI opponents #230

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As fun as it is to drive around the world, it gets boring without someone to 
race against. There are currently no full uptime servers and a constant number 
of players online, while some like myself prefer playing offline most of the 
time.

It would be really awesome if bots could be added, consisting of AI racers the 
player can configure (name and customize their car). This could be an addition 
to the existing player slots, where instead of players 2 / 3 / 4 being local 
(split-screen) or network, each can be set to an AI of a certain difficulty.

I know that coding computer control of cars must be difficult, so I understand 
if this can't get done too soon. VDrift has a good AI, and maybe parts of it 
can be adapted to the road structure in SR. I personally don't mind if the AI 
is weak or can't navigate tracks with complex jumps or pipes, as long as there 
are cars that follow along on basic tracks.

Original issue reported on code.google.com by MirceaKi...@gmail.com on 12 May 2013 at 9:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I will not start this issue. It is just for me impossible to write any AI that 
could drive all the tracks - and drive it well (so that I could drive with it 
and not just laugh at AI mistakes).

But of course some tracks are easier and that perfect AI isn't needed.
Still it is a gigantic issue.
We have 116 tracks, so drawing a line, or adjusting anything by hand is wasting 
time.

I would like an implemetation of a learning approach. So: I start a track in 
game and start an AI learning mode.
This simulates driving for AI (as fast as CPU can simulate) and produces some 
data that AI will use later (e.g. an ideal drive spline with car velocities and 
places where to brake etc.)
And this goes several iterations, so that the lap time gets minimized.

Lastly need to keep in mind that you could collide with AI, and also AI will 
get stuck. So it needs to probably rewind sometimes (since trying to get on 
good way inside pipes is sometimes difficult even for people, rewind is a lot 
easier).

I can help somebody but definitely won't start this issue.

Original comment by Cry...@gmail.com on 12 May 2013 at 10:34

GoogleCodeExporter commented 9 years ago
Yeah, some tracks would be impossible for an AI to ever navigate. Namely those 
that have loops and coiled pipes (bots should be disabled on them IMO). Maps 
that have simple roads and bridges though should work nicely from my 
understanding.

I agree that having to edit tracks for AI support would be a bad approach. The 
way I envisioned this, roads would be automatically detected and bots would 
simply follow the path by noticing turns ahead. The learning approach would be 
an interesting idea too and could yield more realism, but I'm not sure if going 
that far is needed.

As for the AI getting stuck, the ideal solution would be knowing to reverse the 
car and find their way back to the road. That might be trickier than teaching 
them to simply follow the road however. An easy method for starters would be 
teleporting to the last checkpoint (IIRC F12 does that for players). They lose 
more time but better than nothing till they get smarter :)

Original comment by MirceaKi...@gmail.com on 12 May 2013 at 11:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Since the track's ghosts are now present, AI is even less needed.

But if somebody wanted to implement it, then the track's ghost info could be 
used to guide the AI's car (position,rotation,steer,braking is there, more 
could added if needed).

Original comment by Cry...@gmail.com on 22 Jul 2013 at 2:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by Cry...@gmail.com on 2 Apr 2014 at 11:45