I've recently got back into coding NoCAB and decided some big changes need to be made which means I cannot guarantee that every iteration will be as stable as the original NoCAB. Therefore I'll be using this channel for developing the next iteration of NoCAB (version 2.2). Please let me know if you come across any bugs, once it is stable enough and includes all the features I want it to contain it will be released as NoCAB 2.2.0.

New Features:

Upgrade existing connections using a different connection type (e.g. upgrade a road connection to a train connection).

Better handling of build failures and fail gracefully. NoCAB now stops construction and destroys everything it made (if necessary).

Please add more to the list if you find new bugs. They'll be squashed ASAP.

- Bram

P.S. You need a nightly later than rev. 22584 - otherwise the AI will not work!

Revision details:-= Version 2.2a4 =-* 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).

-= Version 2.2a3 =-* Fixed a problem with saving.

-= Version 2.2a2 =-* Problem with loading saved games.* Fixed a problem where we tried to build vehicles for connections which do no longer exist.* Make sure the depots and docks are removed if building a ship connection failed.* Some code cleaning.

-= Version 2.2a1 =-* Made loading and saving a LOT faster. Before it went over all possible industry connections to find the matching pairs .

"Try to stay away from already serviced industry" is nice indeed however instead of trying - a direct "Stay away from industries with more than 60% of last_month_pct_transported[j] (j = production_rate 0 or 1) I think is simpler to implement even, if of course the last_month_pct_transported is exposed already in this new-fangled NoAI.

I don't think it is required.What if one wold like to see service at 40%? or 70%? or 20%?Hardcoding is bad.In this case, it only serves your personal intentions, Sirkoz

_________________If you are not ready to work a bit for your ideas, it means they don't count much for you.OpenTTD and Realism? Well... Here are a few thoughs on the matter.He he he he------------------------------------------------------------Music from the Bloody Time Zones

"Try to stay away from already serviced industry" is nice indeed however instead of trying - a direct "Stay away from industries with more than 60% of last_month_pct_transported[j] (j = production_rate 0 or 1) I think is simpler to implement even, if of course the last_month_pct_transported is exposed already in this new-fangled NoAI.

Yes, it would be easy to implement. But like belugas said, hard coded values are bad and I see no particular reason for imposing such a hard value. What I do now is divide the total production of a facility with the number of stations around it (+1) and consider this value its 'slice of the pie'. So the more stations the less likely it will consider it as a possibility. But this isn't final yet, still need to tweak this values and it could very well be that I end up with a hard value, although it seems unlikely.

But if you want to have a hardcoded version: fork NoCAB and create your own version . The file you're looking for is 'management/connections/IndustryConnectionNode.nut'.

Well - the reason for those 60% is that original AI had this and it was known to compete also with itself.That way it only competed when its previous service was bad (productions increased and the service couldn't handle it). Of course the good part was that it only prevented it to compete with itself.

PERCENT_TRANSPORTED_60 and PERCENT_TRANSPORTED_80 are used in standard and smooth economy as threshold to check if we increase or decrease production level (or give a bonus, in the 80 case). And the fact that I enumerated them is to make the code more readable.So no, 60% does not have a VERY SPECIAL meaning. It's just a threshold in order to make economy dynamic, a bit.

I guess that is has nothing to do with AI.

Now... of course there are hard coded values in the program. You cannot expect all values to be configurable. It will be a mess for users to find their way in all that maze.

_________________If you are not ready to work a bit for your ideas, it means they don't count much for you.OpenTTD and Realism? Well... Here are a few thoughs on the matter.He he he he------------------------------------------------------------Music from the Bloody Time Zones

My point was - that 60% not only makes the AI stay away of your services, but also from needless competition (% > 60 where noone gets real benefits).

With resumed competition if % falls under 60% not only does competition show real benefits for the new-comer (AI or player), but also industry really likes that and keeps increasing. I'm just talking about the behaviour that I observed with either economy and (although) the old AI, but works really well (should also with new AI's nicely).

That's the only reason I'm so hanging to those 60%. Because of the industry.

Just found out nocab will crash a competitor if it goes bankrupt.There will be a popup and just after reloading the AI player which has crashed there will be a message about the competitor going bankrupt.The popup mentions a non-existent index '219'

Just found out nocab will crash a competitor if it goes bankrupt.There will be a popup and just after reloading the AI player which has crashed there will be a message about the competitor going bankrupt.The popup mentions a non-existent index '219'

...

Besides this minor issue the AI works great so far

Thanks for your feedback! This problem is now solved in the latest version ^^.

*Looks*, yes this is standard output, nothing unusual. The "problem" is that NoCAB plans connections up ahead and there could be a serious delay in planning a connection (e.g. an air connection) and actually building it, sometimes even years / decades apart. So when it comes to constructing such a connection it might very well be that a town cannot accept another airport or that it's impossible to place one.

There are some errors while building connections as well and the current fallback policy when something goes wrong is to simply report an error and move on, whilst you might want to do some repairing instead of abandoning constructing a connection. This will we one of the bigger features coming up any time after next month (very busy at the moment ).

Thanks for your feedback, hope I made it clear why it's not an error .Bram

Probably the last update before OpenTTD 0.7.1 hits the shelf, it's basically a small bugfix release, mainly concerning ships.

The change log is as follows:- Make sure ships are guided by building a buoy every 25 tiles (pathfinding truelly is idiotic )- Make ships build connections from oil rigs and other water based industries.- Update the road list of ships once the connection is build. We only want to include the buoys and end / start points. The rest of the data is irrelevant.- Make sure that ships are nicely handled when sold so they don't get lost!- Fixed the orders given to ships.- Fixed a bug where ship depots were both build at the same site in case of a bidirectional connection.

This should fix all remaining issues with lost ships and what not. Please make sure you have at least version r16529, because otherwise the AI will keep on building ships for oil rigs as previous versions didn't return a valid station ID for those industries.

New bleeding edge version! This time around I'm getting ready for the release of version 2.0 of NoCAB. The biggest change will be the inclusion of Train support (yes! It's finally here ).

The current implementation is far from stable, but it is a working test version which is able to cope with trains. At the moment no rails is being reused, only single tracks are being laid and fancy things like "signals" are not being build at the moment. As time passes I'll update this version every now and then, so those who want to track the process of the 2.0 release, this is your thread .

All comments are welcome, because I hardly ever play OpenTTD myself I can get all the input of what good strategies are for building train networks. At the moment there is not layout scheme, but I'm looking for a model which allows me to evolve my rail roads over time (i.e. start with a single platform and gradually expand).

Who is online

Users browsing this forum: No registered users and 6 guests

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