Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 10, 2018 9:55 am

All times are UTC




Post new topic  Reply to topic  [ 279 posts ]  Go to page Previous 110 11 12 13 14 Next
Author Message
 Post subject: Re: AIAI
PostPosted: Sun Jun 02, 2013 3:04 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9062
Location: Sol d
AIAI v87 (from GUI, though it calls itself iota14 in its output) seems to not know about aircraft range:
Code:
dbg: [script] [2] [S] Your script made an error: division by zero
dbg: [script] [2] [S]
dbg: [script] [2] [S] *FUNCTION [abort()] aiai-iota14/UTIL/debug.nut line [40]
dbg: [script] [2] [S] *FUNCTION [HandleEvents()] aiai-iota14/main.nut line [366]
dbg: [script] [2] [S] *FUNCTION [Maintenance()] aiai-iota14/main.nut line [314]
dbg: [script] [2] [S] *FUNCTION [Start()] aiai-iota14/main.nut line [51]
dbg: [script] [2] [S]
dbg: [script] [2] [S] [tesmode] false
dbg: [script] [2] [S] [message] "AIRCRAFT_DEST_TOO_FAR 322 322 Aircraft 17"
dbg: [script] [2] [S] [this] INSTANCE
dbg: [script] [2] [S] [airplane_id] 322
dbg: [script] [2] [S] [order_event] INSTANCE
dbg: [script] [2] [S] [ev_type] 23
dbg: [script] [2] [S] [event] INSTANCE
dbg: [script] [2] [S] [this] INSTANCE
dbg: [script] [2] [S] [this] INSTANCE
dbg: [script] [2] [S] [need] 130000
dbg: [script] [2] [S] [builders] ARRAY
dbg: [script] [2] [S] [this] INSTANCE


Attachments:
File comment: possibly needed newgrf. Another version might do
ogfx-landscape.tar.zip [2.35 MiB]
Downloaded 73 times
File comment: savegame
aiai_crash.sav [375.7 KiB]
Downloaded 64 times

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Top
   
 Post subject: Re: AIAI
PostPosted: Sat Jul 06, 2013 5:32 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Coding restarted!

planetmaker wrote:
Likely this has been reported before... AIAI was doing quite well and then sadly died:


Thanks for the save! Also - thanks to all bug reporters.

"Count does not exist" is now fixed, it was caused by industry closed during processing list of possible candidates.

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Sat Jul 06, 2013 5:25 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Samu wrote:
another crash found

division by zero

Using AIAI v87. Not sure what it was trying to do.


Sorry - this one was caused by AIAI not refusing to be loaded in game with incompatible version.

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Mon Jul 08, 2013 7:06 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
BaNaNaS contains new version (iota89) - with bugfixes, tweaks and better NewGrf support (NUTS trainset is now handled properly).

Thanks to everybody who helped by reporting bugs!

known problems: https://github.com/Bulwersator/AIAI/issues?state=open

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Sun Jul 14, 2013 7:19 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 87
Location: Netherlands
AIAI v 89 crashes with Count does not exist.


Attachments:
File comment: AIAI crash screenshot
Unnamed, 1st Nov 2007#1.png [814.19 KiB]
Downloaded 5 times
Top
   
 Post subject: Re: AIAI
PostPosted: Sun Jul 14, 2013 8:06 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Wormnest wrote:
AIAI v 89 crashes with Count does not exist.

Thanks for report - I thought that it is fixed. Can you post savegame? I have no idea what happens here, it seems to be case of weird NewGrf or my misinterpretation of API documentation. And with savegame I may check what is happening with industry number 2065.

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Mon Jul 15, 2013 12:22 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 87
Location: Netherlands
Kogut wrote:
Can you post savegame?


I'm sorry the savegame is too big for the forum.


Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 7:45 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
New version (iota90) is available. It includes bugfixes, tweaks and refactoring (hopefully unnoticeable for players).

Anyone that encounter this .Count() - crash: please report it (report with savegame would be even more helpful).

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 10:31 am 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 87
Location: Netherlands
In a new AI test game AIAI Assertion failed with v90.


Attachments:
AIAI crash, 1st Feb 2003.sav [451.15 KiB]
Downloaded 65 times
Unnamed, 1st Feb 2003.png [261.96 KiB]
Downloaded 3 times
Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 11:02 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Can you provide also dtnames.grf? File is unavailable on BaNaNaS, http://grfcrawler.tt-forums.net/index.p ... q=36347476 is a dead link and version on viewtopic.php?f=67&t=51962 have different ID.

Thanks for the report!

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 11:15 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
I published new version (it may collect more information about this crash).

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 12:02 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 87
Location: Netherlands
Kogut wrote:
Can you provide also dtnames.grf?


I hope I am allowed to post it here but since it's gpl it shouldn't be a problem I think so here it is.


Attachments:
Dutch_Town_Names-2.tar [80 KiB]
Downloaded 61 times
Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 1:00 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
It is newgrf with id 44544E32. This save wants one with 36347476 (information from load menu). Can you try to find the one used in this game?

Why some authors prefer to not upload their work to BaNaNaS? This situation would be so easier, search would require around 3 second (by one person), not around 30 minutes (by two people).


Attachments:
Bez tytułu.png
Bez tytułu.png [ 37.67 KiB | Viewed 3005 times ]

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 3:08 pm 
Offline
Engineer
Engineer

Joined: Tue Feb 23, 2010 3:44 pm
Posts: 103
Hi Kogut,
I found a bug in AIAI iota 89.
The savegame is before the bug occurs and it was made a nightly (version r25522).
I didn't watch what your AI did, but the profit of it was good until it crashed.


And as I waited to upload the savegame above I found another bug.
This time in version iota 91.
Look at screenshot Nr. 2.
OpenTTD version was 1.3.1. You use a API-function which is too new for 1.3.x versions.

Someone posted a very clever piece of code how you can check if a function is available.

I think it was if(HasCargoRating in AIStation){....

In older versions AIStation.GetCargoRating returns the value 69 when there this station has no rating for this cargo type.
You can try if this works:

Code:
if((HasCargoRating in AIStation&&!AIStation.HasCargoRating(station,cargo))||
(!HasCargoRating in AIStation&&AIStation.GetCargoRating(station,cargo)==69&&AIStation.GetCargoWaiting(station,cargo)<1)){


Attachments:
AIAIv89bug.png [24.8 KiB]
Downloaded 3 times
File comment: first crash
Unbenannt, 24. Sep 1957.sav [1.78 MiB]
Downloaded 57 times
File comment: second crash
Unbenannt, 12. Apr 1942.png [37.1 KiB]
Downloaded 3 times
Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 3:28 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
I published version iota92 without too new NoAI API calls. Thanks for reports!

EDIT: It seems that first one happened because AIAI unexpectedly was in test mode.

EDIT2: And iota93, finally something crashed in my test.

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Tue Jul 16, 2013 6:23 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 14, 2013 12:33 pm
Posts: 87
Location: Netherlands
Found it in the data folder.


Attachments:
dtnames.grf [46.55 KiB]
Downloaded 71 times
Top
   
 Post subject: Re: AIAI
PostPosted: Wed Jul 17, 2013 9:14 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Wormnest wrote:
Found it in the data folder.

Thanks! This crash and one reported by Steffl (in v89) are fixed in iota94. Thanks again for reports!

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Wed Jul 17, 2013 3:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Oct 31, 2005 9:00 pm
Posts: 1032
Location: UK
Using AIAI iota94 with the latest development version or ISR (r221), I noticed that AIAI always builds the same type of station (the type intended for the source) for both source and destination. ISR r221 should be available for download from the usual place in the next few hours.

Your debugging AI does build the correct source and destination types.

From a quick look at the code in AIAI Railbuilder.nut it seems that the source_station parameter of BuildNewGRFRailStation is always set to true:

Code:
if(!AIRail.BuildNewGRFRailStation(location, direction, platform_count, trasa.station_size, AIStation.STATION_NEW,
      trasa.cargo, source_industry, goal_industry, distance, true)) {

_________________
Image


Top
   
 Post subject: Re: AIAI
PostPosted: Wed Jul 17, 2013 3:42 pm 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2493
Location: Poland
Thanks for bug report (and even debugging!).

It is now fixed in development version: https://github.com/Bulwersator/AIAI/com ... a7ef6def3b

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
   
 Post subject: Re: AIAI
PostPosted: Wed Jul 17, 2013 4:15 pm 
Offline
Engineer
Engineer

Joined: Tue Feb 23, 2010 3:44 pm
Posts: 103
Hi Kogut,
here's a new bug I found.
I played with AIAI version iota93 and Openttd 1.3.1.

I add the savegame, too. AIAI played good in the beginning of the game, but later it had to pay much for its infrastructure maintainance and it seems it tried to sell vehicles when it crashed.

Attachment:
screenshot.png [41.8 KiB]
Downloaded 1 time


Attachments:
AIAIv93crash.sav [905.09 KiB]
Downloaded 64 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 279 posts ]  Go to page Previous 110 11 12 13 14 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.