ChooChoo, a train network AI

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 19 Jan 2014 09:57

idioty wrote:Why build first monorail tracks when rails are available cheaper?
Two different AI is in the screenshot.
Oh, that's because in the normal game with default settings, monorail is not that much more expensive, and the newer trains are usually strictly better than the old ones, so that's the only logic that's built in. Basically, rail is just assumed to be cheap, and only trains/tunnels/bridges are expensive.

User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 199
Joined: 30 Oct 2013 13:57

Re: ChooChoo, a train network AI

Post by skippern » 28 Jan 2014 23:07

Another thing, when using the PIPE NewGRF, ChooChoo tends to try to make pipelines to transport Iron Ore from the mines to a steel mill, and similar. Since PIPE is restricted to liquid cargoes this doesn't go well (even though there are real life examples of pipelines pumping marble (slurry) and iron ore as well)

In other words ChooChoo should probably check to avoid using the pipe railtype (4, I have checked)
Skippern
OpenTTD Mac user

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: ChooChoo, a train network AI

Post by Kogut » 31 Jan 2014 12:58

Hardcoding is evil. It can be done properly (I forgot how but AIAI is handling this kind of thing).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Baldy's Boss
Tycoon
Tycoon
Posts: 1308
Joined: 23 Feb 2014 22:02

Re: ChooChoo, a train network AI

Post by Baldy's Boss » 04 Mar 2014 23:52

I'm pretty sure that the AI I bought out in my "Rartown Brown Railroad Co." game was a ChooChoo...I connected a station the AI had built(which had signs in the air saying ChooChoo was pathfinding) near my world's largest city to a nearby set of double tracks between those four-way junctions that had also been built by the AI,
and built a station in the nearby second-largest city and plugged it into the other end of the junction.Then I started sending trains on this route.
The first train to reach the second junction,going down a one-way track,reversed course and headed for the train behind it...I'm told the junction allows no exits.

The game save and an image of the impasse and junction are up on page 4 of the "General Hello and a Help Request" topic in the OpenTTD General forum.

What's the fix?

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4736
Joined: 09 Sep 2007 05:03
Location: home

Re: ChooChoo, a train network AI

Post by Alberth » 05 Mar 2014 10:37

An a link to that page/image: http://www.tt-forums.net/viewtopic.php? ... 4#p1113274

@Baldy's Boss
The little document icon near the "posted" date at the right in the header above each message gives you a link to that post.

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 05 Mar 2014 22:32

It was, Baldy's Boss, and thanks for the link Alberth, I'll reply over there!

Baldy's Boss
Tycoon
Tycoon
Posts: 1308
Joined: 23 Feb 2014 22:02

Re: ChooChoo, a train network AI

Post by Baldy's Boss » 26 Oct 2014 04:21

It's one thing that ChooChoo posts notes in the air about its plans.But apparently they linger even after a ChooChoo has gone bankrupt?
Take a look at this game.
Attachments
LittleOldWorldRedRailroad,1stJan1914.sav
(241.44 KiB) Downloaded 89 times

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 27 Oct 2014 19:27

Baldy's Boss wrote:It's one thing that ChooChoo posts notes in the air about its plans.But apparently they linger even after a ChooChoo has gone bankrupt?
Take a look at this game.
That's quite possible. If an AI goes bankrupt, it stops running and can no longer clean up its signs, I believe. If this bothers you, you can turn the signs off through ChooChoo's settings.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: ChooChoo, a train network AI

Post by Zuu » 27 Oct 2014 20:33

And in a game where this has already occurred, there is the option to turn off competitor signs. It will hide dead AI signs. (my main motivation for implementing that feature was actually when testing AIs and having my screen littered by dead AI signs from restarting my AI over and over)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Keplergamer
Engineer
Engineer
Posts: 7
Joined: 04 Aug 2015 03:05

Re: ChooChoo, a train network AI

Post by Keplergamer » 04 Aug 2015 03:11

