I you are looking for the place where you can find information about NoCAB, you have come to the right place!

History:NoCAB was originally released to compete in the Tjip competition in 2008. Then it was not finished yet and performed quite bad as some of you may recall. At that point NoCAB could only use trucks to move cargo around. Ever since that period NoCAB has continued to evolve, the release of NoCAB 1.0 saw the usage of Aeroplanes, Trucks and Busses. Version 1.18 introduced Ships to NoCAB's portfolio and finally version 2.0.0 added train support.

Specifics:NoCAB is and has always has been designed to be a competitive AI. Although I doubt it is competitive against experienced human players it can hold itself against all current released AIs (as of July 2010). Initially little to no consideration was given to the various NewGRFs designed for OpenTTD, but ever since version 2.0.0 was released more attention was paid to make NoCAB work with these. The latest version (2.1.0) should work with most NewGRFs if it does not please file a bug report in this thread and I will look at it.

The features of NoCAB are as follows, please note that this is not an exhaustive list:* All vehicle types are represented and can be used by NoCAB, with the exception of: helicopters and trams.* Custom A* implementation designed for speed - using an altered Fibonacci queue which is quicker than the library's Binary queue.* During play, rails and airfields can be updated to accommodate faster trains and bigger aeroplanes respectively.* During play NoCAB plans out different routes and uses subsum algorithms to decide which ones to build / upgrade depending on the amount of money available and the costs / benefits of building / upgrading the said routes.* While NoCAB has no money to build new connections it uses this time to plan ahead, when money becomes available again.* Compatible with NewGRFs.

With the release of NoCAB 2.1.3 I have decided to go on a hiatus for an undetermined period of time to work on other AI projects. While I will check the forum every now and than do not expect any new features any time soon. For the post with latest changelog: click here.

Those looking for a more up-to-date version check out NoNoCAB that is a fork and continuation of this AI created by Wormnest. Thanks for all the support and feedback over the years .

Just as a quick test I played this AI on a flat 256x256 map with a normal amount of towns and high nr. of industries. I talked to TrueBrain and I believe this is roughly what a map in the tournament would look like. The reason is that I'd like to substantiate my claims in the title of this thread which - apart being an attractive head line - aren't completely unfounded. Truebrain had seized to hold any more tournaments until Squirrel is replaced, so the next best thing is to conduct my own tests.

The results shown in the previous picture are quite promising. The only bad part about the graph is that the income is decreasing after 1958, this is due to large congestions on the road network. Virtually every industry is at this point being served and 2500+ vehicles on such a small map lead to problems . I'm not sure if this is something I want to address. Eventually I want my AI to support trains and aircrafts and my plan now is to use vehicles in the initial part of the game to gain momentum and later switch to trains / aircraft which will replace existing connections so these congestions can be avoided.

Now that most issues with road networks are solved I'm slightly moving towards implementing aircrafts for this AI, trains will come after that!

Thanks for trying out my AI and I'll keep you posted!

- Bram

P.S. For the record, I don't use any end game strategies / mechanics like building a lot of road stations or anything like that

Last edited by Morloth on Sat Nov 08, 2008 6:53 am, edited 1 time in total.

There wasn't a point in the game where convoy produced more income than NoCAB. The way convoy utilizes buses is quite inefficient because the busses won't wait at a station to get a full load so many a time buses will commune between cities with a very low cargo yield. I really had trouble in the past with Convoy until I decided to let the buses wait like trucks at industries after which the rating skyrocketed and I had no more trouble with Convoy. It's not surprising that NoCAB wins because it has way more connections to build than Convoy can.

I'm really impressed by the latest version of AdmiralAI, especially with the introduction of trains (good job Yexo! ). Unfortunately it has a slow startup and takes a long time to construct those train rails, but once they get going it's hard to stop them . I don't know why but after ~7-8 years AdmiralAI stalls and doesn't do to much anymore. It's a shame because if it was tweaked a little bit to utilize its resources better it could be able to beat NoCAB (that is... until I implement air and trains myself ).

All good things come to an end, in the case of Rondje we get slapped around like a tool. Its strategy hasn't been copied by anyone but it is damn good. Almost all connections are being leeched the moment NoCAB put them up for the advantage of Rondje. There are some little flaws in Rondje's strategy, when it decides to let vehicles run normally without the micromanagement tactic I saw some big congestions, especially with buses since it builds stations on existing routes in the middle of the town... But it isn't nearly enough to get anywhere close to it. Well done!

The drop of income at the end is due to Rondje's end strategy where it will sell all vehicles and buy as many road stations as possible (sorry the timing is all wrong, but the moment Rondje build the whole map full with road stations my computer had a hard time to peddle the game forward so I forgot to check in time ).

Conclusions

