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

Post Reply
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

Kerygma wrote:Sometimes Pathzilla is building very windy roads (see attachment). I guess it's trying to avoid rough terrain, but it might be a bit too much ;)
This is a feature! You can turn it off if you like. Just look at the AI Settings window...
Attachments
windy.png
windy.png (15.12 KiB) Viewed 3532 times
PathZilla - A networking AI - Now with tram support.
Kerygma
Engineer
Engineer
Posts: 14
Joined: 30 Jun 2009 11:06
Location: Germany

Re: PathZilla (v6) - A networking AI

Post by Kerygma »

Never noticed that, thanks! Guess I shouldn't always use the console to add the AIs ;)
LoWang
Engineer
Engineer
Posts: 93
Joined: 25 Jun 2005 21:17
Contact:

Pathzilla does not build anything

Post by LoWang »

OpenTTD 0.7.2 RC1
These are my newgrf:

Code: Select all

[newgrf]
new\4LVw.grf = 
new\cstramsetw.grf = 
new\newshipsw.grf = 
new\pb_av8w.grf = 
new\basic_platformsw.grf = 
new\NACityw.grf = 
new\brickfreightw.GRF = 
new\glassstationw.grf = 
new\indstatrw.grf = 
new\harbourw_456.grf = 
new\shipdepotw.grf = 
new\combroadw.grf = 2 1
new\anglebuilding.grf = 
new\found.grf = 
new\TransrapidTrackSetw_r1.grf = 
new\newwaterw.grf = 
new\total_bridges.grf = 
new\alpinew.grf = 

[newgrf-static]
new\unifont.grf = 
new\BKTunw.grf = 
new\partysquare.grf = 
new\stolentreesw_162_108.grf = 
new\streetlights.grf = 
And this is a debug window:
pathzilla_debug.PNG
(32.51 KiB) Downloaded 79 times
Those that are last, can yet be first...
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4554
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: PathZilla (v6) - A networking AI

Post by Zuu »

Can you make a screenshot of the part of the debug log that shows which files and row numbers the problem occurred in?

That I am sure is very useful for Zutty to have an idea on what has happened.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
LoWang
Engineer
Engineer
Posts: 93
Joined: 25 Jun 2005 21:17
Contact:

Re: PathZilla (v6) - A networking AI

Post by LoWang »

this is the whole debug window. Is there any other window which I can click into or something?

It seems I am not the only one noticing this behaviour: http://www.tt-forums.net/viewtopic.php?f=65&t=44523
Those that are last, can yet be first...
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

Thanks for the report LoWang, but as Zuu says there isn't really much to go on here. Its not your fault, but there isn't enough information in the screenshot for me to try to fix this issue.

Were you definitely using version 6? It should say this at the top of the AI debug window. I have only recently updated the tags on bananas so it will work with anything beyond 0.7.1, so maybe that is the problem.
PathZilla - A networking AI - Now with tram support.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: PathZilla (v6) - A networking AI

Post by Roujin »

Hey Zutty, found a div/0 in v6 (maybe it's the same bug LoWang encountered):
PathZilla divbyzero.png
(28.82 KiB) Downloaded 70 times

Can't say anything on how to reproduce though.. I've just let it running for a while.
It was a huge map with lots of opponents...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

Thanks for the report Roujin. I fail once again! :oops:

It would seem that it tried to establish a route that spans the whole map (note in the trace you can see distance = 2316 tiles!), but it has determined that there are no vehicles that could possibly turn a profit for such a service. (maxProfit = 0)

I think I need a vetting stage for overly long services.
PathZilla - A networking AI - Now with tram support.
User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: PathZilla (v6) - A networking AI

Post by Dustin »

Zutty wrote:Thanks for the report Roujin. I fail once again! :oops:

It would seem that it tried to establish a route that spans the whole map (note in the trace you can see distance = 2316 tiles!), but it has determined that there are no vehicles that could possibly turn a profit for such a service. (maxProfit = 0)

I think I need a vetting stage for overly long services.

You can't consider every error a failure. Show me a developer who never checked in a bug, and I will show you a person who writes about 1 line of code per year! Don't get me started on the opportunity cost of fixing too many bugs too soon...
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

Dustin wrote:
Zutty wrote:Thanks for the report Roujin. I fail once again! :oops:

It would seem that it tried to establish a route that spans the whole map (note in the trace you can see distance = 2316 tiles!), but it has determined that there are no vehicles that could possibly turn a profit for such a service. (maxProfit = 0)

I think I need a vetting stage for overly long services.

You can't consider every error a failure. Show me a developer who never checked in a bug, and I will show you a person who writes about 1 line of code per year! Don't get me started on the opportunity cost of fixing too many bugs too soon...
Thanks Dustin :)
PathZilla - A networking AI - Now with tram support.
User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: PathZilla (v6) - A networking AI

