NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

MukiJames
Engineer
Engineer
Posts: 3
Joined: 27 Mar 2015 20:56

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by MukiJames »

Hi Morloth,

Thank you for your quick response. I do not think, that the map size would be the issue, because I play with the default settings (256x256). I started in 1950, currently it is 1957; three AI already appeared, but still not a single action was taken by them.

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Morloth »

MukiJames wrote:Hi Morloth,

Thank you for your quick response. I do not think, that the map size would be the issue, because I play with the default settings (256x256). I started in 1950, currently it is 1957; three AI already appeared, but still not a single action was taken by them.
That is strange. It might be that the AI could not find a profitable route and decided not to play ;). This might be a bug though, do you have a safe game and a list of mods you are using at the moment?

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Morloth »

Just started up a game and it does seem that there might be a bug on 256x256 maps (other sizes seem to be fine). Sometimes the AI hangs during checking the connectivity between towns. I'm not sure yet what this is causing but it seems to be very rare. Most of the games start successful with NoCAB creating the first routes in the first year.

If you provide me with a safe game I might be able to identify this bug and hopefully fix it.

Many thanks!
Bram

MukiJames
Engineer
Engineer
Posts: 3
Joined: 27 Mar 2015 20:56

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by MukiJames »

Sure, please find my save file here. And thank you for your effort in advance ;)
Attachments
Muki.sav
Save file with three inactive AIs.
(106.86 KiB) Downloaded 86 times

User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland
Contact:

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Core Xii »

Crashed on load. Trunk OpenTTD, content-downloaded NoCAB.
Unnamed, Apr 27th, 1950.png
Unnamed, Apr 27th, 1950.png (7.74 KiB) Viewed 4805 times

User avatar
Train<In>Vain
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 24 Nov 2004 22:16
Location: SF Bay

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Train<In>Vain »

Was curious to know if anyone has seen this happen: AI vehicles go into depot to be replaced with more recent model, and come out with no orders, only to wander aimlessly forever. Here is a save game that shows this. Trucks 159 - 171 are sitting in depot. Bus 374 is already out and roaming. There are other buses and trucks as well. NoCAB did very well otherwise.
Attachments
SNCF, Jul 13th, 1970.sav
(1.77 MiB) Downloaded 77 times
Rookie of the Year: 2004, 2005, 2007, 2008, 2009, 2010, 2012, 2013, 2014, 2015 & 2016

HGus
Engineer
Engineer
Posts: 100
Joined: 12 May 2013 22:28
Location: Argentina

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by HGus »

Core Xii wrote:Crashed on load. Trunk OpenTTD, content-downloaded NoCAB.
You are using and old and unmaintained alpha version of this AI. Delete the "Bleeding Edge Edition" and download the newer release of NoCAB.

User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland
Contact:

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Core Xii »

HGus wrote:You are using and old and unmaintained alpha version of this AI. Delete the "Bleeding Edge Edition" and download the newer release of NoCAB.
Why is the older and unmaintained version of two named "bleeding edge", and why is it available for download on Bananas in the first place?

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Morloth »

Core Xii wrote:
HGus wrote:You are using and old and unmaintained alpha version of this AI. Delete the "Bleeding Edge Edition" and download the newer release of NoCAB.
Why is the older and unmaintained version of two named "bleeding edge", and why is it available for download on Bananas in the first place?
In honesty both are 'unmaintained' as I have not touched the code for this AI in quite a few years now. The Bleeding Edge Edition is a unstable version that used to be in development but not considered stable yet. If memory serves me correctly it states this in the description of the AI.

As for the other bugs, I cannot promise to be able to look into them as I haven't touched the code in years and moved on to other projects in the meantime.

Sorry guys,
Bram

User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland
Contact:

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1

Post by Core Xii »

Morloth wrote:As for the other bugs, I cannot promise to be able to look into them as I haven't touched the code in years and moved on to other projects in the meantime.
Then is there any point to reporting crashes? If not, could you then update the AI's description to discourage that so as to not waste others' time?

xarick
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 26 Feb 2015 00:52

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by xarick »

