AI vs me: trains and networks
Moderator: OpenTTD Developers
AI vs me: trains and networks
Hi all.
I'm a long time TTD / OpenTTD-player, a fan of trains, coffee, programming and AI. I'm not too good at C or whatever yet, but I enjoy testing the AIs. I'll try making my own train AI some day, but for now, I'll just run comparision games.
I thought it'd be cool to compare their network building skills to mine. I can say, it's much more challanging than playing on your own, as I do most of the time. It makes quick building more important than complex crossings and stuff like that.
Anyway, today I've been playing against ChooChoo, trAIns and Denver & Rio Grande AI. I decided to leave out TransAI and Admiral, to see how these younger guys would do. The game is on a 256x256 desert map, with everything flat (just like Holland. Not the desert, but the flatness.). The game starts in 1960, but the first screens will be from 1964.
Just like with AI Battle Royale, I'll be featuring a Spot On for every AI. The first will be Choochoo, after the initial comparision.
I'm a long time TTD / OpenTTD-player, a fan of trains, coffee, programming and AI. I'm not too good at C or whatever yet, but I enjoy testing the AIs. I'll try making my own train AI some day, but for now, I'll just run comparision games.
I thought it'd be cool to compare their network building skills to mine. I can say, it's much more challanging than playing on your own, as I do most of the time. It makes quick building more important than complex crossings and stuff like that.
Anyway, today I've been playing against ChooChoo, trAIns and Denver & Rio Grande AI. I decided to leave out TransAI and Admiral, to see how these younger guys would do. The game is on a 256x256 desert map, with everything flat (just like Holland. Not the desert, but the flatness.). The game starts in 1960, but the first screens will be from 1964.
Just like with AI Battle Royale, I'll be featuring a Spot On for every AI. The first will be Choochoo, after the initial comparision.
Re: AI vs me: trains and networks
1964
Every company started quickly, connections I'd like to have build were blocked by others quickly. That's a good thing, such speed. AIs and me really had to work around eachother.
What caught my attention was Choochoo deleting one of the crossings in front of one of their "start up"-stations. Two trains wasted.
Also, Denver & Rio Grande could've found a better path there I think. Does it try both of the stations entrances or only the one that's closest to the destination?
Every company started quickly, connections I'd like to have build were blocked by others quickly. That's a good thing, such speed. AIs and me really had to work around eachother.
What caught my attention was Choochoo deleting one of the crossings in front of one of their "start up"-stations. Two trains wasted.
Also, Denver & Rio Grande could've found a better path there I think. Does it try both of the stations entrances or only the one that's closest to the destination?
Re: AI vs me: trains and networks
TrAIns is the biggest competitor. Even though it fails at big lakes (just like Admiral, only that AI gives up after a few years I believe), as you can see in the map, it's profit overtakes mine now and then.
Next: the Spot On for Choochoo.
Next: the Spot On for Choochoo.
Re: AI vs me: trains and networks
Eliandor wrote:1964
Every company started quickly, connections I'd like to have build were blocked by others quickly. That's a good thing, such speed. AIs and me really had to work around eachother.
What caught my attention was Choochoo deleting one of the crossings in front of one of their "start up"-stations. Two trains wasted.
Also, Denver & Rio Grande could've found a better path there I think. Does it try both of the stations entrances or only the one that's closest to the destination?
I don't think this is a problem per se. (For D&RG). It always connects the closest corners. Due to that slope it had a hard time "turning the corner" up the slope. The cost in thinking time to fix situations like that is pretty high. D&RG relies on getting many decent routes up and running rather than optimizing routes. In that picture, clearly, it should have gone for another corner, but it couldn't know that until it was nearly done. And checking for that sort of thing means a really big search space.
Edit: A better questions is "why didn't it put the station in the other orientation and to the left of the refinery?". That's the real problem here. D&RG favors stations down and to the right due to the way the AI station placement routines work. The AI is passing up good places to put stations, or putting them "behind" the acceptor.
Re: AI vs me: trains and networks
Alright, I see. I don't think having a favourite placement for the station should really be a problem, it could've build just a fine route from there (if not blocked by slopes, of course)Dustin wrote:I don't think this is a problem per se. (For D&RG). It always connects the closest corners. Due to that slope it had a hard time "turning the corner" up the slope. The cost in thinking time to fix situations like that is pretty high. D&RG relies on getting many decent routes up and running rather than optimizing routes. In that picture, clearly, it should have gone for another corner, but it couldn't know that until it was nearly done. And checking for that sort of thing means a really big search space.
Edit: A better questions is "why didn't it put the station in the other orientation and to the left of the refinery?". That's the real problem here. D&RG favors stations down and to the right due to the way the AI station placement routines work. The AI is passing up good places to put stations, or putting them "behind" the acceptor.
Anyway, since D&RG isn't aggressive (I read somewhere that it only targets industries where no other companies are building) -- why not do route optimalisation? Especially in small maps it'll only be limited to a few routes. The routes it builds, though, are easily improvable: it's always node - route - node - route, so if you only change the routes between the nodes everything should work just fine.
Re: AI vs me: trains and networks
Spot On: Choochoo
I actually wanted to wait with this for another day or something, but felt bored, so I decided to make a new post right now.
Choochoo has a big disadvantage in the desert. I'm planning on running a normal game soon, where it'll do a lot better I assume.
As all users of this AI are probably aware of, Choochoo builds cute (subjective) networks with cute (again subjective) crossings. It's very efficient in making it's networks, because it can easily attach a new city to the existing rail.
I'm sorry to say that Choochoo could not survive on this map. In 1968, the company was declared bankrupt. Thus, I can only show 2 screenshots, both made in 1964, of Choochoo at it's best. Maybe it should check on Desert, and then check what cities are supplies with water or food or don't need any of that to grow / supply enough passengers.
The straight tracks are really prefered by Choochoo, but a secondary track may get into trouble because of it. I hope to be able to show some more exciting screenshots of Choochoo in Temperate.
I actually wanted to wait with this for another day or something, but felt bored, so I decided to make a new post right now.
Choochoo has a big disadvantage in the desert. I'm planning on running a normal game soon, where it'll do a lot better I assume.
As all users of this AI are probably aware of, Choochoo builds cute (subjective) networks with cute (again subjective) crossings. It's very efficient in making it's networks, because it can easily attach a new city to the existing rail.
I'm sorry to say that Choochoo could not survive on this map. In 1968, the company was declared bankrupt. Thus, I can only show 2 screenshots, both made in 1964, of Choochoo at it's best. Maybe it should check on Desert, and then check what cities are supplies with water or food or don't need any of that to grow / supply enough passengers.
The straight tracks are really prefered by Choochoo, but a secondary track may get into trouble because of it. I hope to be able to show some more exciting screenshots of Choochoo in Temperate.