Post by Dustin »

CrashZilla:

Division by zero
ServiceManager.nut line 374
Attachments
PathZilla Crash.png
(211.12 KiB) Downloaded 53 times
User avatar
dillonb3
Engineer
Engineer
Posts: 4
Joined: 31 Jul 2009 11:30
Location: Dundalk, Ireland

Re: PathZilla (v6) - A networking AI

Post by dillonb3 »

Just a question regarding the AI in one of my games in the Desert enviroment the AI is trying to link up 2 towns but a large hilly forest terrain is between the 2 towns. I thought I'd help out and build a road linking the towns it's trying to link but it doesn't create vehicles. My question is will it avoid using any routes I created?
Due to the recession the light at the end of the tunnel has been switched off
bokkie
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 19 Jan 2007 19:26

Re: PathZilla (v6) - A networking AI

Post by bokkie »

Wanted to give a thumbs up, I started a map which appears to be hard for some train AI's (ChooChoo, TransAI) but PathZilla performed really well!
KiapPhil
Engineer
Engineer
Posts: 2
Joined: 04 Sep 2009 15:49

Re: PathZilla (v6) - A networking AI

Post by KiapPhil »

Hi,

I was asked by OpenTTD to give you the attached debug message.

Btw: Nice AI 8)

Regards
Phil
Attachments
Würzhorst Transport, 4. Nov 1970.png
(41.27 KiB) Downloaded 78 times
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

bokkie wrote:Wanted to give a thumbs up, I started a map which appears to be hard for some train AI's (ChooChoo, TransAI) but PathZilla performed really well!
Thanks bokkie :)
KiapPhil wrote:Hi,

I was asked by OpenTTD to give you the attached debug message.

Btw: Nice AI 8)

Regards
Phil
Thanks for the bug report KiapPhil. Sorry for my late reply. What version of OpenTTD were you using at the time?
PathZilla - A networking AI - Now with tram support.
markzl
Engineer
Engineer
Posts: 29
Joined: 20 Jan 2009 01:58

Re: PathZilla (v6) - A networking AI

Post by markzl »

hi
I am having a problem with a few ai's which i downloaded from the same place as the libraries. I have tried searching the forums but can only find links back to the libraries - all of which i have already downloaded & put into "ai/libraries". With pathzilla6 & ChooChoo.306 the error is: couldn't find library 'graph.aystar'.
I do not have the internet & am using linux (I no longer have windows). I will try to attach a pic below.

Also, when i downloaded the ai's from the web, i found that openttd could not see them untill i converted them from *.tar.gz to *.tar, however the ai's downloaded from the forums were already in *.tar. I tried both decompressing & converting the libraries (to *.tar from *.tar,gz) without success.

Perhaps I should also mention that when i first tried openttd on linux i had a problem with the original sample.cat because it decompressed into capital letters & openttd could not see the file until i renamed it to lower case since linux see's capitals & lower case letters as different characters.

Thx for any help.

P.S.
the libraries i downloaded are as follows:
Graph.AyStar.4.tar.gz Lib.Event.1.tar.gz Pathfinder.Road.3.tar.gz Queue.FibonacciHeap.2.tar.gz
Graph.AyStar.5.tar.gz Lib.Event.2.tar.gz Queue.BinaryHeap.1.tar.gz Queue.PriorityQueue.2.tar.gz
Graph.AyStar.6.tar.gz Pathfinder.Rail.1.tar.gz Queue.FibonacciHeap.1.tar.gz
Herr Bert
Engineer
Engineer
Posts: 82
Joined: 14 Mar 2004 02:01
Location: Switzerland
Contact:

Re: PathZilla (v6) - A networking AI

Post by Herr Bert »

This is a bit offtopic, but I just got to say it.

