RoadAI
Moderator: OpenTTD Developers
Re: RoadAI
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
Re: RoadAI
I found out the issue to be the change from SuperLib 39 to 40.
Just tested with an edited RoadAI v5 importing SuperLib 39 instead, and it's now building as fine as before.[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.
Formerly known as Samu
Re: RoadAI
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.
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)
Junctioneer (a traffic intersection simulator)
Re: RoadAI
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)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 16 guests