From the former data we can conclude that its a 2/3 win for NoCAB, although I must say that I expect AdmiralAI to beat NoCAB in the near future if Yexo is able to refine its resource management. As for Rondje, it would be unfair to discredit it as a 'lame', 'leeching', or 'cheating' AI, it's just damn good and the authors did a fantastic job to squeeze every possibility out of the game; Loads of respect from my side! If one wants to blame anyone, blame the damn designers for making this possible . Unless someone wants to inherit their strategy or the game designers change the game mechanics, I think Rondje will go down in history as the best AI every written for OpenTTD and I think they deserve it . Perhaps that last statement is a little pretentious, as advancements in the utilization of trains / aircrafts / ships might disprove it, but time will tell.

In the mean time I'll focus on incorporating airplanes in NoCAB before running another bunch of benchmarks. If you would like to match your AI to NoCAB please send my a message with your AI (or run the tests yourself and post them on the forum ).

Let me start with this Very nice job you did with NoCAB, and impressive results! I haven't tested it very well myself, but in the little testing I did it was fast to build some initial truck lines and managed everything very well. Nice to see you also posted income graphs, as those will be used by the new tournament (along with some other variables, like amount of transported cargo) instead of company value.

Morloth wrote:

Some more benchmarks with the following AIs:* Convoy* AdmiralAI* Rondje

The maps were flat 256x256 maps with a maximal loan of 300.000 pound.

Can you post the config file you used? That can make quite a difference. Settings that can have a huge impact:- Map settings (smooth/rough, sea level)- Vehicle running cost (low/high)- Building cost (low/high)- Town permissiveness ]- Airport noise level enabled?Probably more, but I think these are the most important.

Quote:

AdmiralAII'm really impressed by the latest version of AdmiralAI, especially with the introduction of trains (good job Yexo! ).

Thanks

Quote:

Unfortunately it has a slow startup and takes a long time to construct those train rails, but once they get going it's hard to stop them .

The startup is a known problem, but I'm unsure of how to solve that. I could hardcode to build some air routes as moneymaker, and then truck routes, and then some rail routes (as they take longer to pathfind). Main problem with this approach is that newgrf can change what the best strategy is. Air routes may not be as profitable when starting in 1900 with some aircraft grf, or train routes may be extremely hard to make a profit with (try the 2ccset).

Quote:

I don't know why but after ~7-8 years AdmiralAI stalls and doesn't do to much anymore.

I hope it didn't crash?

Quote:

It's a shame because if it was tweaked a little bit to utilize its resources better it could be able to beat NoCAB (that is... until I implement air and trains myself ).

I doubt that AdmiralAI will beat NoCAB anywhere in the near future because recently I'm focussing more on gameplay then on performance. In the next version for example the AI is able to build train stations and airports even on very rough mountainous maps.

Quote:

Conclusions

...As for Rondje, it would be unfair to discredit it as a 'lame', 'leeching', or 'cheating' AI, it's just damn good and the authors did a fantastic job to squeeze every possibility out of the game; Loads of respect from my side!

I can only agree that Ronje is an extermely impressive AI.

Quote:

I think Rondje will go down in history as the best AI every written for OpenTTD and I think they deserve it .

I do disagree with you here. Rondje is the best AI in competitive play. My definition of best AI however is different: an AI that can pose a challenge to human players and is fun to play against, ie it plays a bit human-like.

Ps. Can you try to run NoCAB against AdmiralAI with only trains (use start_ai admiralai use_trucks=0,use_busses=0,use_planes=0) and/or with only road vehicles (use start_ai admiralai use_planes=0,use_trains=0)?

I think Rondje will go down in history as the best AI every written for OpenTTD and I think they deserve it .

I do disagree with you here. Rondje is the best AI in competitive play. My definition of best AI however is different: an AI that can pose a challenge to human players and is fun to play against, ie it plays a bit human-like.

I must say I fully agree with Yexo on this. It was built for one specific challenge (it won't scale well to games that last 20 or 50 years), it'll only work with road vehicles and it's no fun at all to play against as a human, which was kind of the reason the NoAI framework was created, after all.

Let me start with this Very nice job you did with NoCAB, and impressive results! I haven't tested it very well myself, but in the little testing I did it was fast to build some initial truck lines and managed everything very well. Nice to see you also posted income graphs, as those will be used by the new tournament (along with some other variables, like amount of transported cargo) instead of company value.

Thanks . Good to know the new tournament will be run different, can't wait for the tournaments to start again!

Yexo wrote:

Can you post the config file you used? That can make quite a difference. Settings that can have a huge impact...

I've included the config file as attachment. The map settings were as follows:Terrain type: FlatSea level: Very lowSmoothness: Very smooth

Unfortunately it has a slow startup and takes a long time to construct those train rails, but once they get going it's hard to stop them .

The startup is a known problem, but I'm unsure of how to solve that. I could hardcode to build some air routes as moneymaker, and then truck routes, and then some rail routes (as they take longer to pathfind). Main problem with this approach is that newgrf can change what the best strategy is. Air routes may not be as profitable when starting in 1900 with some aircraft grf, or train routes may be extremely hard to make a profit with (try the 2ccset).

What I do is have several 'advisers' look at the map and propose different connections where the cost of: (i) building that connection, (ii) the netto income per month is calculated (taken into account that the vehicle must be replaced after X months). Then the 'parlement' will make decisions about which connections will be build / upgraded using a subsum algorithm to maximise the income per month given the resources at hand. I'm not sure what AdmiralAI does at the moment, but I think this approach is quite generic and doesn't suffer from the drawbacks you just mentioned. Still need to test this tough, I haven't done any experiments with newgrf. But perhaps it's an idea that can be incorporated in AdmiralAI's framework.

Yexo wrote:

Quote:

I don't know why but after ~7-8 years AdmiralAI stalls and doesn't do to much anymore.

I hope it didn't crash?

Nope, it just spend a lot of time pathfinding and not building stuff. This behaviour is apparent in the test I ran with AdmiralAI using only trains.

Yexo wrote:

Quote:

I think Rondje will go down in history as the best AI every written for OpenTTD and I think they deserve it .

I do disagree with you here. Rondje is the best AI in competitive play. My definition of best AI however is different: an AI that can pose a challenge to human players and is fun to play against, ie it plays a bit human-like.

Good point, I was referring to this type of competition (for a span of 10 year). I'm really interested to see how AdmiralAI will evolve, keep me posted!

Yexo wrote:

Ps. Can you try to run NoCAB against AdmiralAI with only trains (use start_ai admiralai use_trucks=0,use_busses=0,use_planes=0) and/or with only road vehicles (use start_ai admiralai use_planes=0,use_trains=0)?

Tried NoCab but it doesn't do anything on my map (savegame: download/file.php?id=101149). Adding another NoCab gives the same... nothingness . Attached screenshot of the debug info if that's any help.

Hoi Bokkie,

You may want to try NoCAB without the NewGRF settings / patches. I have only tested NoCAB on the original TTD files.

-- Update --Ok, bug is fixed now in the latest version (revision 177). The problem was that I assumed all cargo IDs are consecutive, while this is true for the original game this doesn't hold for the 'Picca's Basic Industries v1.5' NewGRF. Thanks for reporting this bug and hope you'll give it another shot !

Arg . Ok, this new version will work otherwise I'll eat my sock . This NewGRF is quite annoying since some industries like the steel mills require two types of cargo before it starts working. Not sure if there is an easy way to discover this through the NoAI API... But something to look into later.

Arg . Ok, this new version will work otherwise I'll eat my sock . This NewGRF is quite annoying since some industries like the steel mills require two types of cargo before it starts working. Not sure if there is an easy way to discover this through the NoAI API... But something to look into later.

There is no way to detect this because the game itself doesn't 'know' it. The only way to discover it is by trial-and-error (Hey, that industry stopped accepting coal, and it has a huge coal stockpile. What other cargo's does it accept? Can I try to transport one of them to that industry?).

Keep your sock in your shoe, it works now! NoCab seems to be a lot more 'agressive' than AdmiralAI in spending money and building new routes and vehicles. If I've got time to spare I'll test some AI's more in-depth this week.

Keep your sock in your shoe, it works now! NoCab seems to be a lot more 'agressive' than AdmiralAI in spending money and building new routes and vehicles. If I've got time to spare I'll test some AI's more in-depth this week.

Good to hear. Make sure you use the last version if you do the testing, the previous one (184) didn't handle airplanes as well as the new one. Looking forward to the results!

Good to hear. Make sure you use the last version if you do the testing, the previous one (184) didn't handle airplanes as well as the new one. Looking forward to the results!

Airplanes? I totally mist your updates, because if you only edit the first post this thread doesn't show up as modified. I'm going to test this immediately

Edit: I found some bugs.

NoCab build bus and truck stops even if I've sed "Maximum number of road vehicles" to 0.

I started in 1980 with town controlled noise levels on and NoCab failed to build any airport at all.

Hi Yexo,

Thanks for testing, the above bugs are indeed not solved and I haven't considered them yet. Until now I was more focussed on including more features and to test them with 'regular' settings. Now that the base framework for road vehicles / airplanes is finished I will look more into the gritty details like these and NewGRF.

Sorry to hear you missed out on the updates . Until I feel the AI has stabilised enough to switch to a better version numbering system, like you do for AdmirlaIAI, I'll keep posting revisions. So look out for them next time!

- Bram

P.S. Specially for you, the latest test on a 256x256 flat map with 500.000 starting cash

I see - well - I got it working (I just ran it in my checkout/bin directory instead of in the dedicated OTTD_NoAI). Thx for the tip though.

Now for some comments about your otherwise nice AI (r186):-it doesn't use shared orders (why?)-no matter how much money it has, it always borrows whenever buying new vehicles (I 'cheated' and built it some air-lines to bring in some money)-it overexpands the unloading stations (which are almost empty after introduction of faster lorries)

Who is online

Users browsing this forum: No registered users and 5 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