I havent been around here toomuch for a few years. I used to play TTDPatch only (or better: TT since its beginnings). I just got this tiny netbook here as I am spending 1.5 hours/day on my way to work and back. Within the ubuntu I installed I found by accident (really?) the OpenTTD installation in synaptic. I had to give it a try and of course - who would expect something else? - I am again addicted to this game. After spending a while in tuning it to my taste, I started to play it again seriously and stumbled upon an "no suitable ai found"-error. Some irritation here and deviation there, I finally managed to arrive at bananas' AI list. I decided to study a little the available AIs to find the most suitable AI for me ...

... and then I found this thread.

Oh my goodness! Wow! Jeeeeeeez! This is amazing! There is someone never giving up. Taking mathematical approaches into consideration (compared to the more plain logical other ones) in developing an omnipotent AI. Sounded first a bit nerdy to me, but I read and read and read and could not stop to follow this thread. It is a pleasure to follow Zutty's explanations, the considerations, the progress. Always polite, always honest, always thankful. And productive. Over two years. OK, I have skipped 2 pages, but I do not think Zutty went berserk inbetween.

I am not unexperienced in programming. I wrote my first lines of code back in 1986. I know a bunch of programming languages quite well. Compared to you I have to give up, when things become abstract, I am stuck to things I can follow in my imagination. Looking at i.e. the voronoi definitions makes me shiver. Thinking of how to implement something like this makes me give up. This is where my appreciation comes from.

Please keep going with all of it. I will give your AI an honest try. As I am playing this game since about 13 years now, I developed strange habits. Just be prepared, that someone named Herr Bert will take over the share majority of your AI company, that he will fire then the CEO and put a beautyful lady on top, will make her a little later the one and only Frau Bert and helps her to control all the other AIs in the game. And if this first marriage works out well, I am going to marry her again and again and again.

Thank you, Zutty.

PS: I am not on drugs. Just addicted.
User avatar
Menno
Tycoon
Tycoon
Posts: 1190
Joined: 05 Feb 2005 14:35
Location: Netherlands, Utrecht

Re: PathZilla (v6) - A networking AI

Post by Menno »

Pathzilla 6 crashed on me, see att.
Attachments
j-Jászszalontaháza Transport, 26th Mar 1939#1.png
pathzilla v6 crash
(243.34 KiB) Downloaded 1 time
j.sav
pathzilla v6 crash
(389.35 KiB) Downloaded 86 times
*hmz*
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: PathZilla (v6) - A networking AI

Post by Zutty »

Herr Bert wrote:This is a bit offtopic, but I just got to say it.

<snip>
Wow. Thanks very much Herr Bert :D There are times when I wonder whether I should keep going, but posts like this make it all worthwhile :) It can't tell you what a boost your post is for me.

And... has it really been 2 years?! :shock: It seems like only yesterday that I was reading the old NoAI thread and started thinking about how I would create an AI that players would consider "intelligent". Initially I was going to make it modular, and PathZilla was just going to be the name of my pathfinder, but it just kind of stuck!

Still, mine isn't the oldest AI. Zuu's Clueless was possibly the first pure Squirrel AI, and I think Admiral and Convoy were around before I hit the scene. I remember when breaking £5m company value within 10 years was still considered remarkable! The old automated tournaments were fun too... we should get those going again.

Although my progress is a bit slow at times, I hope I can go on making an interesting AI that you'll all enjoy playing with. :)

Plus if you like the whole considered, mathematical approach, it might interest you to know that my grand plan for PathZilla has yet to be realised. Given my lack of progress over the past couple of months I dont want to promise anything, but if all goes to plan version 8 ought to contain some interesting new features. 8)
Menno wrote:Pathzilla 6 crashed on me, see att.
Thanks very much for the bug report Menno. This looks like a rather odd bug. The AI was creating a new service, but somehow the update flag is set to true (see trace output in screenshot), which means it wont select a new engine (hence the null). I'll need to do some debugging to get to the bottom of this, but it looks to me like the default parameter to ServiceManager.CreateFleet() is not being set properly. If this is the case, it might be a bug in OpenTTD, or a change that I failed to account for!

What version of OpenTTD were you using at the time?

Thanks.
PathZilla - A networking AI - Now with tram support.
User avatar
Menno
Tycoon
Tycoon
Posts: 1190
Joined: 05 Feb 2005 14:35
Location: Netherlands, Utrecht

Re: PathZilla (v6) - A networking AI

Post by Menno »

Sorry, forgot some of the most elementary information: 0.7.3
*hmz*
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests