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

Post Reply
User avatar
1009
Engineer
Engineer
Posts: 81
Joined: 22 Mar 2009 07:24
Location: Haarlem, The Netherlands
Contact:

Re: ChooChoo, a train network AI

Post by 1009 »

And isn't the second one just a crossing where it removed the sideways? Or does it build different stuff then? n_n
WWW
President
President
Posts: 920
Joined: 28 Jan 2005 20:37

Re: ChooChoo, a train network AI

Post by WWW »

Playing a game with this AI, I found that it will construct trains longer than it's stations, and that trains will trap themselves as a result.

Can't show you any pics though.
Reddog785
Engineer
Engineer
Posts: 71
Joined: 30 Aug 2009 18:39

Re: ChooChoo, a train network AI

Post by Reddog785 »

I don't have a screenshot but my AI once did this with a railway line.

|______
______|
|_____
_____|
|
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: ChooChoo, a train network AI

Post by bokkie »

Something went wrong in the screenshot :) Don't know what, fast-forwarded a game for 40 years. Also, it didn't sell the train in the lower right after years of losing money. Too bad your AI didn't really perform well in this map, maybe because of the hilly terrain and high sea level. Other than that it seems like a fine AI, good luck developing! :)
Attachments
Unnamed, 1992-04-06.png
(297.38 KiB) Downloaded 98 times
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 »

While updating the head post on common tags in use I noticed that for ChooChoo you have forgot to put a comma between the two tags that you have given.

So instead of specifying the two tags "train" and "save/load" you have created a new tag "train save/load". When users search for more than one tag you can probably see that this will become a problem.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel »

Eliandor wrote:And isn't the second one just a crossing where it removed the sideways? Or does it build different stuff then? n_n
It is, but it should have flipped or removed (depending on version) the exit signal to allow trains to pass once it connects the crossing to its destination.
Zuu wrote:While updating the head post on common tags in use I noticed that for ChooChoo you have forgot to put a comma between the two tags that you have given.

So instead of specifying the two tags "train" and "save/load" you have created a new tag "train save/load". When users search for more than one tag you can probably see that this will become a problem.
Ah, I thought they were whitespace separated. I'll go fix that right away :)
Reddog785
Engineer
Engineer
Posts: 71
Joined: 30 Aug 2009 18:39

Re: ChooChoo, a train network AI

Post by Reddog785 »

I clicked the "X" in that window in the screenshot brainwashed by it that I was playing OpenTTD!
Vemarkis
Engineer
Engineer
Posts: 83
Joined: 06 Jan 2009 18:27
Location: Helsinki, Finland

Re: ChooChoo, a train network AI

Post by Vemarkis »

Does ChooChoo support newgrf's? Cause, mine keeps crashing right when it puts down its stations and depots. Build on town owned roads is on, max station spread is 50, and it has plenty of loan left always. Seems to me it doesn't know it can't build 20 tile bridges due to a grf.
Attachments
InterDest Transport, 01-01-1891.png
(68.6 KiB) Downloaded 71 times
InterDest Transport, 25-12-1890.png
(65.52 KiB) Downloaded 65 times
User avatar
1009
Engineer
Engineer
Posts: 81
Joined: 22 Mar 2009 07:24
Location: Haarlem, The Netherlands
Contact:

Re: ChooChoo, a train network AI

Post by 1009 »

Vemarkis wrote:Does ChooChoo support newgrf's? Cause, mine keeps crashing right when it puts down its stations and depots. Build on town owned roads is on, max station spread is 50, and it has plenty of loan left always. Seems to me it doesn't know it can't build 20 tile bridges due to a grf.
That's not a crash, that's the display of a try() - catch()-sequence. It just continues to try and build stuff.
Vemarkis
Engineer
Engineer
Posts: 83
Joined: 06 Jan 2009 18:27
Location: Helsinki, Finland

Re: ChooChoo, a train network AI

Post by Vemarkis »

It did crash, I got a popup for it..the log ends with "datehere: unexpected error".
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: ChooChoo, a train network AI

Post by Lord Aro »

Vemarkis wrote:It did crash, I got a popup for it..the log ends with "datehere: unexpected error".
that really doesn't help
the AI author needs the whole debug screen
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
Vemarkis
Engineer
Engineer
Posts: 83
Joined: 06 Jan 2009 18:27
Location: Helsinki, Finland

Re: ChooChoo, a train network AI

Post by Vemarkis »

I gave the whole debug screen in the 2 screenshots above. :roll:
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: ChooChoo, a train network AI

Post by Lord Aro »

then why did you post again?
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
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: ChooChoo, a train network AI

Post by planetmaker »

Lord Aro wrote:then why did you post again?
Why don't you read the thread in sequence and postings entirely. It might answer your question :-x
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: ChooChoo, a train network AI

Post by Kogut »

Trains in ChooChoo almost never use "full load" (Except first train).
It result in very unprofitable trains.
Trains can do sth like it:
station A - unload + full load
station A - unload + load available
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel »

Thanks for the bug reports, guys! There are grfs that limit bridge length, too? No, it doesn't support that, and it's probably not going to. At some point, you're just not playing the same game anymore :p
Kogut wrote:Trains in ChooChoo almost never use "full load" (Except first train).
It result in very unprofitable trains.
True, but full load can result in trains staying in a station for months, clogging up the lines, which is also bad. Also, I'm not trying to maximize income. As long as it makes enough money to stay alive and expand, it's doing fine.
Eliandor wrote:That's not a crash, that's the display of a try() - catch()-sequence. It just continues to try and build stuff.
Close - that one is actually fatal :) I've set the maximum bridge length to 20 and apparently it discovered there's no bridges available that can actually support that length.

Edit: "I'm trying" -> "I'm not trying"
Last edited by Michiel on 16 Jun 2010 09:06, edited 1 time in total.
User avatar
1009
Engineer
Engineer
Posts: 81
Joined: 22 Mar 2009 07:24
Location: Haarlem, The Netherlands
Contact:

Re: ChooChoo, a train network AI

Post by 1009 »

Michiel wrote:Cool :D I'm just using the library pathfinder though, but it can use some debugging aids in the form of signs showing what it's doing, that's for sure.

Dustin, sorry for hijacking your thread ;)
Still, your AI fails on building paths now and then :) but since I don't have a clear idea of when it happens... :P.
Choochoo_byebye_crossing.png
(159.95 KiB) Downloaded 52 times
Vemarkis
Engineer
Engineer
Posts: 83
Joined: 06 Jan 2009 18:27
Location: Helsinki, Finland

Re: ChooChoo, a train network AI

Post by Vemarkis »

Michiel wrote:Thanks for the bug reports, guys! There are grfs that limit bridge length, too? No, it doesn't support that, and it's probably not going to. At some point, you're just not playing the same game anymore :p
Close - that one is actually fatal :) I've set the maximum bridge length to 20 and apparently it discovered there's no bridges available that can actually support that length.
Can you not make it a variable the user can change? Denver & Rio Grande has a setting for that, I think it would solve the issue completely.
User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: ChooChoo, a train network AI

Post by Dustin »

Vemarkis wrote:
Michiel wrote:Thanks for the bug reports, guys! There are grfs that limit bridge length, too? No, it doesn't support that, and it's probably not going to. At some point, you're just not playing the same game anymore :p
Close - that one is actually fatal :) I've set the maximum bridge length to 20 and apparently it discovered there's no bridges available that can actually support that length.
Can you not make it a variable the user can change? Denver & Rio Grande has a setting for that, I think it would solve the issue completely.
<Hijack>Wow, I didn't realize that setting would actually be useful for anything.</Hijack>
User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 13 Jul 2008 00:57
Contact:

Re: ChooChoo, a train network AI

Post by Michiel »

Eliandor wrote:Still, your AI fails on building paths now and then :) but since I don't have a clear idea of when it happens... :P.
Me neither :p But it's not the pathfinder (I've checked), it's my own code. At the moment, it's "in the shop" and even more broken, so I'm some time away from the next release.
Vemarkis wrote:Can you not make [maximum bridge length] a variable the user can change? Denver & Rio Grande has a setting for that, I think it would solve the issue completely.
That's a great idea. Planned user settings so far:

- max. bridge length
- number of bootstrap lines to build
- enable/disable debugging signs
- spending habits, like D&RG's "fiscal restraint"
Dustin wrote:<Hijack>Wow, I didn't realize that setting would actually be useful for anything.</Hijack>
Argh! Retaliatory thread hijack! :p
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 10 guests