[Project] Turbosliders Bots

Advertise websites, games, projects, etc. HERE.

Moderator: Forum Moderators

User avatar
Etmil
Community User Level: 3
Community User Level: 3
Posts: 433
Joined: Sun Aug 20, 2006 8:27 pm
Location: Tartu, Estonia
Contact:

Re: [Project] Turbosliders Bots

Post by Etmil » Tue Jul 22, 2014 7:06 am

Let's just forget about the website, the new 5D version and organize some good old style cups! Only thing: is the 4000x4000 px editor available yet? I'd design some F1 tracks for you taffers! 8)

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Tue Jul 22, 2014 9:03 am

Etmil wrote:Let's just forget about the website, the new 5D version and organize some good old style cups! Only thing: is the 4000x4000 px editor available yet? I'd design some F1 tracks for you taffers! 8)
We can't go forward without the new version + new website features. But, we at least know now that the new version will come very soon (in 1-2 months).
Anyway, you can already create 4000x4000 tracks, even the editor doesn't support them yet. It's explained somewhere in docs.

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Wed Sep 24, 2014 8:31 pm

I had a little longer break from this project than I planned but it's still alive. And now I finally got my bots to drive faster. They are almost as good as Ande's AI cars. But new algorithm kind of broke my fair play system so next I have to build that one again. So this time only really boring 10 lap ghost race video of Ande's AI car racing against my Bot, both using same AI lap (from Mike). Just to prove that progress is happening.

AndeAI_vs_PowerBot

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Thu Sep 25, 2014 12:40 am

I'm waiting for some non-ghost action where your bot will start from behind of the AI. :wink:

tomees
Posts: 2
Joined: Mon May 07, 2007 1:44 pm

Re: [Project] Turbosliders Bots

Post by tomees » Thu Sep 25, 2014 12:52 am

Offtopic
dede wrote:As for the website, I feel that I will never have time again to take care of it. I'm available to give access to any other webmaster in order to make a new version / develop new stuff.
I'm web dev, if someone need some help just PM me. ;)
turbosliders.com.br

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Sun Sep 28, 2014 12:44 pm

Etmil wrote:Let's just forget about the website, the new 5D version and organize some good old style cups! Only thing: is the 4000x4000 px editor available yet? I'd design some F1 tracks for you taffers! 8)
As you probably already know, new editor is available with the beta/rc version. So we'll be waiting those tracks!

Ok, I was able to return the "fair play" system to about same level as it was seen in BotTest_005, but now bots are much faster as you saw from my last post.

Here is video example of how bot avoids collisions. I drive my car in front of it in different parts of the track and it handles passing quite ok. Couple times it gets stuck in offroad obstacles afterwards but you understand that this is really difficult to get just right by amateur. Ande would probably code better stuff with eyes closed. But its fine to me for now.
ObstacleTesting

And of course also a full race video:
BotTest_006

I divided bots in four categories, so bots 1-5 choose only the best laps and 16-19 choose mostly worst laps. Winners time was 26:07 which I think is quite good. If you compare it to official results here:
Veloccio GP
you see that with that time winner bot would have lost only to Dede and Eddie.

I haven't driven in a while myself and as the bots are now faster and using Mike's AI laps, I really didn't have any chances.
Pitstops are also bit difficult and there is some rough collisions happening in pits but at least all cars seem to manage fill their tanks.

So there's obviously a lot to improve but Im getting tired of Veloccio so my next task will probably be to run bots with different TSE track and see if my algorithms still work ok.

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Sun Sep 28, 2014 2:45 pm

It was really fun to watch first video. :)
On the second video it's easily see that the bots are still too aggressive in a nasty way. They are kinda on REIROM's level currently. Very often they're pushing each other instead to keep the distance in between. And, once they decide to avoid a collision during the turn, they're finishing out of the track too often. Seems more tweaking and balancing will be needed to get them feel more natural. :wink:

Rendy Andrian
Community User Level: 2
Community User Level: 2
Posts: 230
Joined: Sun Nov 25, 2007 4:10 am
Location: Jakarta, Indonesia
Contact:

Re: [Project] Turbosliders Bots

Post by Rendy Andrian » Wed Oct 01, 2014 3:40 am

So far so good :)

Maybe we should consider a Le Mans race using those bots. You've shown us that the bots can pit, slow down occasionally to avoid collisions and avoiding an obstacle, now maybe think about testing all of them at a same time one step higher.

The race will consist of 5 cars of four categories: LMP1, LMP2, GT1 and GT2. I've made individual cars for each classes save for the LMPs and even test them out with normal AIs a couple of times, and I think having your bots race in a Le Mans race would be an interesting thing to see ;)
RACING SINCE 2007
OFFICIAL SITE - BLOG - TWITTER

Jurgen-NL
Community User Level: 4
Community User Level: 4
Posts: 719
Joined: Fri May 22, 2009 2:18 am

Re: [Project] Turbosliders Bots

Post by Jurgen-NL » Wed Oct 01, 2014 1:24 pm

dont know why whip is insulting bots with "same level as reirom" (they are more advanced then reirom and less aggressive)

i was following the 2 bot leaders bot 04 and 01 and at the end they came across a lapped car, and where bot 04 had some issues of instantly overtaking and gave bot 01 a chance to get back and take perhaps a lead (which didnt happend obviously) bot 01 did it swiftly and cleany :) .
both seemed to have overtaken the lapped car quite fair and nice.

i do agree with whip that they still need a bit of tweaking but this is some good stuff.

i like the bots speed and consistency and wouldnt mind racing off against them in a full race
Dont beg for things do it yourself or else you wont get anything!!

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm
Location: Netherlands

Re: [Project] Turbosliders Bots

Post by Tijny » Wed Oct 01, 2014 3:02 pm

I haven't really been following this thread I'm sorry to say, but this seems very interesting. If I may ask, how did you manage to get the bots to make real-time decisions? How did you get your code to interface with the game's AI system?

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Wed Oct 01, 2014 4:35 pm

Thanks all for commenting. I might do one more update for Veloccio if I manage to do some tweakings to bots driving as requested. Then I probably try Lanz's PTM car+track to see if that works too.
Whiplash wrote: On the second video it's easily see that the bots are still too aggressive in a nasty way. They are kinda on REIROM's level currently. Very often they're pushing each other instead to keep the distance in between. And, once they decide to avoid a collision during the turn, they're finishing out of the track too often. Seems more tweaking and balancing will be needed to get them feel more natural.
Well the bots are quite simpletons, there's so many variables that you can't make precise calculations but try to have good estimations etc. First lap specially is always a chaos as there are so much traffic that bots can't handle it well. But I have now managed to fix couple bugs, make pitstops collisionless and have couple ideas of making smarter takeover decisions. So hopefully you will be more satisfied with next video.

Rendy Andrian wrote:So far so good :)

Maybe we should consider a Le Mans race using those bots. You've shown us that the bots can pit, slow down occasionally to avoid collisions and avoiding an obstacle, now maybe think about testing all of them at a same time one step higher.

The race will consist of 5 cars of four categories: LMP1, LMP2, GT1 and GT2. I've made individual cars for each classes save for the LMPs and even test them out with normal AIs a couple of times, and I think having your bots race in a Le Mans race would be an interesting thing to see ;)
At this time bots can't choose cars so this works only with fixed car. I try to implement car choosing after testing with PTM first. Is there some other differences for Le Mans race or is it just more laps and stuff?
Jurgen-NL wrote:dont know why whip is insulting bots with "same level as reirom" (they are more advanced then reirom and less aggressive)

