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

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

Re: ChooChoo, a train network AI

Post by xarick »

the index 'find' does not exist
Attachments
Unnamed, 1955-07-31.png
(43.45 KiB) Not downloaded yet
R25-G21 - ChooChoo vs PathZilla - 7,463 days.sav
(3.43 MiB) Downloaded 138 times
Formerly known as Samu
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6800
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: ChooChoo, a train network AI

Post by Redirect Left »

I've also had this just now with find error, on a map with lots of AIs and me spectating them.
2019-12-12 13_26_16-OpenTTD jgrpp-0.32.2.png
2019-12-12 13_26_16-OpenTTD jgrpp-0.32.2.png (45.05 KiB) Viewed 2845 times
Unfortunately the author has gone AFK for over 2 years at this point, so we might be on our own. Unless someone heree knows how to fix it, i've tried numerous times but i can't get the AI programming language down, it's very confusing and non-sensical to me, otherwise i'd have a good go at fixing numerous issues with lots of old AIs.
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!
mando
Engineer
Engineer
Posts: 2
Joined: 11 Jan 2020 13:11

Re: ChooChoo, a train network AI

Post by mando »

I was trying out some AIs, including ChooChoo and noticed it wasn't working. I fixed two breaking bugs:
  1. Updated road pathfinding library version from 3 to 4
  2. Checked that a returned vehicle name is not null before doing name.find("X")
    I have attached a patch, and a new updated tarball.
    Attachments
    choochoo-412-findbug-libupgrade.patch
    (867 Bytes) Downloaded 142 times
    ChooChoo412-a.tar
    (180 KiB) Downloaded 145 times
    User avatar
    Donald Duck
    Engineer
    Engineer
    Posts: 11
    Joined: 24 Apr 2020 07:05

    Re: ChooChoo, a train network AI

    Post by Donald Duck »

    I tried using this AI and got some errors:

    Image
    HGus
    Engineer
    Engineer
    Posts: 100
    Joined: 12 May 2013 22:28
    Location: Argentina

    Re: ChooChoo, a train network AI

    Post by HGus »

    That is not an error from AI, but your installation. Use the update function from ingame or install manually Pathfinder library version 3
    User avatar
    Michiel
    Transport Coordinator
    Transport Coordinator
    Posts: 316
    Joined: 13 Jul 2008 00:57
    Contact:

    Re: ChooChoo, a train network AI

    Post by Michiel »

    Hello! Not dead, just busy elsewhere. Looks like it doesn't download that library automatically (anymore). I'll see if I can package a copy with my AI, so it just works out of the box.
    User avatar
    Michiel
    Transport Coordinator
    Transport Coordinator
    Posts: 316
    Joined: 13 Jul 2008 00:57
    Contact:

    Re: ChooChoo, a train network AI

    Post by Michiel »

    It's working again! You may have to update or reload the AI from the "check online content" screen.
    User avatar
    andrejHUN
    Engineer
    Engineer
    Posts: 4
    Joined: 02 Aug 2017 18:38
    Contact:

    Re: ChooChoo, a train network AI

    Post by andrejHUN »

    Hello,

    Now I completely understand what it says there, that it's not an actual error, but to be safe and sound, is it not? Should I reload the AI or leave it at that?

    Here's the screenshot from today:
    ArskelissTrans, 2009-08-02.png
    Screenshot
    (88.4 KiB) Not downloaded yet
    User avatar
    Michiel
    Transport Coordinator
    Transport Coordinator
    Posts: 316
    Joined: 13 Jul 2008 00:57
    Contact:

    Re: ChooChoo, a train network AI

    Post by Michiel »

    No, that's a real error. The "the following red text is not an actual error" message is out of date; older versions of the game would print (in red text) all errors, even ones handled by the program. That appears not to be the case anymore. However, the red text you see now *is* a real error and you'll have to reload the AI.

    I'm not sure what happened though - did you rename some of the AI's vehicles? It stores information in the name, so that'll confuse it.

    Or maybe it tried to delete the same vehicle twice - once on its yearly "cleanup" loop, and once more because it received a "vehicle unprofitable" event. The second can then fail because the vehicle is already gone. That looks like it's very unlikely to happen, but possible :-/
    Post Reply

    Return to “OpenTTD AIs and Game Scripts”

    Who is online

    Users browsing this forum: No registered users and 1 guest