Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu May 23, 2019 8:03 pm

All times are UTC




Post new topic  Reply to topic  [ 24 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: RoadAI
PostPosted: Mon Dec 03, 2018 3:28 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 26, 2015 12:52 am
Posts: 259
RoadAI v5 is underperforming in a variety of tests. I'm unsure what is going on for sure, but I remembre from past versions that this AI used to do much better. Now, it's only capable of maintaining 1 or 2 routes and doesn't develop further than this.

_________________
Formerly known as Samu


Top
   
 Post subject: Re: RoadAI
PostPosted: Fri Dec 21, 2018 10:38 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 26, 2015 12:52 am
Posts: 259
I found out the issue to be the change from SuperLib 39 to 40.


Quote:
[22:29] <Zuu> Well SuperLib 40 has this change "- RoadPathFinder::FindPath and ::GetFindPathError was not responding as
[22:29] <Zuu> documented
[22:29] <Zuu> " which I assume could break AIs if they expect the undocumented behaviour.


Just tested with an edited RoadAI v5 importing SuperLib 39 instead, and it's now building as fine as before.

_________________
Formerly known as Samu


Top
   
 Post subject: Re: RoadAI
PostPosted: Fri Dec 21, 2018 10:55 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4552
Location: /home/sweden
I took a look through RoadAI-4 and -5 and neither uses the mentioned methods directly but rather rely on the high level RoadBulider.

You can dig into changes between SuperLib 39 and 40 here:
https://dev.openttdcoop.org/projects/su ... repository

One thing there is fix of counting of PF loops which apparently was used up too quick in 39 compared to how it was documented. It is possible that it RoadAI benefits from that or there is some other detail in the changes that went wrong or simply made it perform better/worse on certain map types.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: RoadAI
PostPosted: Fri Dec 21, 2018 11:43 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4552
Location: /home/sweden
I looked a bit further on this and RoadAI-4 and -5 specifies max_loops as 500 when it calls RoadBuilder.Init. The default value in the library is 4000. Note that a bug in SuperLib 39 caused it to not abort when the 500 loops were used up, while with SuperLib 40 it does. So I suggest raising the max_loops limit. The vaule you want depends on how long routes RoadAI builds. I don't have a formula so you have to do some trial and error to find out the sweat spot.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 24 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.