PiBoSo Official Forum

General => Off Topic => Topic started by: guigui404 on June 18, 2017, 03:32:29 PM

Title: AI
Post by: guigui404 on June 18, 2017, 03:32:29 PM
Quote from: Aernouts2 on June 18, 2017, 02:11:06 PM
Finaly played a bit of it.

first thoughts were not that good.
tried to edit it... and after a longgggg (zzzzzzz  >:() time of digging through the files (and scrathing my head many times) i finaly found something i was looking for  ::)

So instead of removing it (which i was about to do)... i will keep it on my HDD.

P.S
If there was an option for editable AI in GPBikes .........  ;)

This is also a question to Piboso, (if you do read this) i know you told me years ago.... but this is still not an option for GPBikes ?? to have some (smart) AI ??

Thats the Main and only reason i dont play GPBikes.
I just dont like to sit and wait for a online game....

With AI i can play Whatever/Whenever i want.

It's really complicate to creat a great AI , isn't it ?
Title: Re: AI
Post by: guigui404 on June 18, 2017, 04:06:06 PM
But the hidden question was ,you think make a "playable" Ai for GPB would be easy ? , I mean fast , and really usefull ?
Title: Re: AI
Post by: Aernouts2 on June 18, 2017, 05:40:14 PM
OK finaly somthing about GPBikes.

QuoteBut the hidden question was ,you think make a "playable" Ai for GPB would be easy ?
No i am aware of it.
It is not easy in fact i think it is realy, realy hard to do. (specialy with all the tracks created by the modders)
QuoteI mean fast , and really usefull ?
Very usefull yes.
Only 5 or 6 AI would be enough for me.... fight for the podium ??

On the other hand.
my guess is this game started developping somewhere in 2002 ??
If Piboso would have ever have *AI bikes* in his mind it would have been here right now...

GPBikes is ok the way it is right now.
Just not for me, but thats no problem.
Title: Re: AI
Post by: CapeDoctor on June 19, 2017, 06:37:40 AM
Quote from: Aernouts2 on June 18, 2017, 02:11:06 PM
...
This is also a question to Piboso, (if you do read this) i know you told me years ago.... but this is still not an option for GPBikes ?? to have some (smart) AI ??

Thats the Main and only reason i dont play GPBikes.
I just dont like to sit and wait for a online game....

With AI i can play Whatever/Whenever i want.

i've also asked for this, although i realise it's not something PiBoSo is very keen on.
well, as online is still currently a no-go for me, due to whatever causes my high ping and constant issues that crop up the instant i enter a n official qualy/race event, then ten tons of weird shit happens, and instead of fighting with the pack for the race, my first few laps are usually just a nightmare of lag/spiking issues, causing multiple crashes per lap - which boils down to online being absolutely pointless.
i'd be happy just to have my own ghost rider to chase, but the endless hours of being alone on track gets a bit much with no-one to benchmark against.
add to that the overwhelming strangeness of actually seeing other bikes on track when online, it's a level of distraction which we wouldn't have to 'acclimatise' to if we could spend time offline in the company of other bikes.
i'd love to me more online, most of the guys are great, but the racing experience itself is basically just not happening for me, and others.

hang on, i digress.... that's not what this thread is for, so anyone with more MotGP 17 news, time to chip in, lol
Title: Re: AI
Post by: tchemi on June 19, 2017, 08:27:15 AM
Go on ! Create a thread about AI. It's not so hard to create a good AI in fact !
Title: Re: AI
Post by: CapeDoctor on June 19, 2017, 08:50:14 AM
it has already been asked and discussed, tchemi.
i'm not one to keep repeating things - i make a suggestion once, and what happens happens.
feel free to add some thoughts in an existing thread, rather than create a new thread with a similar topic...  ;)
what i would hope is that PiBoSo makes it possible to do, but then leaves the actual implementation and fine-tuning of AI to the modders - if that is possible. i'm not so sure...   ???
Title: Re: AI
Post by: h106frp on June 19, 2017, 09:43:07 AM
The best chance is if someone can create 'bot users' that you could just add as if they were real network riders.
Title: Re: AI
Post by: JamoZ on June 19, 2017, 06:41:32 PM
Creating AI that just follows the ideal line like a retard isn`t that big of a challenge, but I don`t think you guys realise how hard it is to create life like AI. AI is something very few games do right, and even fewer racing games. There is so much programming involved, so many variables...
It took Kunos at least 3 years and it still isn`t perfect ( although together with rFactor 2 the best atm)

it`s a whole different ball game...
Title: Re: AI
Post by: Stout Johnson on June 19, 2017, 07:08:38 PM
Agreed, AI that sort of behaves like humans is very hard to do. Another sim that had really good AI was Geoff Crammond's Grand Prix Series. It was really realistic, AI really felt human, had a realistic rate of errors, sometimes even small errors like just being a tad bit off line etc, very balanced aggrasiveness. It was pure joy. I did not even miss multiplayer.
Title: Re: AI
Post by: guigui404 on June 19, 2017, 07:23:41 PM
Quote from: Stout Johnson on June 19, 2017, 07:08:38 PM
Agreed, AI that sort of behaves like humans is very hard to do. Another sim that had really good AI was Geoff Crammond's Grand Prix Series. It was really realistic, AI really felt human, had a realistic rate of errors, sometimes even small errors like just being a tad bit off line etc, very balanced aggrasiveness. It was pure joy. I did not even miss multiplayer.
Dude , I played GP4 for years , even today I play it , the AI is shit , don't lie about it ^^ , the AI would not consider you , not let place , etc , most aggresive AI ever seen
Title: Re: AI
Post by: PiBoSo on June 19, 2017, 07:42:10 PM
Quote from: JamoZ on June 19, 2017, 06:41:32 PM
Creating AI that just follows the ideal line like a retard isn`t that big of a challenge, but I don`t think you guys realise how hard it is to create life like AI. AI is something very few games do right, and even fewer racing games. There is so much programming involved, so many variables...
It took Kunos at least 3 years and it still isn`t perfect ( although together with rFactor 2 the best atm)

it`s a whole different ball game...

In my previous life, as a slave code monkey, I was responsible for the AI of a AAA racing game.
Tchemi is right: it's not difficult to create realistic AI that does little and small mistakes and is aware of the other vehicles and overtakes and protects the line. It's actually quite easy and even fun, if you know what you're doing.
The real challenge is to make them fast, especially if you are using the same physics as the player, with no tricks.
The users are already racing against no one, the bots should at the very least use the same vehicle dynamics to make the AI meaningful.

Speaking of AI using the same physics with no external forces AT ALL:
http://www.youtube.com/v/b9DyDQR8Re0
Stunning. I'm ecstatic.
Title: Re: AI
Post by: guigui404 on June 19, 2017, 07:46:35 PM
And is an AI planed ? see you've bought a mx-bikes steam page recently , will gpb follow this ?
Title: Re: AI
Post by: tchemi on June 19, 2017, 08:57:06 PM
Talking about an IA.

What I've done recently is a AI for a little racing game. It was part of a code contest online. The objective of the contest is to beat other guys AI. It is not made with a high-end technology or whatever. It is dumb javascript that takes input as text and gives instruction as text in return. This AI is 50 lines of code, not more, and it can beat a casual human. Better than that, it learns the track and adapt itself on next laps to take better corners. And every time you run your code, the track is different. Different corners, different number of corners etc...

