PathZilla (v6) - A networking 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

boingyboing
Engineer
Engineer
Posts: 1
Joined: 18 Jul 2012 08:43

Re: PathZilla (v6) - A networking AI

Post by boingyboing »

I tried running PathZilla v6 on OpenTTD and I got showed this error report :/
crash.jpg
crash.jpg (44 KiB) Viewed 6628 times
what does this mean?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: PathZilla (v6) - A networking AI

Post by Zuu »

Please attach the full scale image and not a downscaled version. With this one is very hard to read the text in the AI Debug window that shows on the screen. Without that information it is very hard for the Zutty to solve the error.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
firda
Engineer
Engineer
Posts: 1
Joined: 06 Nov 2012 17:14

Re: PathZilla (v6) - A networking AI

Post by firda »

Didn't even started :(
Attachments
Firda Logistics, 1952-05-01.png
(237.92 KiB) Downloaded 10 times
Angusmast
Engineer
Engineer
Posts: 3
Joined: 12 Nov 2012 11:40

Re: PathZilla (v6) - A networking AI

Post by Angusmast »

Hi guys.

I've been running Pathzilla v6.
I've started a game and when the AI started all was good.
I saved and switched off.

After loading the saved game, I got the following crash
Attachments
Pathzilla Crash.PNG
(738.48 KiB) Downloaded 8 times
Steffl
Engineer
Engineer
Posts: 103
Joined: 23 Feb 2010 15:44

Re: PathZilla (v6) - A networking AI

Post by Steffl »

Hi,

I decided to write a bugfixed PathZilla AI, because I can't watch this guys posting always the same error messages in this thread.
All should be as always, just without the old bugs. (The bugs are getting old, we need new bugs :-) )

The only thing which was changed is, that PathZilla can't build such extreme big networks as before, because this would cause the "AI took too long to save" error. But I made a new setting where you can change it to the same value as the original PathZilla v. 6, if don't need to save your game.

The biggest problem was the error "top on an empty array" when loading a savegame, but I copied the code from RoadRunner here.
I looked on the other bugs which were reported here and hopefully I successfully fixed it:

- a "divide by zero" -bug when it can't find a good vehicle type to use
- a bug when the pathfinder wasn't finding a path
- the bug when PathZilla tries to demolish water tiles
- I add a minimum distance between loading and unloading target to avoid very short distances or even using the same station as loading and unloading point

You should be able to load your game with bugfixed PathZilla, even when you get the "top on an empty array" with the old PathZilla.

I think it's ok to fix bugs in someone's else AI, because Zutty always said he hasn't time to do it himself.

An old quote written by Zutty:
The contributor's lament...

O wretched AI
How thine bugs torment me
Would that I had enough free time to fix thee

Im REALLY sorry guys. I still want to work on this and PathZilla v6 has been "nearly ready" for months now, but every time I think I'm close to a relase I find some more bugs and just go round in circles. At the moment save/load is broken as I cant serialise a reference to an object.

I had a couple of weeks off in April when I thought this would get done, but thats long gone now and at the moment I need to work on my dissertation. Also the Sniper vs Spy update for Team Fortress 2 has really eaten up some time! ;) It may be a while until I get around to a new release TBH.

If you want to use PathZilla as the basis for a new AI, or just use bits of it then please feel free. I would be perfectly happy about that. Its all licensed under the GPL. The latest (unreleased) code is available online at...

http://code.google.com/p/ottd-noai-path ... /PathZilla

It would be nice if someone could get use out of the ideas I had.
He finally finished version 6 some months after this post, but this is about 3 years ago now.
I hope and think that he isn't inactive forever, but who knows it.
I think the interest in such a project is always there, even if you're interested in it again after some years.
Attachments
PathZilla-6-bugfixed.tar
PathZilla-6-bugfixed
(280 KiB) Downloaded 288 times
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: PathZilla (v6) - A networking AI

Post by luk3Z »

Errors: division by 0 & empty array.
Played with NARS 2.03 and eGRVTS v2.0 r181.
Attachments
PathZilla.PNG
PathZilla.PNG (39.52 KiB) Viewed 1214 times
empty_array.PNG
empty_array.PNG (32.6 KiB) Viewed 1214 times
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
HGus
Engineer
Engineer
Posts: 121
Joined: 12 May 2013 22:28
Location: Argentina

Re: PathZilla (v6) - A networking AI

Post by HGus »

Hi, this was my solution for "top of empty array" error:
(line 197 of original code)

Code: Select all

// Patch: this.keys.top throws an exception if this.keys is empty
	if(this.data.len() > 0 && this.keys.len()>0) {
		saveData[CLASS_NAME] <- this.data[this.keys.top()].getclass().CLASS_NAME;
I will try the bugfixed now... :)
User avatar
umarizal
Engineer
Engineer
Posts: 29
Joined: 19 Apr 2007 13:26
Location: São Paulo - SP - Brazil
Contact:

Re: PathZilla (v6) - A networking AI

Post by umarizal »

Hello friends!

Two questions:

1) How do I get a company name is displayed instead of Pathzilla # 1, # 2 Pathzilla ...?
2) How do I remove PathZilla of my game?
R2dical
Traffic Manager
Traffic Manager
Posts: 163
Joined: 18 Mar 2013 22:22

Re: PathZilla (v6) - A networking AI

Post by R2dical »

1) Edit the part of code in the AI that sets the company name, should be fairly simple as just removing it will revert to default names, just like for human players. In a running game you can use the cheats (Ctrl + Alt + C) to switch to that company and rename it.
2) There are console commands you can start/stop AIs with in a running game.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: PathZilla (v6) - A networking AI

Post by Kogut »

Crash almost immediately after start.
Attachments
Selection_010.png
(38.76 KiB) Not downloaded yet
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
andrei2
Engineer
Engineer
Posts: 2
Joined: 21 Oct 2020 11:03

Re: PathZilla (v6) - A networking AI

Post by andrei2 »

I too have encountered problems with this AI.

will try to add 2 pictures w first problem.

yesterday I did this and my account and post were erased from the board.
Attachments
pathZilla1.png
(761.59 KiB) Not downloaded yet
pathZilla2.png
(706.63 KiB) Not downloaded yet
andrei2
Engineer
Engineer
Posts: 2
Joined: 21 Oct 2020 11:03

Re: PathZilla (v6) - A networking AI

Post by andrei2 »

and this 1 is a separate issue
Attachments
pathZilla3.png
(6.27 MiB) Not downloaded yet
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 31 guests