NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.1.3
Moderator: OpenTTD Developers
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.16
This hasn't been mentioned yet...
dbg: [ai] Registering two AIs with the same name and version
dbg: [ai] 1: /home/petern/.openttd/content_download/ai/NoCAB-2.0.15.tar/nocab-2.0.15/main.nut
dbg: [ai] 2: /home/petern/.openttd/content_download/ai/NoCAB-2.0.16.tar/nocab-2.0.16/main.nut
dbg: [ai] The first is taking precedence.
dbg: [ai] Registering two AIs with the same name and version
dbg: [ai] 1: /home/petern/.openttd/content_download/ai/NoCAB-2.0.15.tar/nocab-2.0.15/main.nut
dbg: [ai] 2: /home/petern/.openttd/content_download/ai/NoCAB-2.0.16.tar/nocab-2.0.16/main.nut
dbg: [ai] The first is taking precedence.
He's like, some kind of OpenTTD developer.
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
New version! 
After seeing AIAI and Trans AI becoming better and better, leaving NoCAB biting the dust in the previous competition I decided something had to be done
.
I looked at the current weak points in the current AI and decided that the subsum algorithm needed some thought. Before it was a greedy algorithm, presented with a list of possible connections to build or upgrade it took the set with the highest utilities by first selecting the one with the highest utility it could still pay for and working down the list. While this did work, it would miss opportunities like the following:
Money available: 10000
Possible connections:
A -> B : cost = 10000 : utility = 100
C -> D : cost = 6000 : utility = 80
E -> F : cost = 4000 : utility = 60
Using a greedy algorithm we end up with the connection A -> B and the utility 10000. However if we took the last two we would end up with a utility of 14000. To make this happen NoCAB now uses the greedy algorithm as the base line and than uses a random algorithm to try different combinations for a set amount of time, continuously trying to improve the utility.
This in addition to a better utility function makes for way better performance than before!
In addition, I also noticed that some NewGRFs are being developed with custom rail types. I've tweaked the code to make sure that NoCAB is now more flexible with the rails types it uses, i.e. not "only the latest added", but rather choose the rail type depending on the engines to be used. While it is not full proof (not yet any way) it at least works in the scenarios I've tested it on.
Lastly the HQ will no longer be build at the beginning of the game but will be build once NoCAB has been making some money. More than once it happened that building an HQ at the start of the game in the hard setting removed 25% of NoCAB's money. So it will now be build when NoCAB has $1.000.000 to waste and also be build at a more suitable location than just the smallest town
.
That's all folks! The complete changelog is below:
-= 2.0.18 (r484) =-
* HQ is now only build once NoCAB has earned enough money.
* Better subsum algorithm, NoCAB makes better (i.e. not only greedy) decisions.
* Added support for NewGRF rails (e.g. NuTracks).
* Better signal placement for less jams.
Enjoy!
Bram

After seeing AIAI and Trans AI becoming better and better, leaving NoCAB biting the dust in the previous competition I decided something had to be done

I looked at the current weak points in the current AI and decided that the subsum algorithm needed some thought. Before it was a greedy algorithm, presented with a list of possible connections to build or upgrade it took the set with the highest utilities by first selecting the one with the highest utility it could still pay for and working down the list. While this did work, it would miss opportunities like the following:
Money available: 10000
Possible connections:
A -> B : cost = 10000 : utility = 100
C -> D : cost = 6000 : utility = 80
E -> F : cost = 4000 : utility = 60
Using a greedy algorithm we end up with the connection A -> B and the utility 10000. However if we took the last two we would end up with a utility of 14000. To make this happen NoCAB now uses the greedy algorithm as the base line and than uses a random algorithm to try different combinations for a set amount of time, continuously trying to improve the utility.
This in addition to a better utility function makes for way better performance than before!

In addition, I also noticed that some NewGRFs are being developed with custom rail types. I've tweaked the code to make sure that NoCAB is now more flexible with the rails types it uses, i.e. not "only the latest added", but rather choose the rail type depending on the engines to be used. While it is not full proof (not yet any way) it at least works in the scenarios I've tested it on.
Lastly the HQ will no longer be build at the beginning of the game but will be build once NoCAB has been making some money. More than once it happened that building an HQ at the start of the game in the hard setting removed 25% of NoCAB's money. So it will now be build when NoCAB has $1.000.000 to waste and also be build at a more suitable location than just the smallest town

That's all folks! The complete changelog is below:
-= 2.0.18 (r484) =-
* HQ is now only build once NoCAB has earned enough money.
* Better subsum algorithm, NoCAB makes better (i.e. not only greedy) decisions.
* Added support for NewGRF rails (e.g. NuTracks).
* Better signal placement for less jams.
Enjoy!

Bram
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
Ekkhhm. How?Morloth wrote:More than once it happened that building an HQ at the start of the game in the hard setting removed 25% of NoCAB's money.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
Hmmz... maybe that's my bad and I wasn't paying attention as NoCAB failed to finish a connection and mistook the money spend as the money spend on the HQKogut wrote:Ekkhhm. How?Morloth wrote:More than once it happened that building an HQ at the start of the game in the hard setting removed 25% of NoCAB's money.


Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
60 base cost, 1500 with clearing 4 field tiles
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.19
A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you survived 
Best areas of improvements now seem to be from this brief test: it seemed to have picked not the most profitable routes for the RV, but it got heavy competition on its routes, too; but there were industries which were not (yet) serviced, maybe it could check for that.
I actually hoped that NoCAB would be one of the AIs which would give me a nice train support - even though I didn't make it easy for AIs as I added the 2cctrainset with default settings where indeed a start with RV or possibly a money maker using a handful of planes might seem like a good choice (albeit even that is difficult in 1945).
Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)
All in all: kudos, even though NoCAB didn't do quite as well as the last time, it's one of my favourite AIs. And it's probably one time win, other time loose
Keep up your good work!

Best areas of improvements now seem to be from this brief test: it seemed to have picked not the most profitable routes for the RV, but it got heavy competition on its routes, too; but there were industries which were not (yet) serviced, maybe it could check for that.
I actually hoped that NoCAB would be one of the AIs which would give me a nice train support - even though I didn't make it easy for AIs as I added the 2cctrainset with default settings where indeed a start with RV or possibly a money maker using a handful of planes might seem like a good choice (albeit even that is difficult in 1945).
Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)
All in all: kudos, even though NoCAB didn't do quite as well as the last time, it's one of my favourite AIs. And it's probably one time win, other time loose

OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.19
And great thanks for that tournament!
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.19
That's at least somethingplanetmaker wrote:A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you survived

That's true, at the moment I assume my AI can transport everything and simply ignore the competition. Usually I test NoCAB only against a single opponent in which cast it's not a big issue. But when facing 14 opponents this is a different issue. So I'll give it a try, although there is an option for that (NiceCAB).planetmaker wrote:Best areas of improvements now seem to be from this brief test: it seemed to have picked not the most profitable routes for the RV, but it got heavy competition on its routes, too; but there were industries which were not (yet) serviced, maybe it could check for that.
Same hereplanetmaker wrote:I actually hoped that NoCAB would be one of the AIs which would give me a nice train support - even though I didn't make it easy for AIs as I added the 2cctrainset with default settings where indeed a start with RV or possibly a money maker using a handful of planes might seem like a good choice (albeit even that is difficult in 1945).

Thanks, and thanks for running the tournamentplanetmaker wrote:All in all: kudos, even though NoCAB didn't do quite as well as the last time, it's one of my favourite AIs. And it's probably one time win, other time looseKeep up your good work!


I'll have a look at you comments and try to include them in the next version

Bram
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.20
New version! Took some of the previous comments into account and came up with better algorithms and methods to determine when to spend money and - following the method of AIAI - taking into account the optimal distance for vehicles. Resulting in a more competitive NoCAB
.
Also some issues regarding the CC2 train set have been fixed and NoCAB should be able to build these trains (although this is not a work around for the bug mentioned here).
Bram

