Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Nov 18, 2017 9:25 pm

All times are UTC




Post new topic  Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Aircraft AIs vs WAS
PostPosted: Sat Mar 25, 2017 9:41 am 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jul 29, 2014 6:08 pm
Posts: 85
Location: Czech Republic
Have you EVUR been wondering "What AI should I use if I use World Airliners Set NewGRF"?
Propably not, and you never will, but anyways, here goes another of my extremely annoying topics called

Aircaft AIs vs World Airliners Set

In this topic, I will describe you my process of testing aircraft-capable AIs with World Airliner Set, which adds many airplanes and liveries. Of course I am not expecting any AI to actualy change a livery, no one has ever made that (*wink wink*), but at least if anyone is interested in making it (*winking intensifies*) they can see which AI would be the best base. Basicaly only thing you would have to do would be making the AI randomly refit the aircraft, but hey...

Okay, let's start with
AI selection

[+] Spoiler
On the wiki I found a nice spreadsheet of AIs describing what transport types they can handle. Long story short; the list is outdated so here are my picks!

Image



Setting up AIs

[+] Spoiler
I basicaly tried to use the most difficult setting available, as well disabling trains and boats, basicaly the AIs can only use planes and busses (for feeder services? can anyone actualy do that?). Also, all AIs SHOULD start at the same time after the game is launched.

Aaaaand I just found out that you can "only" have 14 AIs present, so I will have to choose 3 that have to go out :C

I chose WrightAI, because Rythorn Airline AI is it's fork (and it promises to keep it's mechanics), and NoCAB and it's Bleeding Edge version, because we have it's fork (NoNoCAB) present. I hope I did not trigger anyone.

Fun fact: at this point instead of "Preview" I cliked "Submit", but that has nothing to do with this topic at all

Sidenotes: I had some problems with Rythorn Airline AI's settings, because it is so customizable it hurts my kidneys, so I just left it at it's default setting, I think they are fair enough, also, SynTrans's only setting was not working for me, I could not change it, so I will proceed and tell it's author after posting this topic, aaand Terron limits it's airline length to 450 tiles


Game settings

[+] Spoiler
Cargodist
• Passangers: Symetric
• Mail: Symetric
• ARMORED vehicle class: Asymetric
• Other: Manual

Plane speed factor: 1/1
Max planes: 1000 (nothing for mah mighty AMD Athlon X4 880K muheheheh)
Plane crashes: Reduced
Vehicles/Airports never expire
AI construction speed: Very fast
And Disable trains and ships for AIs


NewGRF settings

[+] Spoiler
The one and only NewGRF present is WAS, specificaly WAS 2017-03-22 because bananas version is very outdated and I have never experienced any bug other that purely graphical, so it should work out just fine

Now parameters:
Image

Now let's explain those parameters:
• Enable standard planes: of course I will leave this disabled c:
• Base cost factor: I usualy ramp it up to 8x, but the when it's renewing time, it completely ruins my economy
• Base running cost factor: I set it so high because I want to compensate the 1/1 speed factor (and I want to keep that factor there)
• Ranges: I'm planning a very big map, so infinite ranges would be too much OP



World settings

[+] Spoiler
Image

As you can see the map will be very airline-firendly. Also the city generation settings are there to make cities more spread out over towns so some kind of Hub-to-hub airport lines will make more sense (if any AI can make them of course)

So, let's do a quick check of all settings so I don't have to restart the game, and let's

Image


The first try (UNSUCCESFUL)

[+] Spoiler
Of course most AIs are beginning with slamming hub airport next to a large city, but none of them seems to be purchasing actual airplanes... Let's quickly jump through some AI's console logs! AdmiralAI failed horribly after it built it's airports and found out it does not have enough money to buy an airplane. However, I call BS on that because it has enough money to buy a smaller one, I guess it simply focuses on the largest one (Airbus A380) and refuses to do anything else... Hopefuly it will recover. AIAI also refuses to build airplanes, however it actualy has a reason; it says that if infrastructure mainteance is enabled, then airplanes are not profiable. Well, I could argue on that. Clueless ran into the same problem as Admiral, but it realized that it's better to give up airplanes and go full busses. Exactly what I did not want it to do. And of course DictatorAI has it's own variant of the problem. It is trying to figure out oil airline. And even though it has a nice selection of oil-compatible airplanes, it does not want to buy one... geez. After multiple minutes of analyzing the overall situation, EpicTrans decides to completely ignore the possibility of endless profitability with airplanes, and it just builds busses. NoNoCAB seems to be very surprised about how many towns there are, and judging from it's console log, it will stay surprised and idle for quite a time. PAXLink, like EpicTrans, is focusing on busses, but it is scanning cities for potential intercity lines. Oh, and remember what I was saying about my Athlon? Well, now that multiple AIs are starting up, I regret that I invested so much in my monitor instead of better CPU, my FPS is down to 0.5. I hope it's just because there are many AIs that are getting familiar with the map.
Oh Jesus Christ FINALY! The first airplane enters the scene! God bless you Rythorn Airlines! It actualy managed to make a succesful link between two airports, and it did the most logical thing and bought small cheap turboprop ATR42-300. Wait a minute... did I say SUCCESFUL? Of course it did NOT. The airports are too far away from each other and the small ATR can not fly there. I will just accept the situation instead of being sad and disappointed. And it keeps building more and more, now we are at 4 airplanes, all of them standing saying that they can not reach their destination :c
I'm afraid that all remaining AIs will follow the same pattern and this test will be over faster than I expected... Ohh, NoCAB just bought an airplane, it will propably be the same failure as Rythorn, let's take a look; of course. Well, to be fair, some of it's new livestock-carrying Boeing 737-300F's destinations are in it's range, but there are two that will make the line fail. But at least it gave me some hope, I can not lie. And we have SynTrans entering the battle with it's fleet of five Bombardier Dash 8-300s, and some of them can actualy reach their destination! Wow. Hopefuly SynTrans is programmed to sell it's airplanes that are not making money, then it could POTENTIONALY become a succesful airline. We still have 3 chances in form of non-present AIs waiting to be dragged in-game; TeshiNet, Trans, and WormAI. Let's see. Oh, and couple seconds after that SimpleAI decided it wants to enter the mighty airline world! And it is not cheap, it bought a single Boeing 757-200 and PLACED IT ON A WORKING LINE! Seems like SimpleAI is not so simple after all ( ͡° ͜ʖ ͡°)
Meanwhile, the rest of AIs joined the game, none of them buying any planes as their first mean of transport. I'm seriously thinking about restarting with 2Kx2K map with unlimited ranges of aircrafts.
After many months of me staring at all companies' aircraft windows open, suddenly, two Douglas DC-8-50 pop into existence uder Transe's window. And yes, ladies and gentleman, their destinations are in their range. Looks like Trans is actualy thinking about it's airport placement, even though it outputs nothing into it's console log. It is like a stealth nija airline (if that makes sense).
It has been October for about 20 minutes IRL, and I am afraid that my 500$ PC can not handle the AI overload, so we would not see any reasonable results without letting the game run over multiple IRL days. And even though I would love to do that, in Czech Republic we have very expensive electricity, so I will do this instead; I will save and end the current game, and I will place the save file here, if anyone is interested. After that, I am going to test idividual AIs on 2048x2048 map, and considering that no AI is capable of setting up airport feeder services, I will completely disable road vehicles.


The second try

[+] Spoiler
Mmmmmkayyy, after the big failure I've completely reset my mood, let's just start all over again, with new, smaller map, and without RVs.

AdmiralAI: Admiral went with the simple strategy of placing a hub airport next to the largest city possible. However, it is not purchasing airplanes. It ran into the same problem as in the first test, it is focusing on one, expensive plane that it can not afford. Well, so much for AdmiralAI.
AIAI: Just like AdmiralAI, it ran into the "no plane cycle" problem, where instead of looking for a cheaper plane, it just keeps trying to buy an unsuitable one. Well, actualy it knows that it can not buy it, so it just says "no suitable planes found". Goodbye, AIAI.
CluelessPlus: Welp, we have the same problem, "Can't afford air connections". Let's just move on, whadda u say huh?
DictatorAI: Same. It can not find suitable airplane for it's desired oil connection.
EpicTrans: This guy just completely ignored airplanes, even though other transport types are disabled, it is building bus stations. Also, I noticed that it actualy built one airport, but destroyed it afterwards. Let's wait if it will notice it's mistake...... Yup, it did, it tried to build an airplane, but judging from it's console saying Couldn't build the aircraft, it will propably not do anything else.
NoNoCAB: Hold on, NoNoCAB seems to be onto something, after long map analysis, it built 2 airports and 1 airplane (Douglas DC-9-50), it even tried to make a timetable for it, but just like the last time, the plane can not reach it's destination. Let's see if it will do something. Nope, it can't even do something, because it spent all of it's money and loan at the one unsuccesful airplane. Rest in peas sweet prinse
PAXLink: I see signs of inteligence there! Even though it built bus stops, it realized that it can not buy RVs so it moved on to airports. Now, I feel a little bit bad for it, because it is trying to build actual feeder lines to it's airports. It's sad seeing it trying, but too bad, rules are rules. But hey, even though it can not build busses, it bought it's own Boeing 737-300 and placed it onto a working line. Yay, this is the first AI in the second test that can make profit! Oh, and another 737-300! This is looking good. And suddenly it bought Fokker 70, indicating that it does not suffer from the "focusing on a single plane" disease. And another one!!! Hmm, now it seemingly randomly sold two Fokker 70s, strange. Oh no, one of it's new planes can not reach it's destination. What a deja-vu. Too bad, PAXLink, your "clever" behaviour was just a product of plain randomness.
Rythorn Airline AI: Too far to next destination
SimpleAI: All my hope is concentrated here. It jumped straight into the game and created a working airline with two Boeing 707-420s. And while it is buying more of them it kinda seems like it is flight range compatible. Noice. With every aircraft, it is receiving more money, and with more money, it is buying more aircraft. This is what I wanted to see. Oh, and it even bought a single Douglas DC-8-50, so it seems like it also does not focus on a single type. And it just bought Boeing 737-300. It has 10 airplanes operating now, and all of them can reach their destination. This is very good. Damn, the 737-300 just crashed and burned and died, let's see if it will replace it or if it's just going to forget about the route, but it did say "One of my vehicles just crashed" in the console. But it seems the crash did not do anything to it's already solid economy, because it quickly bought more 707s, now it has 15 ariplanes, all of them making money! The only thing that scares me is that every time it can buy a 707, it does so, without considering the possibility to save money for larger airplanes. And it is buying more and more, 17, 20, 26, 32, and it again went for 737, but also with a Fokker 70. I will just leave this AI alone, and will report you back when it buys some large airplane, if ever. Well, it just bought three Boeing 757-200s, which can hold 11 more passenegers than it's second larges Boeing 707-420. So, now I was away for like 2 minutes, and it managed to buy 150 AIRPLANES! And it is aiming for high capacity with it's largest member of fleet being McDonnel Douglas MD-11 with 293 passanger capacity. Okay, before it reaches 200, I've decided to set the aircraft limit to 200. Just temporarily, to see if it will go idle or if it will replace smaller planes with larger ones. And it bought 313 seated Airbus A340-500. And there goes the limit. Let's see how simple this AI realy is; nope. Sadly it is just stuck. I think only chance it has is if some of it's planes crashed, then it would get replaced with larger one. Let's move on from this AI for now, maybe I will revisit it later.
SynTrans: SynTrans started very modestly with a little fleet of Bombardier Dash 8-300s, and all of them can reach their destination. Let's see how it is going to continue. It seems to be a slower and calmer version of SimpleAI, it is buying more Dash 8-300s, but not as quickly as SimpleAI did with it's 707s. And it seems to be bulding a "single hub" network, where all of it's airplanes share the same hub airport, but have different secondary destination. Come on SynTrans, there are five thousand people waiting on your hub, y don't you buy a nice widebody jet to transport them all, you have enough money. Oh, what is that I see in your console? "Waiting for 669921"? It seems to set it's target aircraft, but at this speed it will take it a realy long time to afford it. The AI seems to be frozen, just waiting for it's money. Can't blame it though, at least it managed to make 6 working airlines. Now it has around 300,000 pounds, which is halfway to it's goal. I am realy excited to see what airplane does it want to buy! It has 520 thousand pounds now, but it seems that it does not want to pay off it's loan. Come on, I am super hyped for it's desired airliner! Oh no, I just noticed that one of it's 8-300s can not reach it's destination ._. You know what, I will forgive it, because remaining 5 airplanes are making a lot of money. And it has enough money now, aaaaaand HOLY BALLS it bought a frikin' Concorde! This guy seems to know what is he doing! Or not? Did he just ignore the low reliability of Concorde? We will see. It seems like it has chosen Concorde to be it's point of interest, because it is again waiting for enough money to buy a second one. But hey, with a single 2,342 km/h flight it made more money than the Bombardier fleet combined. I just want to see if it will go for widebody airliner such as Boeing 747 or Airbus A380. So let's wait... And it just doubled it's money goal, perhaps to buy 2 Concordes at once, or.... maybe something bigger? Heh.
Okay, at this point, I've decided to cheat it some money. Because, unlike SimpleAI, SynTrans realy seems to be going for it's goals instead of quick expansion. This would take A LOT of time, so here you go SynTrans, here you have 10 milion pounds, not that much with WAS, it can buy around 6 A380s, but it bought 6 Concordes, 9 now, and it sold the 8-300 that could not reach it's destination. Good. But yea, it spent all of it's money on Concordes, and is now waiting for more money so it can buy a Concorde. Nothing more to see here.
TerronAI: "Not enough funds to start action..."
TeshiNet: It seems that it is not compatible with airplane-only gameplay, because it has built it's truck stations anyways. Nope, it has built around 1000 road pieces, every time it finds out it can not buy a road vehicle, it removes it's stations and tries again, slowly draining it's budget to zero.
Trans: Trans went with the same strategy as SimpleAI, it placed two airports, but instead of 707s, it used two Douglas DC-8-50s. And it's long haul route is making hella lot of money. I predict very fast expansion! Exactly, it bought 2 Fokker 70s nad placed them on a shorter route with smaller airports. And two more. I have a feeling that this AI is just beginning to heat up. Aaaand NOPE. It just bought 2 Bombardier Dash 8-200Qs that can not reach their destination... And it keeps buing more of them. This AI does not know what "range" means... so sad.
WormAI: We built airports but don't have enough money yet to buy airplanes.