i was following the 2 bot leaders bot 04 and 01 and at the end they came across a lapped car, and where bot 04 had some issues of instantly overtaking and gave bot 01 a chance to get back and take perhaps a lead (which didnt happend obviously) bot 01 did it swiftly and cleany :) .
both seemed to have overtaken the lapped car quite fair and nice.

i do agree with whip that they still need a bit of tweaking but this is some good stuff.

i like the bots speed and consistency and wouldnt mind racing off against them in a full race
With consistency its same as with Ande's AI that some AI laps work and some don't. I am using Mike Nike's AI laps(except for pit laps) so that's why they indeed are quite fast. Just have to make them little smarter for races.
Tijny wrote:I haven't really been following this thread I'm sorry to say, but this seems very interesting. If I may ask, how did you manage to get the bots to make real-time decisions? How did you get your code to interface with the game's AI system?
I am not using Ande's AI. My bots interact through TCP/UDP and game treats them as normal players. I am using same AI lap format than Ande for basic driving line but all the control decisions is made by my software. I read the fuel/position etc. data from UDP and then make calculations. I can roughly also simulate the physics engine but the precision isn't 100% and I can't handle collision calculations or even sliding of the cars so I use the fastest 20ms (ServerSendInterval 1) updating as the bandwith isn't an issue when just using local connection. I might later try slower updates that would work for normal internet server bandwiths but now I just concentrate on other stuff. And I don't know if using bots this way would brake software license of the game or something like that so I rather just use them in local play.

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm
Location: Netherlands

Re: [Project] Turbosliders Bots

Post by Tijny » Wed Oct 01, 2014 5:42 pm

I must say, that is pretty ingenious, and at the same time I can't believe I didn't think of that myself. :)
My ultimate wet dream for some time now has been to write a Punaball AI, and with this technique it may even be somewhat feasible. Surely it should be possible to make an artificial PB player that's at least as good as REIROM! I have another project that takes up all my programming time though, so maybe in the not-so-near future...

What programming language is your project written in, by the way?

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Wed Oct 01, 2014 6:41 pm

Tijny wrote:I have another project that takes up all my programming time though, so maybe in the not-so-near future...
Yeah, don't bother him with this shit. He's working on combining servers with the website by cool ranking features etc.!

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Wed Oct 01, 2014 6:47 pm

Tijny wrote:I must say, that is pretty ingenious, and at the same time I can't believe I didn't think of that myself. :)
My ultimate wet dream for some time now has been to write a Punaball AI, and with this technique it may even be somewhat feasible. Surely it should be possible to make an artificial PB player that's at least as good as REIROM! I have another project that takes up all my programming time though, so maybe in the not-so-near future...

What programming language is your project written in, by the way?
I use old Delphi7 for all my projects as I have really got used to it over 10 or so years. I can quickly make some shitty looking code that still somehow works. :D

I thought of PB AI but I believe the TCP/UDP packets might have a bit different structure? I learned lot from your instructions of tsr file reading but Punaball might include some other specific things or work bit differently than races. Also you would have to really know how to calculate collisions to make decent predictions for PB. I got some info on them from Ande's old email to Mike but it wasn't really complete. Basically needs to calculate normal vector angle(of 8 possible ones) of the collision point or something like that.

Rendy Andrian
Community User Level: 2
Community User Level: 2
Posts: 230
Joined: Sun Nov 25, 2007 4:10 am
Location: Jakarta, Indonesia
Contact:

Re: [Project] Turbosliders Bots

Post by Rendy Andrian » Thu Oct 02, 2014 1:33 am

power79 wrote:
Rendy Andrian wrote:So far so good :)

Maybe we should consider a Le Mans race using those bots. You've shown us that the bots can pit, slow down occasionally to avoid collisions and avoiding an obstacle, now maybe think about testing all of them at a same time one step higher.

The race will consist of 5 cars of four categories: LMP1, LMP2, GT1 and GT2. I've made individual cars for each classes save for the LMPs and even test them out with normal AIs a couple of times, and I think having your bots race in a Le Mans race would be an interesting thing to see ;)
At this time bots can't choose cars so this works only with fixed car. I try to implement car choosing after testing with PTM first. Is there some other differences for Le Mans race or is it just more laps and stuff?
Server /AICar function says hello. I tinkered with that everytime I wanted a Le Mans race.

But your bot system works when playing offline server game too, right?

EDIT: Forgot explaining about Le Mans race (D'oh!). So basically Le Mans race is an endurance race, so obviously we'll race more laps than we did in Veloccio. The only differences are only that and the different class cars, allowing for a multiclass traffic. This means faster classes will pvertake slower cars. And, obviously, cars will pit for damage reparation, fuel and tires (Duh...).

We could go with another TSE track or F1SL's Sarthe. I recommend Canadring though as it's the closest thing to Jarama ( Hello Le Mans Endurance Series 2006 :D )
RACING SINCE 2007
OFFICIAL SITE - BLOG - TWITTER

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Thu Oct 02, 2014 7:40 am

Rendy Andrian wrote: Server /AICar function says hello. I tinkered with that everytime I wanted a Le Mans race.
I would have to use normal /car command as I don't use Ande's AI cars but my own bots that show up as human players to the game as I explained earlier.
But yeah, I could use macros for setting cars but if there's differences in car properties then my bots must know which car they are driving so its better to automate that process too. It shouldn't be a problem but I have few other things to do first.
But your bot system works when playing offline server game too, right?
That's the only way it works right now. Because they need fast updates from the server(ServerSendInterval 1) they can't drive properly at online servers where updates come slower. So they only connect to local host (127.0.0.1).
And, obviously, cars will pit for damage reparation, fuel and tires (Duh...).
If you mean tires from the new TS version, I haven't implemented those yet as I work with old version. That means drafting is not available either.

And Im still pretty much in testing phase with this software so don't expect to get drive yourself against my bots anytime soon. I can only provide recordings from my test races for now.

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Tue Oct 07, 2014 1:01 am

Ok, most likely last Veloccio update. Didn't manage to make as clean race as hoped, bots are still too rough. But maybe better than last time? Just don't judge them based on first few laps, they can't really handle all that traffic.

New feature is now sector times that are listed on chat screen. I use control points 1,14 and 27 as checkpoints. They are not updated to screen in real time as I didn't want to fill those 3 chat lines constantly after every sector record in the beginning. So chat is updated after no new records are driven in at least 3 seconds. When chat has been quiet for 2mins then top-3 sector times or fastest laps are listed. Perhaps that makes the race a bit more interesting to watch.

I keep trying to make the driving better but for now probably with other track/car.

BotTest_007

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Tue Oct 07, 2014 6:37 am

Yep, they are still kinda reiromized. :wink: The bad thing about Mike's driving lines is that he made some extra moves on the straights, so I never know when bots do some moves because of your code, and when because of his AI line.

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Mon Oct 20, 2014 7:53 pm

Now bots race at PTM_2_Spielberg track. You can download track and PTM cars from here:
PTM2 Info

Bots can now choose a car so all PTM cars are represented in race. Winner's ([bot]power03) time was 20:23 which is actually better than Lanz's winning time(20:26) in official race.

I also rebuild the fair play system again and now bots drive more carefully. Not fully happy for the results but at least less collisions. This is really the toughest part to get right for this project.

Next I probably start using new beta version of TS.

BotTest_008

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Thu Oct 23, 2014 9:47 am

It's quite clean now. Maybe ptm cars are reason for that, because they're slower. So, your bots actually behave as humans even with F1-Premium - we can't be more fair with that car either. :wink:

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Wed Oct 29, 2014 11:57 am

I quickly made a small car analyzer that gives basic information about car's behaviour when you insert car/terrain values. It should be pretty accurate at least for shorter distances. Didn't really test that much, but it should work if you give sensible values.

This is what info is included:

Max. speed of the car (pixels/second)
Acceleration time from speed (A) to (B) (or braking time if (A) < (B)) (seconds)
Distance it travels during that acceleration/braking (pixels)

Turning time for (X) degrees while also accelerating from speed (A) (seconds)
Road length it needs to turn that much (pixels)
End speed it has when turning completed (pixels/second)

Car is always expected to be non sliding.

Maybe this has some help for car(or track) designers. Or maybe not, anyway here it is:
TSCA.zip

It's a Windows program as usual. Just unzip and then run the exe file.

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Wed Oct 29, 2014 1:33 pm

I appreciate your work, but I'm not quite sure if this can be usable. It's hard to visualize car behavior by watching these numbers. Anyway, a good add-on would still be if we could simply load existing car/terrain instead of typing their numbers manually.

Btw, I was wondering would it be hard to create rough AIs instead of fair ones? :wink: I mean, is possible to make them able to hit you while you're in weak position in front of them. Also, they should be able to block you in certain positions too.

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Wed Oct 29, 2014 2:19 pm

Whiplash wrote:I appreciate your work, but I'm not quite sure if this can be usable. It's hard to visualize car behavior by watching these numbers. Anyway, a good add-on would still be if we could simply load existing car/terrain instead of typing their numbers manually.
Right, not much help, but I remembered this message from you:
Whiplash wrote: decided to make a test that will allow me to get the real life proportions of F1 car length and speed implemented inside of the TS. An real F1 car will drive 100m starting with 0 acceleration in about 4.25. That info helped me to create a track that will have proportional 100m compared to the dimensions of the F1 car
And thought that with this kind of stuff my tool could help. Or with determining how long straights to make on a track or something like that. But anyway, it is really simple tool that I put together in few hours so no harm done. Loading cars is unnecessary extra work for me as there is only few numbers you have to enter.
Btw, I was wondering would it be hard to create rough AIs instead of fair ones? :wink: I mean, is possible to make them able to hit you while you're in weak position in front of them. Also, they should be able to block you in certain positions too.
I guess it would depend of how smart roughness you want from them. They are naturally pretty rough even if you just make them ignore other drivers. What is difficult is make them leave their normal driving line and still have them stay on track and with good pace. I guess purposefully to hit opponent would be almost same as avoiding hits which requires some calculations and predictions of opponents movements. Also I can't calculate/detect collisions and their impact on cars as I don't know all the algorithms Ande is using. I think I concentrate on the fair play side for now.

power79
Community User Level: 3
Community User Level: 3
Posts: 463
Joined: Sun Dec 16, 2012 11:10 pm
Location: Finland

Re: [Project] Turbosliders Bots

Post by power79 » Sat Mar 28, 2015 8:03 am

I did some work with this after long break. Here is first test race with new TS version.

BotTest_009.tsr

Track: TSE_Bruinen
Car: F1-Prime
Fuel: Enabled
Drafting: Enabled
TyreWear: Enabled
Laps: 28

Biggest change is propably getting bots to work with default network settings (ServerSendInterval 5). In theory now it's possible to have bot races in network games. Much work left until I can arrange any open test races, though.

TyreWear and Drafting have only acceleration effects because I noticed my bots can't adjust their speed to changing steer,grip etc. values. So they can't stay on track if those values are affected.

Bots are not able to "seek" draft but they should be able to handle it when they get it.

Pitstops are still a bit of a problem if it gets crowded (more than 5 or so cars at the same time), but in this race I think there were no problems.

Much room to improve the driving etc., but don't really have time for that now. But I am determined to finish this project some day.

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: [Project] Turbosliders Bots

Post by Whiplash » Sat Mar 28, 2015 4:07 pm

Their aggressiveness is good. They are only not careful enough in close battle. They should keep a bit bigger distance when driving behind and side by side. They should also open for overtaking more often instead of just following the car being in line with it.

Post Reply