Also some issues regarding the CC2 train set have been fixed and NoCAB should be able to build these trains (although this is not a work around for the bug mentioned here).
Bram
- RFHolloway
- Engineer
- Posts: 5
- Joined: 11 Jan 2008 10:13
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
Surely you want to rank based on utility divided by cost, and then do fluctuations around that? if your measure of utility is expected profit per year then utility divided by cost is return on capital, which is exactly what you should be maximising.Morloth wrote:New version!
I looked at the current weak points in the current AI and decided that the subsum algorithm needed some thought. Before it was a greedy algorithm, presented with a list of possible connections to build or upgrade it took the set with the highest utilities by first selecting the one with the highest utility it could still pay for and working down the list. While this did work, it would miss opportunities like the following:
Money available: 10000
Possible connections:
A -> B : cost = 10000 : utility = 100
C -> D : cost = 6000 : utility = 80
E -> F : cost = 4000 : utility = 60
Using a greedy algorithm we end up with the connection A -> B and the utility 10000. However if we took the last two we would end up with a utility of 14000. To make this happen NoCAB now uses the greedy algorithm as the base line and than uses a random algorithm to try different combinations for a set amount of time, continuously trying to improve the utility.
This in addition to a better utility function makes for way better performance than before!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.18
That's what I did before, but I found out that maximizing profit per month - regardless of cost - actually works better. The costs for the connections are taken care of by the sub sum algorithms as shown above. But I'm not sure if I tried to use the method you suggest in combination with the new sub sum algorithm. I'll certainly give it a tryRFHolloway wrote:Surely you want to rank based on utility divided by cost, and then do fluctuations around that? if your measure of utility is expected profit per year then utility divided by cost is return on capital, which is exactly what you should be maximising.Morloth wrote:New version!
I looked at the current weak points in the current AI and decided that the subsum algorithm needed some thought. Before it was a greedy algorithm, presented with a list of possible connections to build or upgrade it took the set with the highest utilities by first selecting the one with the highest utility it could still pay for and working down the list. While this did work, it would miss opportunities like the following:
Money available: 10000
Possible connections:
A -> B : cost = 10000 : utility = 100
C -> D : cost = 6000 : utility = 80
E -> F : cost = 4000 : utility = 60
Using a greedy algorithm we end up with the connection A -> B and the utility 10000. However if we took the last two we would end up with a utility of 14000. To make this happen NoCAB now uses the greedy algorithm as the base line and than uses a random algorithm to try different combinations for a set amount of time, continuously trying to improve the utility.
This in addition to a better utility function makes for way better performance than before!

Thanks for your comment!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
Version 2.0.21:
Support for NewGRF stations!
Fixed a bug which calculated that trains can only carry 0 pieces of cargo...
Enjoy!
P.S. This will be the last update for quite a while. I'm going to focus on some other projects at the moment so only if bugs pop up I'll take a look. But for the moment this is the last version of NoCAB for the near future. Thanks for all your feedback!
Support for NewGRF stations!

Enjoy!

P.S. This will be the last update for quite a while. I'm going to focus on some other projects at the moment so only if bugs pop up I'll take a look. But for the moment this is the last version of NoCAB for the near future. Thanks for all your feedback!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
Congrats! I hope it'll stand the test of time. Those stations look really cool! Don't mind if I have a look at how that's done
ChooChoo is supposed to be about making things look good, after all 
Good luck on your new projects!


Good luck on your new projects!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
is it me, or have you got your AI version numbers in a muddle?
shouldn't this be v2.1.0 or something because you've added a minor feature?
i mean it's (mostly) not a bug fix is it?
shouldn't this be v2.1.0 or something because you've added a minor feature?
i mean it's (mostly) not a bug fix is it?
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
Via BuildNewGRFRailStation http://noai.openttd.org/api/trunk/class ... 2262c8b42fMichiel wrote:Congrats! I hope it'll stand the test of time. Those stations look really cool! Don't mind if I have a look at how that's doneChooChoo is supposed to be about making things look good, after all
Good luck on your new projects!
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
NoCAB still crashes in nightlies....


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
So it may be nice to say WHY it crashes.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
If you look at some of my earlier crash posts, its a "HasNext" not foundKogut wrote:So it may be nice to say WHY it crashes.


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
Nasty... I'll have a look at it, followed some of the other threads about this but didn't really pay attention regarding NoCAB. Will make a fix ASAP!NekoMaster wrote:If you look at some of my earlier crash posts, its a "HasNext" not foundKogut wrote:So it may be nice to say WHY it crashes.
Bram
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.21
Thanks for all your frequent updates. I'll find it sad, when this great NoAI should not see the maintenance level it did so far and which can be considered outstandingMorloth wrote: P.S. This will be the last update for quite a while. I'm going to focus on some other projects at the moment so only if bugs pop up I'll take a look. But for the moment this is the last version of NoCAB for the near future. Thanks for all your feedback!



OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Who is online
Users browsing this forum: No registered users and 25 guests