Let say that we could create a computer player that takes telemetry in input (Man, Max HUd got so many data in real time ! It's awesome) and gives control input instruction in return. My code was runing every 100ms max (10 decisions by second). Imagine How reactive it could be.

Imagine a AI capable of learning any bike, any track, from scratch. It will start slow and make mistake and learn every corners. It will try to go faster and faster on each lap. And once it could reach a good pace and cannot be better it is done. We can give it some basic riding skill as constants. I think that this something we can create.

What do you think of it ?

I agree, It may not be the best approach for GPB. But even if you have better solutions, the code itself is not that hard.

Quote from: h106frp on June 19, 2017, 09:43:07 AM
The best chance is if someone can create 'bot users' that you could just add as if they were real network riders.

Yes, this would be one a the prerequisite
Title: Re: AI
Post by: h106frp on June 19, 2017, 09:31:32 PM
That would be the best way as it leaves the original game code alone. It would be easy enough to leave the AI lapping the circuit overnight to learn the track. I suppose if it just did a few slow laps of the centre line it would be the easiest way for it to start.
Title: Re: AI
Post by: tchemi on June 19, 2017, 09:39:35 PM
Yep.

But I was thinking about something. The easier would be to have distance to the next corner or distance between corners.
Title: Re: AI
Post by: Grooveski on June 19, 2017, 10:21:17 PM
The bitch about the old 'perfect line' AIs was that they were only ever any use on the particular bike that you used to make them.    :(
...and although I got a few in GP500 to almost give me a run for my money - that was as good as I'd ever get them because that was as fast a way of getting round the track as I knew.  Always reckoned that a big step towards a good raceline would be to have a quicker rider making them in the first place.   :P

Bot AI's sound great.    :)
Title: Re: AI
Post by: h106frp on June 19, 2017, 11:18:45 PM
Quote from: tchemi on June 19, 2017, 09:39:35 PM
Yep.

But I was thinking about something. The easier would be to have distance to the next corner or distance between corners.

Does a CL definition file help? It describes the track as straight lines and arcs
x = -614.633
z = -293.535
angle = -24.0151
numsegment = 65
segment0
{
type = 0
length = 19.874584
radius = 0.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment1
{
type = 1
length = 90.516464
radius = 319.560486
angle = 16.229200
height = 0.000000
heightlock = 0
}
segment2
{
type = 1
length = 56.899899
radius = 122.699081
angle = 26.570078
height = 0.000000
heightlock = 0
}
segment3
{
type = 1
length = 28.052074
radius = 84.231163
angle = 19.081600
height = 0.000000
heightlock = 0
}
segment4
{
type = 0
length = 33.972256
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment5
{
type = 1
length = 58.392235
radius = 186.197372
angle = 17.968184
height = 0.000000
heightlock = 0
}
segment6
{
type = 0
length = 40.646744
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment7
{
type = 1
length = 79.641106
radius = -254.579391
angle = 17.924070
height = 0.000000
heightlock = 0
}
segment8
{
type = 1
length = 114.398155
radius = -349.262390
angle = 18.766783
height = 0.000000
heightlock = 0
}
segment9
{
type = 1
length = 74.088615
radius = -285.455719
angle = 14.870834
height = 0.000000
heightlock = 0
}
segment10
{
type = 0
length = 28.182709
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment11
{
type = 1
length = 27.331169
radius = 172.994919
angle = 9.052061
height = 0.000000
heightlock = 0
}
segment12
{
type = 0
length = 24.743641
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment13
{
type = 1
length = 36.720612
radius = 27.382690
angle = 76.834526
height = 0.000000
heightlock = 0
}
segment14
{
type = 0
length = 77.922302
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment15
{
type = 1
length = 21.576641
radius = -20.851738
angle = 59.287643
height = 0.000000
heightlock = 0
}
segment16
{
type = 0
length = 102.155510
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment17
{
type = 1
length = 22.540398
radius = 51.070202
angle = 25.288124
height = 0.000000
heightlock = 0
}
segment18
{
type = 1
length = 17.411642
radius = 41.804054
angle = 23.864040
height = 0.000000
heightlock = 0
}
segment19
{
type = 1
length = 47.215893
radius = 797.124512
angle = 3.393788
height = 0.000000
heightlock = 0
}
segment20
{
type = 1
length = 52.952522
radius = 217.929443
angle = 13.921735
height = 0.000000
heightlock = 0
}
segment21
{
type = 0
length = 23.195360
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment22
{
type = 1
length = 114.940247
radius = 364.829041
angle = 18.051170
height = 0.000000
heightlock = 0
}
segment23
{
type = 0
length = 68.192085
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment24
{
type = 1
length = 73.451355
radius = 241.821915
angle = 17.403107
height = 0.000000
heightlock = 0
}
segment25
{
type = 1
length = 26.065304
radius = -60.095211
angle = 24.851095
height = 0.000000
heightlock = 0
}
segment26
{
type = 1
length = 91.650345
radius = -224.897781
angle = 23.349176
height = 0.000000
heightlock = 0
}
segment27
{
type = 1
length = 54.460411
radius = -136.244263
angle = 22.902630
height = 0.000000
heightlock = 0
}
segment28
{
type = 0
length = 58.584435
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment29
{
type = 1
length = 91.020180
radius = 284.917816
angle = 18.303776
height = 0.000000
heightlock = 0
}
segment30
{
type = 1
length = 164.422150
radius = 180.246384
angle = 52.265656
height = 0.000000
heightlock = 0
}
segment31
{
type = 1
length = 83.904976
radius = 152.886230
angle = 31.444304
height = 0.000000
heightlock = 0
}
segment32
{
type = 0
length = 25.409590
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment33
{
type = 1
length = 78.272896
radius = 336.092926
angle = 13.343651
height = 0.000000
heightlock = 0
}
segment34
{
type = 0
length = 41.893208
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment35
{
type = 1
length = 23.486832
radius = 123.312492
angle = 10.912895
height = 0.000000
heightlock = 0
}
segment36
{
type = 0
length = 50.730038
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment37
{
type = 1
length = 48.208897
radius = 181.054108
angle = 15.256026
height = 0.000000
heightlock = 0
}
segment38
{
type = 0
length = 32.588253
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment39
{
type = 1
length = 42.028324
radius = 534.679565
angle = 4.503717
height = 0.000000
heightlock = 0
}
segment40
{
type = 0
length = 86.500526
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment41
{
type = 1
length = 52.371475
radius = 498.577423
angle = 6.018453
height = 0.000000
heightlock = 0
}
segment42
{
type = 1
length = 50.112568
radius = 1090.084717
angle = 2.633959
height = 0.000000
heightlock = 0
}
segment43
{
type = 1
length = 63.749279
radius = 122.542747
angle = 29.806452
height = 0.000000
heightlock = 0
}
segment44
{
type = 0
length = 37.046356
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment45
{
type = 1
length = 58.741764
radius = 128.847855
angle = 26.121159
height = 0.000000
heightlock = 0
}
segment46
{
type = 0
length = 80.956505
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment47
{
type = 1
length = 69.392403
radius = -679.582703
angle = 5.850490
height = 0.000000
heightlock = 0
}
segment48
{
type = 0
length = 42.860191
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment49
{
type = 1
length = 105.152565
radius = -701.123474
angle = 8.593062
height = 0.000000
heightlock = 0
}
segment50
{
type = 1
length = 68.178734
radius = -783.264404
angle = 4.987273
height = 0.000000
heightlock = 0
}
segment51
{
type = 1
length = 97.053917
radius = -1534.265503
angle = 3.624392
height = 0.000000
heightlock = 0
}
segment52
{
type = 1
length = 104.018929
radius = -773.105164
angle = 7.708971
height = 0.000000
heightlock = 0
}
segment53
{
type = 1
length = 50.349766
radius = -530.082642
angle = 5.442225
height = 0.000000
heightlock = 0
}
segment54
{
type = 0
length = 100.321648
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment55
{
type = 1
length = 92.347183
radius = 139.386841
angle = 37.959854
height = 0.000000
heightlock = 0
}
segment56
{
type = 0
length = 18.664436
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment57
{
type = 1
length = 34.364628
radius = 33.361313
angle = 59.018902
height = 0.000000
heightlock = 0
}
segment58
{
type = 0
length = 12.571922
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment59
{
type = 1
length = 26.957188
radius = -16.835466
angle = 91.742813
height = 0.000000
heightlock = 0
}
segment60
{
type = 0
length = 15.659904
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment61
{
type = 1
length = 31.165745
radius = 25.537495
angle = 69.923286
height = 0.000000
heightlock = 0
}
segment62
{
type = 0
length = 28.868876
radius = 100.000000
angle = 0.000000
height = 0.000000
heightlock = 0
}
segment63
{
type = 1
length = 95.612984
radius = 391.313293
angle = 13.999577
height = 0.000000
heightlock = 0
}
segment64
{
type = 1
length = 101.204613
radius = 540.300476
angle = 10.732171
height = 0.000000
heightlock = 0
}
Title: Re: AI
Post by: tchemi on June 20, 2017, 10:41:14 AM
Woa ! It is very detailed. Not very easy to read but this look complete.
Title: Re: AI
Post by: JamoZ on June 20, 2017, 06:55:14 PM
Quote from: PiBoSo on June 19, 2017, 07:42:10 PM
Speaking of AI using the same physics with no external forces AT ALL:
http://www.youtube.com/v/b9DyDQR8Re0
Stunning. I'm ecstatic.

Nice, using a video of august 2016 while the AI had an overhaul 2 months ago  :-X
Title: Re: AI
Post by: PiBoSo on June 20, 2017, 07:09:43 PM
Quote from: JamoZ on June 20, 2017, 06:55:14 PM
Quote from: PiBoSo on June 19, 2017, 07:42:10 PM
Speaking of AI using the same physics with no external forces AT ALL:
http://www.youtube.com/v/b9DyDQR8Re0
Stunning. I'm ecstatic.

Nice, using a video of august 2016 while the AI had an overhaul 2 months ago  :-X

1) I have no idea and don't care about what others are doing, unless they are direct competitors
2) the main point of linking the video was to showcase the fact that many games use simple physics and even fake forces to move the AI cars around. This obviously makes it very easy to make them as fast as you want, even impossibly quick
3) It still was quite some time after the first release ( like two or three years? ) so kind of funny for a mid-sized development team with no other project to care for  ;)
Title: Re: AI
Post by: PiBoSo on June 20, 2017, 07:10:26 PM
Quote from: guigui404 on June 19, 2017, 07:46:35 PM
And is an AI planed ? see you've bought a mx-bikes steam page recently , will gpb follow this ?

At the moment the answers are no and no, sorry.