Conclusion

[+] Spoiler
If you want to compete againist an AI player with WAS NewGRF RIGHT NOW, I would suggest SimpleAI, but if you like slower, smoother game and you do not care about aesthetics and diversity, you should go for SynTrans.
But, if you are interested in developing a fork AI that would be fully compatible with WAS, then SimpleAI is your 100% choice. I did not see a single plane out of it's 200 that would not be able to reach it's destination, which seems to be a very big and fatal problem of all other AIs.
Talking about problems, overall there were only 2 of them; either the AI just focused on a single plane without considering buying a cheaper one, or it just did not care about the plane's range. That's what should be improved. Also, even though SimpleAI completely ruled this test, it had a very major problem. After it reached it's aircraft limit, it just stopped, even though it has more than enough money to upgrade it's fleet.


Thank you for your time and I hope to get a response :D


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sat Mar 25, 2017 10:21 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5188
Location: The Moon
My CivilAI is also an aircraft AI, fwiw. :)

_________________
Pikkarail.com blog Image
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API
32bpp NewGRFs: Pineapple Trains (10cc) - Graphics Development


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sat Mar 25, 2017 11:38 am 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jul 29, 2014 6:08 pm
Posts: 85
Location: Czech Republic
PikkaBird wrote:
My CivilAI is also an aircraft AI, fwiw. :)


damn.... completely missed it :oops:

anyways, tested it and it also gets stuck on trying to build road connections, however I like how it builds them and this is my main RV AI from now on :D

post #50


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Thu Mar 30, 2017 8:10 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Oh man, it really makes me happy that SimpleAI did well on this test :)

I did implement the handling of range-limited aircraft at some time :) Without looking at the code, I have no idea why the choice of planes turned out to be varied, but after all, it's not a bad thing at all...

EDIT: Do you happen to have some savegames from this test?


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Fri Mar 31, 2017 9:05 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
SPolygon wrote:
busses (for feeder services? can anyone actualy do that?)


PAXLink runs on the somewhat complex strategy of transporting people using feeder systems. It can sometimes out of luck work with only buses or airplanes, but it is intended to be used with both enabled. Also, it is not very robust as it does not completly handle the two stage dependency between unprofitable feeder service and money making airport service. I's further more no longer developend since many years and that includes lack of support for airport range.

If you like to make a follow up focused on aircraft only, you might leave PAXLink out as it is too specialist on bus+aircraft and not really maintained anymore as I decided to focus my efforts on my CluelessPlus AI instead of split it on two AIs.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sat Apr 01, 2017 7:39 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 76
Location: Netherlands
Both WormAI and NoNoCab as far as I remember check the distances but maybe there's a bug in that code. I will have a look at it sometime.

WormAI can in certain situations be a little too conservative starting up when planes and airports have high costs because it thinks there's hardly any profit to be made.

NoNoCab can be slow too decide on a course of action when there are a lot of options (cities) on the map. Although compared to the original I set a maximum, for large maps it can still be a lot of things to check before deciding on the most profitable routes.

Thanks for the test. It shows me some areas to look at for improvements.


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sat Apr 01, 2017 8:40 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
I downloaded the new version of WAS that was used in the test, and started a game in 2051. It has a huge set of aircraft available including some very expansive ones. So to get started, you need a way to pick a cheap one so that you can afford two airports and it and limit connections to that range.

In stock OpenTTD starting at 1950 you don't have any options that need to be discarded for being too expansive in the same way.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Mon Apr 03, 2017 5:36 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 76
Location: Netherlands
WormAI does have some strategies to pick cheaper planes but probably this situation doesn't fit in with that.
From what I remember it tries to compute an expected profitability per airplane. In this case the most profitable is too expensive to buy when starting. I thought there was some code to pick other cheaper airplanes in that case but will have to see why that doesn't happen here.


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sun Apr 16, 2017 2:54 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 76
Location: Netherlands
I uploaded a new version of WormAI to bananas that should now handle WAS aircraft better.
In the tests I did it is doing pretty nice. I haven't seen any aircraft out of range problems and the profits are continually increasing.

Note that in one test I did against SimpleAI that was reportedly doing well with WAS I saw that SimpleAI didn't start buying any aircraft at all. I had turned off all other vehicle types for AI and the only way I could get SimpleAI to start was to allow a few roadvehicles to be built. Once it had rvs it also started buying aircraft.


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Fri Apr 21, 2017 9:30 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Wormnest wrote:
Note that in one test I did against SimpleAI that was reportedly doing well with WAS I saw that SimpleAI didn't start buying any aircraft at all. I had turned off all other vehicle types for AI and the only way I could get SimpleAI to start was to allow a few roadvehicles to be built. Once it had rvs it also started buying aircraft.


That may be because SimpleAI generally has a lower probability for building aircraft. So it's not 1/3 trains, 1/3 road vehicles and 1/3 aircraft, the probabilites are different. Also were your settings any different from DerekCZ's game? Those planes are quite expensive, so I think the AI will need the 500k maximum loan for them...


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sat Apr 22, 2017 1:05 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 76
Location: Netherlands
Brumi wrote:
That may be because SimpleAI generally has a lower probability for building aircraft. So it's not 1/3 trains, 1/3 road vehicles and 1/3 aircraft, the probabilites are different. Also were your settings any different from DerekCZ's game? Those planes are quite expensive, so I think the AI will need the 500k maximum loan for them...


I used the same settings as far as I'm aware although I'm not sure the size he used for the second test. I used 2048x2048. If you are interested I can post a savegame of the start conditions. If you don't assign all money to aircraft then starting up is indeed going to be difficult. Might it not make sense to use all money for aircraft if that is the only allowed vehicle type?


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Mon Apr 24, 2017 9:21 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Well, I don't quite remember the exact decisions the AI makes when using aircraft. And yes, a savegame would be interesting to see in this case :)


Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Sun Apr 30, 2017 10:22 am 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 76
Location: Netherlands
I did a longer test an in the end around 2091 it finally built the first airports (starting in 2051). Anyway here is the savegame that I start with, saved with a fairly recent trunk version.


Attachments:
WAS airline AI test.sav [1.21 MiB]
Downloaded 22 times
Top
   
 Post subject: Re: Aircraft AIs vs WAS
PostPosted: Mon May 01, 2017 6:43 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Thanks! This is indeed a bug in SimpleAI, the calculations were wrong when calculating the minimum amount of money needed to invest in the aircraft business. I've already fixed it locally, I will make a proper release when I have a little more spare time.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

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

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