Re: AI vs me: trains and networks
The reason why ChooChoo and TConvoy will fail on desert/snow terrain is the fact that there are no actual towns that can produce a nice number of people so they can't make enough income. The idea though is good and everyone should admire the work of the developers.
About the AIs - trAIns is very good because the idea pays well. It chooses nice industries ( and as we know cargo pays well ) and the pathfinder is great. DustinAI is pretty good too for the same reasons as trAIns. TransAI is damn good at the start of the game and sucky later because it doesn't compete for the industries. AdmiralAI, which you left out, on the other hand is very competitive - it builds near your stations, builds statues to boost the rating, uses aircrafts for money making - the most successful strategy.
About the AIs - trAIns is very good because the idea pays well. It chooses nice industries ( and as we know cargo pays well ) and the pathfinder is great. DustinAI is pretty good too for the same reasons as trAIns. TransAI is damn good at the start of the game and sucky later because it doesn't compete for the industries. AdmiralAI, which you left out, on the other hand is very competitive - it builds near your stations, builds statues to boost the rating, uses aircrafts for money making - the most successful strategy.
Re: AI vs me: trains and networks
I know that. That's why I was planning on running another AI vs. Me, but then on Temperate. Maybe even with 2CC, just to see how they'd do with that set.Wold wrote:The reason why ChooChoo and TConvoy will fail on desert/snow terrain is the fact that there are no actual towns that can produce a nice number of people so they can't make enough income. The idea though is good and everyone should admire the work of the developers.
Anyway, 1968!
There hasn't been much growth, alas. D&RG hasn't found too many new industries It has connect a new gold mine, but it's been in a loop checking Local Authorities / Good Station Spots for a few years now. TrAIns, which will be the next Spot On, has been busy pathfinding it's way through a lake for the previous five years. That's why my company has overtaken it in company value.
Not too much interesting stuff to display here. I'll include the graphs and the map, then write the two remaining spot ons. I'm curious as to how the AIs will do in Temperate!
Re: AI vs me: trains and networks
Spot On: TrAIns
I think everyone was charmed by the way it builds it's double rails, neat and fast. I've played a few other games with TrAIns, but in all it got stuck in the end. Lakes are always the cause of this.
The pathfinder is a little confused with the spacey double rails I build. Are two bridges build this way cheaper? It won't do any good without Realistic Acceleration, though.
Enough negative stuff. I want to include a screenshots if why I'm really fond of this AI.
Next: some screenshots of D&RG.
I think everyone was charmed by the way it builds it's double rails, neat and fast. I've played a few other games with TrAIns, but in all it got stuck in the end. Lakes are always the cause of this.
The pathfinder is a little confused with the spacey double rails I build. Are two bridges build this way cheaper? It won't do any good without Realistic Acceleration, though.
Enough negative stuff. I want to include a screenshots if why I'm really fond of this AI.
Next: some screenshots of D&RG.
Re: AI vs me: trains and networks
First, that behavior is changed. Now it makes a list of unshipped cargo and tries to ship the most valuable one. So if there is a competitor doing a poor job, or all the other places are taken, it will jump in.Eliandor wrote:Anyway, since D&RG isn't aggressive (I read somewhere that it only targets industries where no other companies are building) -- why not do route optimalisation? Especially in small maps it'll only be limited to a few routes. The routes it builds, though, are easily improvable: it's always node - route - node - route, so if you only change the routes between the nodes everything should work just fine.
I might consider this as something for the future. Taking the kinks out of a line looks nice, but barely contributes to the yearly income if the route was reasonable to start. It's almost always way more profitable to start a new route, or upgrade the engines on an old one. The resource that most constrains an AI is computing ticks. Pathfinding and optimization are very expensive. So DR&G chooses sub-optimal but easier to calculate routes.
It would probably be (way) more profitable to add in Air transport and RVs.
Re: AI vs me: trains and networks
I am actually working on that right problem now. The way it locates stations needs some work. On a nice flat map like that one, it should be able to plop them down like crazy. Like so much of the AI, I focused on getting things working at all so the whole AI could hang together and run. Now I am going back and optimizing things where I "cheated" a lot. Station placement is ripe for improvements.Eliandor wrote:D&RG hasn't found too many new industries It has connect a new gold mine, but it's been in a loop checking Local Authorities / Good Station Spots for a few years now.
I look forward to your screen shots.
Re: AI vs me: trains and networks
Always cool to see AIs go head to head. And glorious failure is always an option
Desert maps are tough for a passenger only AI.
"Cute" is pretty much what I'm aiming for; decent performance in these matchups has actually been an unexpected side effect.
By the way, I really like the RoRo stations trAIns is building! I've been thinking of using a RoRo design for ChooChoo, but I'm tinkering with the rail network first (or will be, when I've got some time to spare).
Anyway, thanks to Eliandor for the nice writeup, and good luck to my fellow AI hackers

"Cute" is pretty much what I'm aiming for; decent performance in these matchups has actually been an unexpected side effect.
By the way, I really like the RoRo stations trAIns is building! I've been thinking of using a RoRo design for ChooChoo, but I'm tinkering with the rail network first (or will be, when I've got some time to spare).
Anyway, thanks to Eliandor for the nice writeup, and good luck to my fellow AI hackers

Who is online
Users browsing this forum: Semrush [Bot] and 1 guest