Choo-choo made this some time ago:

Image

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 04 Aug 2015 06:07

Cool, that's a lot of track it managed to squeeze in there. Then again, that game has been running for quite a while :) Interesting looking map, by the way!

Baldy's Boss
Tycoon
Tycoon
Posts: 1308
Joined: 23 Feb 2014 22:02

Re: ChooChoo, a train network AI

Post by Baldy's Boss » 25 Dec 2015 23:00

In the save,a ChooChoo (which went bankrupt one month later) apparently "reinvented the wheel" in trying to build service between Quarberg Market and Funthwaite Springs...two parallel dual lines that don't connect.
So it was left with heavy infrastructure bills and no revenue potential on the route.Does it not keep track of where it has tracks?
Attachments
LittleOldWorldRedRailroad,1stSep1959.sav
(294.18 KiB) Downloaded 80 times

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 03 Jan 2016 22:07

Baldy's Boss wrote:Does it not keep track of where it has tracks?
No, it doesn't; it just plops down a crossing into a random spot that looks promising, then tries to extend the crossing in each direction. It's entirely possible it'll pick two spots, close together, neither of which results in a buildable route.

However, the savegame does look odd: it has two sets of unfinished track, which shouldn't normally happen (one containing Frohead Junction and the other with Wreeley Junction). It won't start a new network unless every exit of every crossing has been tried. Although... did you happen to save and reload the game? That would explain it, since it doesn't keep track of what it was building across a save/load cycle (in fact, it doesn't save anything, it just looks at the map).

Sorry, in this case it's just too stupid to live :P

Baldy's Boss
Tycoon
Tycoon
Posts: 1308
Joined: 23 Feb 2014 22:02

Re: ChooChoo, a train network AI

Post by Baldy's Boss » 03 Jan 2016 23:25

Yes,I am given to frequent save/reloads.
I can probably check older saves for how this set developed.


So there's no "check the existing network" function?

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 03 Jan 2016 23:30

Nope, once a network is built (or you load a savegame) it is forgotten. It just sells vehicles operating at a loss. Other than that, it just goes and builds stuff. I added (but never released) a feature where it sells the bottom 10% of vehicles (by yearly profit) and clones the top 10% every year, but that's it.

xarick
Transport Coordinator
Transport Coordinator
Posts: 267
Joined: 26 Feb 2015 00:52

Re: ChooChoo, a train network AI

Post by xarick » 21 Apr 2016 18:24

Train 4 needs to take a hell of a path to go from a station so close to the other.
Attachments
screenshot#7.png
(655.23 KiB) Not downloaded yet
autosave4.sav
(2.27 MiB) Downloaded 73 times
Formerly known as Samu

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 22 Apr 2016 21:38

Ha, yes it'll do that. It'll probably discover it's not a profitable route and sell the vehicles. I never got around to implementing a comparison between "as the crow flies" distance vs. the distance the train will have to take.

matta2006
Engineer
Engineer
Posts: 1
Joined: 26 May 2016 11:24

Re: ChooChoo, a train network AI

Post by matta2006 » 26 May 2016 11:26

Dear developers,

first of all, I really like the way this AI is playing and building its long rails.

I am running some contest games. And, I have found that this AI does not returns its loans, even when it has plenty of money. I think it is a bug, and this costs 50 winning point for nothing.

Best regards,

User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel » 26 May 2016 20:32

Hi matta2006, you're right. While it's waiting for more money to come in, it'll always max out its loan, so it can see when it has how much it needs. Between checks, it should really have paid back what it could. However, it has to keep enough in cash to pay for station maintenance and avoid bankruptcy, and I was too lazy to make it any smarter :)

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: ChooChoo, a train network AI

Post by Kogut » 17 Sep 2016 09:54

From "newgrf hates ChooChoo" saga: 2cc trainset has passenger-only monorail. This AI attempts to use it to move coal.
Attachments
2cc.sav
(56.77 KiB) Downloaded 65 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests