NoCAB - Bleeding Edge edition Version 2.2a4

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

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9408
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NoCAB - Bleeding Edge edition - Version 2.0a20

Post by planetmaker »

Morloth wrote:Ok, I've looked into the problem with NewGRFs. The major problem is the way that NoCAB builds a tree of industries which tells it which once it should consider first. For example at the very start only industries which do not accept anything and produce something (e.g. coal mines, oil rigs) are taken as primary industries. Also industries which accept and produce the same cargo fall under this category (e.g., towns, banks).
There's http://noai.openttd.org/api/trunk/class ... yType.html which gives you to my knowledge AIIndustry.IsRawIndustry at hand. Also FIRS should support that properly.

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

Re: NoCAB - Bleeding Edge edition - Version 2.0a20

Post by Morloth »

Ah, sweet! Thanks planetmaker! This makes this so much easier :D. New version is out! :)

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

Re: NoCAB - Bleeding Edge edition [Not in use for now]

Post by Morloth »

NoCAB 2.0.0 is released. This thread will not be in use until the need for a new bleeding edge edition emerges. For now I'm going to take a break from OpenTTD after the last past weeks of coding / bug fixing :).

When I do return, however, I'll be focusing on a complete overhaul of the code as mentioned earlier. I want to take a good look at the framework and redesign this AI from the ground up to make some much needed changes. But nothing you should be worried about right now, go enjoy OpenTTD 1.0.0 (and NoCAB 2.0.0 I you don't mind me say ;) ).

Thank you all very very much for all the bug reports and tips / suggestions over the last couple of weeks, couldn't have done it without you! :)

- Bram

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

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Morloth »

NoCAB bleeding edition is kicked back into gear. Please see the first post on the objectives before the stable version 2.2.0 is released.

New release 2.2a1:
Bugs fixed:
* Loading / Saving takes too long (http://www.tt-forums.net/viewtopic.php?p=942632#p942632).

Features introduced:
None

Please let me know if you find any new bugs, thanks for your help!
Bram

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Brumi »

Great! :) The next test will include this version.

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Brumi »

Here's a more difficult problem for you:
jam.png
(272.46 KiB) Downloaded 2 times
Trains leaving Vác Alsó are sitting in a jam, simply beacuse the line has reached its maximum throughput. There are quite a lot of long bridges and tunnels on this line, and it is even merged with another line. Currently there are 35 trains visiting the station, as the AI keeps adding new ones, because the cargo waiting at the other station doesn't get transported. Some of the trains are already unprofitable, the AI will probably sell them, so the problem is not so serious.
In this game it is still the last stable version of NoCAB, but it shouldn't make a difference now...

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Brumi »

Sorry for triple posting, but you might not notice if I edit my last post...
I got an assertion failure with the latest bleeding edge version. NoCAB was doing very well in the game :(
Attachments
nocab crash.png
(31.87 KiB) Downloaded 2 times
Toyland test after 30 years.sav
(1.54 MiB) Downloaded 114 times

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Brumi »

I got another assertion failure, it happens a few months after you load the savegame below. At least it happened twice for me.
Attachments
assertion failure.png
(31.39 KiB) Downloaded 2 times
autosave11.sav
(1.97 MiB) Downloaded 110 times

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

Re: NoCAB - Bleeding Edge edition Version 2.2a1

Post by Morloth »

Thanks for the list of bugs, I'll try to fix them over the weekend. Sorry to see NoCAB fails that often in your competition :/. Hopefully that'll be something of the past soon enough :).

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

Re: NoCAB - Bleeding Edge edition Version 2.2a2

Post by Morloth »

Version 2.2a2 released.

Bugs fixed:
* "Saved connections are loaded twice!" (http://www.tt-forums.net/viewtopic.php?p=949318#p949318).
* "Trying to build vehicles for connections which do no longer exist." (http://www.tt-forums.net/viewtopic.php?p=949201#p949201).

Also some other minor bugs have been fixed. Next version will focus on fixing ships, sometimes a connection is build but the ships have no orders to follow it...

Please note that this version breaks compatibility with previous save games, previous save games might have saved a connection more than one time which is the reason it fails. Please keep those bug reports coming! :)

- Bram

svetovoi
Engineer
Engineer
Posts: 87
Joined: 12 Oct 2007 14:07

Re: NoCAB - Bleeding Edge edition Version 2.2a2

Post by svetovoi »

Morloth wrote:Please keep those bug reports coming! :)
Well, I think I've found a bug in your code while was looking for rail pathfinder. :)
File "RailPathFinderHelper.nut" has a line

Code: Select all

if (Tile.IsSlopedRoad(currentAnnotatedTile.parentTile, currentTile, nextTile)) 
If I'm not missing something it probably should have been

Code: Select all

if (Tile.IsSlopedRoad(currentAnnotatedTile.parentTile.tile, currentTile, nextTile)) 

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

Re: NoCAB - Bleeding Edge edition Version 2.2a2

Post by Morloth »

ac84 wrote:
Morloth wrote:Please keep those bug reports coming! :)
Well, I think I've found a bug in your code while was looking for rail pathfinder. :)
File "RailPathFinderHelper.nut" has a line

Code: Select all

if (Tile.IsSlopedRoad(currentAnnotatedTile.parentTile, currentTile, nextTile)) 
If I'm not missing something it probably should have been

Code: Select all

if (Tile.IsSlopedRoad(currentAnnotatedTile.parentTile.tile, currentTile, nextTile)) 
Very observant, thanks for that! :D This bug must have been in the code since the very first version :roll: .

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a3

Post by Brumi »

Now I'm trying out Chill's patchpack with some NewGRFs enabled (TaI UK houses, FIRS industries, eGRVTS and UKRS) with AdmiralAI and NoCAB. Although NoCAB's "NiceCAB" setting is enabled, it makes way more profit than me or AdmiralAI! :) Cargodist and FIRS are giving me a new OTTD experience :)
For some reason NoCAB hasn't built a train so far.

But to get to the point, I noticed one issue: when NoCAB reaches the road vehicle limit, it still builds road stations and connects them, but they're left unused. And nothing happens if I raise the vehicle limit.

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

Re: NoCAB - Bleeding Edge edition Version 2.2a3

Post by Morloth »

Thanks for all your feedback, a new version has been posted (2.2a4). Here is the changelog:

* Terraforming issues solved.
* Train deconstruction does not remove pieces of rails of other connections anymore (hopefully!).
* Engines to be used are now evaluated on a connection to connection base. So expect to see a very diverse fleet as different connections might be better served with different vehicles.
* Repay loan at the very beginning of the game - no need for unnecessary losses!
* Upgraded to API 1.2.
* Check slopes for road and train paths (thx ac84!).
* The decision making process now takes into account the amount of money which will be made the next X months and can now decide to wait X months before doing construction because this will yield more income in the long run.
* A lot of other bugs fixed and massive code cleanup (WIP).

The biggest is the new decision making process, better guessing of the travel times for vehicles and train / terraforming issues being solved. This is still far away from the final release, but progressing towards that target. Also do note that because we choose vehicles based on individual connections helicopters are now implicitly supported 8).

More to come!
Bram

Dr. B. Ching
Engineer
Engineer
Posts: 97
Joined: 14 May 2011 10:58
Location: Sausagewood

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by Dr. B. Ching »

Hello Morloth,

the new vehicle selection method is a great feature for NoCAB (one of my favourite AIs), but 2.2a4 had a problem with trams when I tested it in an unpatched trunk version. They appear to be handled like ordinary road vehicles, including standard loading bays and other inappropriate infrastructure. Running just a basic NewGRF list didn't help.

OpenTTD: r22671
NewGRFs: Generic Tram Set 0.4, eGRVTS 1.0, HEQS 1.1.0 (freight trams only)

Kind Regards,
The Axe

Image

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

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by Morloth »

Dr. B. Ching wrote:Hello Morloth,

the new vehicle selection method is a great feature for NoCAB (one of my favourite AIs), but 2.2a4 had a problem with trams when I tested it in an unpatched trunk version. They appear to be handled like ordinary road vehicles, including standard loading bays and other inappropriate infrastructure. Running just a basic NewGRF list didn't help.

OpenTTD: r22671
NewGRFs: Generic Tram Set 0.4, eGRVTS 1.0, HEQS 1.1.0 (freight trams only)

Kind Regards,
The Axe

Image
Hi The Axe,

Thanks for your report. I'll look into it as soon as I get the chance! :)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9408
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by planetmaker »

NoCAB r498 can save a bit on infrastructure, namely on harbours:
Attachments
nocab_harbours.png
nocab_harbours.png (105.09 KiB) Viewed 4314 times
nocab_aitest_shiponly.sav
savegame
(52.06 KiB) Downloaded 100 times

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

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by Kogut »

small problem, offending road is about 1 month old, constructed before nocab road construction and owned by different company
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (25.53 KiB) Viewed 4176 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

wilgefortz
Engineer
Engineer
Posts: 1
Joined: 27 Mar 2013 11:28

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by wilgefortz »

One of running scripts crashed
Your script made an error: the index "ai_et_engine_available" does not exist
*FUNCTION[constructor()]nocab__bleeding_edge_edition-2.2a4\management\connections\ConnectionManager.notline[11]
*FUNCTION[Start()]nocab__bleeding_edge_edition-2.2a4\main.notline[75]

How I can uninstal this AI?

Brumi
President
President
Posts: 905
Joined: 18 Jul 2009 17:54

Re: NoCAB - Bleeding Edge edition Version 2.2a4

Post by Brumi »

wilgefortz wrote:How I can uninstal this AI?
Find it in My Documents/OpenTTD/content_download_ai and delete it.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests