Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Dec 16, 2018 12:17 am

All times are UTC




Post new topic  Reply to topic  [ 130 posts ]  Go to page 1 2 3 4 57 Next
Author Message
PostPosted: Tue Apr 21, 2009 11:47 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
Hi everyone,

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:
  1. Upgrade existing connections using a different connection type (e.g. upgrade a road connection to a train connection).
  2. Better handling of build failures and fail gracefully. NoCAB now stops construction and destroys everything it made (if necessary).
  3. Support trams / helicopters.

Bugs to crush:
* "travelFromNode does not exist" (http://www.tt-forums.net/viewtopic.php?p=947564#p947564).
* Ship docks sometimes build too far away from industry (http://www.tt-forums.net/viewtopic.php?p=948615#p948615).
* Assert failure after completing construction of a connection (http://www.tt-forums.net/viewtopic.php?p=936856#p936856).
* New trains keep getting build even though the line has reached maximum throughput http://www.tt-forums.net/viewtopic.php?p=948918#p948918.

Bux fixed in SVN version:
WIP

Bugs fixed:
* Loading / Saving takes too long (http://www.tt-forums.net/viewtopic.php?p=942632#p942632).
* "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).
* Sometimes bits of existing rail roads are removed when building a connection failed.
* Terraforming creates weird ridges at times which sometimes fails connections.

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 :|.


Attachments:
File comment: NoCAB 2.2.a4 Bleeding Edge Edition
NoCABleedingEdge-2.2a4.tar [440 KiB]
Downloaded 505 times


Last edited by Morloth on Thu Jun 23, 2011 2:36 pm, edited 53 times in total.
Top
   
PostPosted: Tue Apr 21, 2009 5:08 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
Nice to see alpha version released separately, Morloth.

"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.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Tue Apr 21, 2009 5:13 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Tue Apr 05, 2005 1:48 am
Posts: 1507
Location: Deep down the deepest blue
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


Top
   
PostPosted: Wed Apr 22, 2009 4:53 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 313
Location: Indonesia
I would like to say make a branch is a great idea , morloth.
Congratulations ... :D

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
PostPosted: Wed Apr 22, 2009 6:00 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
SirkoZ wrote:
"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'.

Thx fanioz :), I think more will follow over time.


Top
   
PostPosted: Wed Apr 22, 2009 9:05 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
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.

Your implementation doesn't bother me I just wanted to know your stance on this. Thx.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Wed Apr 22, 2009 9:09 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
belugas wrote:
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

Sure, why not, personal intentions, whatever you say.

Now for some facts. 60% is a very specific number in o/TTD, isn't it, belugas?
Remeber that 153 number with which you enumerated PERCENT_TRANSPORTED_60 in industry_cmd.c?

As I explained in the post above...

EDIT: And I agree, hard coding is not particularly preferable. ;-)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Thu Apr 23, 2009 2:17 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Tue Apr 05, 2005 1:48 am
Posts: 1507
Location: Deep down the deepest blue
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


Top
   
PostPosted: Thu Apr 23, 2009 5:35 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
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. ;-)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Mon Apr 27, 2009 6:17 pm 
Offline
Engineer
Engineer

Joined: Mon Feb 02, 2009 7:39 pm
Posts: 5
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'

Image

Besides this minor issue the AI works great so far :)


Top
   
PostPosted: Wed Apr 29, 2009 2:52 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Fri Dec 02, 2005 3:43 pm
Posts: 619
Location: Drancy(93) - France
[off topic]
Why use jpeg when openttd can make easier to read PNG screenshots ?
[/off topic]


Top
   
PostPosted: Wed Apr 29, 2009 3:33 pm 
Offline
Engineer
Engineer

Joined: Mon Feb 02, 2009 7:39 pm
Posts: 5
Lol, because I wasn't even aware OpenTTD could make screenshots :oops:
I changed it back from full screen to windowed, pressed print screen and did the rest in mspaint :D


Top
   
PostPosted: Fri May 01, 2009 1:43 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
Speechless wrote:
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 ^^.


Top
   
PostPosted: Fri May 01, 2009 6:12 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Aug 03, 2006 7:32 pm
Posts: 318
Skype: woldy_bg
Location: Bulgaria
Have a look at this


Attachments:
Duninghall Transport, 20th Nov 1962.png [96.88 KiB]
Downloaded 131 times

_________________
Image
Top
   
PostPosted: Fri May 01, 2009 8:48 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
Wold wrote:
Have a look at this

*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


Top
   
PostPosted: Sun Jun 07, 2009 1:57 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
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.

Build on :).
- Bram


Top
   
PostPosted: Mon Jun 08, 2009 12:18 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
Ai, there was still a little bug with handling industries on water. This is fixed now. NoCAB will now also build larger airports if available.
- Bram


Top
   
PostPosted: Tue Feb 16, 2010 10:44 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 378
Location: Glasgow
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 :D).

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).

Hope you guys enjoy it! :)
Bram


Top
   
PostPosted: Tue Feb 16, 2010 1:55 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Planned stages for my future train section of AIAI


Attachments:
Przechwytywanie.PNG
Przechwytywanie.PNG [ 155.14 KiB | Viewed 11133 times ]

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Top
   
PostPosted: Tue Feb 16, 2010 5:25 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Jan 03, 2009 5:55 pm
Posts: 301
Why don't you open your own Topic?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 130 posts ]  Go to page 1 2 3 4 57 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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-2018 phpBB Limited

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