For the first time I managed to have a NoCAB surviving 100 years straight without crashing. I tested it solo. In comparison with the other AIs, it's extremely slow at handling tasks. It was especially slow at starting, it took 4 years and half before it started building routes. Later on in the game, by around year 2017, during rail upgrading it took a lot of time to manage the whole upgrade, I can't remember how many years, but I know it upgraded from 32 trains from electric rail to 10 trains on maglev. I am still unsure how it manages with this upgrade, but it appears that it can't handle other tasks while doing this, as I was seeing tons of vehicles stopped in depots, and the profit graph slowly going down by cumulative stopped vehicles.Only about 10 years later, it reawakes and managed everything else that had to be managed.

Despite the very slow handling of tasks, this AI is very strong in profits, still beats everyone else out there, and as I said, I finally get to see what he does past the rail upgrading. I always had him crashing around here on my previous tests, ~70 years into the game. This time it went full 100 years without crashing!
Attachments
NiceCAB - v2.1.3, 1st Jan 2051.sav
(406.65 KiB) Downloaded 80 times
openttdCore5.cfg
(10.74 KiB) Downloaded 75 times
Formerly known as Samu

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Morloth »

Nice! I should probably do a few more tests with the new version of OpenTTD. Might have some time to look into some bugs that have been reported.

User avatar
Cecil Cityscape
Engineer
Engineer
Posts: 25
Joined: 07 Sep 2014 02:27
Location: Ontario, Canada

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Cecil Cityscape »

I am very impressed with this AI. I am currently playing with two competitors and it is a handful. They expand very quickly and do well for themselves. I have seen the ai do road vehicles aircraft and ships, but in 40 years have yet to see it do trains. I was just wondering if the AI has a preference for road vehicles or if it tends to use trains only under certain conditions.
Cecil Cityscape is the name of an avatar in Chris Sawyer's Locomotion
Cheers from the Dominion of Canada! :lol: 8)

Wormnest
Engineer
Engineer
Posts: 98
Joined: 14 Jul 2013 12:33
Location: Netherlands

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Wormnest »

Building a train route is for an AI a lot more complicated than any of the other vehicle types. Especially since NoCAB and my own fork of it NoNoCAB favor longer routes than most other AI's it can fail to find a good route in a reasonable time. Also building trains including a rail network is usually not cheap so if it doesn't have a lot of money it may choose to build using something else than a train route.

One other factor that may be a cause of building less train routes is that each vehicle type gets a fixed amount of time to analyze candidate routes. Since pathfinding for train routes often takes so much time means it can check less possible routes and thus is less likely to find good candidates for a connection.

Besides that there are some shortcomings in the original NoCAB concerning it's handling of trains that may also influence this. Just a word of warning: when it starts to build train routes the chances of it crashing when saving because of taking too long to save will increase since train routes take the most time to save.

User avatar
Cecil Cityscape
Engineer
Engineer
Posts: 25
Joined: 07 Sep 2014 02:27
Location: Ontario, Canada

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Cecil Cityscape »

I have noticed that when building train routes, nocab often fails when building roro stations. perhaps for a future update, terminus stations could be built to allow for easier connections
Cecil Cityscape is the name of an avatar in Chris Sawyer's Locomotion
Cheers from the Dominion of Canada! :lol: 8)

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Kogut »

Morloth wrote:* Custom A* implementation designed for speed - using an altered Fibonacci queue which is quicker than the library's Binary queue.
It is late by 8 years, but I see no discussion about it in the thread - is it still true? If yes - is there any negative side of using it in other AIs?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

HGus
Engineer
Engineer
Posts: 100
Joined: 12 May 2013 22:28
Location: Argentina

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by HGus »

I think a version of it is used by TransAI.

Here the library page: http://dev.openttdcoop.org/projects/lib-fibonacciheap

And post by Zuu: viewtopic.php?f=65&t=59260

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3

Post by Morloth »

Time to make it official. NoCAB will no longer be developed. Those for looking for an up-to-date version of this kind of AI please check out NoNoCAB which is a fork of this AI created by Wormnest.

Thanks for the support and feedback over all these years :D.

Bram

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests