Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Nov 15, 2018 5:17 am

All times are UTC




Post new topic  Reply to topic  [ 200 posts ]  Go to page Previous 14 5 6 7 810 Next
Author Message
PostPosted: Tue Aug 25, 2009 7:34 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 886
I just experimented with this, and then tested it for 2 minutes, and it worked. :mrgreen: I don't know if it can have an impact on other areas of the AI, you know your code better.


Top
   
PostPosted: Wed Aug 26, 2009 11:44 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Oct 16, 2007 11:08 am
Posts: 1037
Location: Perth, Western Australia
Oops, a cockup has occured.


Attachments:
Error1.PNG [189.78 KiB]
Downloaded 52 times

_________________
Image
Top
   
PostPosted: Wed Aug 26, 2009 11:51 am 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Monaro Doorslammer wrote:
Oops, a cockup has occured.

A bit more info on that error:

The subsidy system has been changed in a few commits +-r17110. Subsidies are no longer station->station, but are town->town, industry->industry or industry->town now. A new set of AI api functions has been introduced to deal with this. The old functions have been changed to work like the old functions as much as possible, but it isn't possible to return a StationID for an awarded subsidy anymore, since multiple stations can be valid.


Top
   
PostPosted: Wed Aug 26, 2009 12:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Oct 16, 2007 11:08 am
Posts: 1037
Location: Perth, Western Australia
Oops, now in iMAX mode error reporting. :oops:


Attachments:
Error1.PNG [32.28 KiB]
Downloaded 44 times

_________________
Image
Top
   
PostPosted: Wed Aug 26, 2009 2:33 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
Judging by the debug output that seams to be the same error as you have already reported, and you are still using the same version of the AI.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Wed Aug 26, 2009 2:44 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
Zuu wrote:
Judging by the debug output that seams to be the same error as you have already reported, and you are still using the same version of the AI.

Yes, but this time the complete stack trace is readable.


Top
   
PostPosted: Wed Aug 26, 2009 4:11 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 313
Location: Indonesia
Yexo wrote:
Monaro Doorslammer wrote:
Oops, a cockup has occured.

A bit more info on that error:

The subsidy system has been changed in a few commits +-r17110. Subsidies are no longer station->station, but are town->town, industry->industry or industry->town now. A new set of AI api functions has been introduced to deal with this. The old functions have been changed to work like the old functions as much as possible, but it isn't possible to return a StationID for an awarded subsidy anymore, since multiple stations can be valid.


Its look like that AI crash on calling function. Thats mean the returned "INVALID_STATION" is not known?
What if the returned value of GetSource() and and GetDestination just an InvalidID of Town/Industry or common invalid value (eg. -1) instead of "INVALID_STATION"?

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
PostPosted: Wed Aug 26, 2009 4:23 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
fanioz wrote:
Its look like that AI crash on calling function. Thats mean the returned "INVALID_STATION" is not known?
Ah, sorry. It's my fault, and a bug in OpenTTD (in compat_0.7.nut to be exact). Will fix this later tonight.

Edit: fixed in r17289.


Top
   
PostPosted: Thu Aug 27, 2009 1:30 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 313
Location: Indonesia
Yexo wrote:
fanioz wrote:
Its look like that AI crash on calling function. Thats mean the returned "INVALID_STATION" is not known?
Ah, sorry. It's my fault, and a bug in OpenTTD (in compat_0.7.nut to be exact). Will fix this later tonight.

Edit: fixed in r17289.

Well, thanks :D
I don't need to change anything from my side.
(Just remember the number 17289) :D

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
PostPosted: Thu Aug 27, 2009 12:42 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Aug 03, 2006 7:32 pm
Posts: 318
Skype: woldy_bg
Location: Bulgaria
Well it's not exactly fixed:


Attachments:
TransAI #1.png [54.18 KiB]
Downloaded 52 times

_________________
Image
Top
   
PostPosted: Thu Aug 27, 2009 3:18 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Fri Jan 19, 2007 7:26 pm
Posts: 326
Don't know how I managed to make it instantly crash on startup? Maybe because I'm using multiple versions with the same grfs/AI's? I have used the most current nightly to download updates and then used an old build (9th of july, don't know revision) to play with it.


Attachments:
Ridderdoorn Transport, 1950-01-25.png [308.29 KiB]
Downloaded 62 times
Top
   
PostPosted: Thu Aug 27, 2009 9:03 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
bokkie: That screenshot is almost certainly of no use to the AI author. Please enlarge the window in both height and width so that the full error message is shown next time :)

_________________
* @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


Top
   
PostPosted: Thu Aug 27, 2009 9:08 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
I'm 99% sure it's because the version of OpenTTD is you use is too old for that version of Trans AI.


Top
   
PostPosted: Fri Aug 28, 2009 3:53 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 313
Location: Indonesia
Wold wrote:
Well it's not exactly fixed:

I'm sory. I couldn,t see any wrong there. Perhaps you could describe it a bit.

bokkie:
Yexo is right. And, yes there are 1 percent of my bad code design.

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
PostPosted: Fri Aug 28, 2009 1:03 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 15, 2007 9:45 pm
Posts: 655
Location: FRANCE
One thing I have noticed about this AI is that it loves long bridges. I think that's the problem on he above screenshot. I also came across many situations where instead of simply building some straight track, the AI built a bridge.

Also, it seems reluctant to reusing its tracks, and sometimes builds three times the same path for three different industries.

_________________
I am little, ugly, and nasty. How do you do?


Top
   
PostPosted: Fri Aug 28, 2009 1:27 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Aug 03, 2006 7:32 pm
Posts: 318
Skype: woldy_bg
Location: Bulgaria
With the previous screenshot I meant that the bridge problem is not fixed.

With the following screenshot I want to show that your AI makes a route ( blocking the supply ). I think it will be a good idea when you transport secondary stuff to add a simple route ( either train or truck ) in order to feed the industry ensuring constant supply.


Attachments:
trans1.png [99.98 KiB]
Downloaded 43 times

_________________
Image
Top
   
PostPosted: Fri Aug 28, 2009 7:12 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 886
I ran into this while I was playing:
Attachment:
Trans AI bug.png
Trans AI bug.png [ 96.82 KiB | Viewed 2620 times ]

The pair of that road station simply didn't exist.


Top
   
PostPosted: Fri Aug 28, 2009 8:56 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Aug 03, 2006 7:32 pm
Posts: 318
Skype: woldy_bg
Location: Bulgaria
Brumi wrote:
I ran into this while I was playing:
Attachment:
Trans AI bug.png

The pair of that road station simply didn't exist.


That's because it couldn't find a path. That's normal when it fails to build a route.

_________________
Image


Top
   
PostPosted: Sat Aug 29, 2009 9:59 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 886
Wold wrote:
That's because it couldn't find a path. That's normal when it fails to build a route.

I'm not sure about that. The coal mine was quite nearby and there was no obstruction. Even if the pathfinder fails, it should delete the station.


Top
   
PostPosted: Sat Aug 29, 2009 5:57 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 313
Location: Indonesia
Updated, as usual. 2nd post and Bananas... :mrgreen:
bokkie wrote:
Don't know how I managed to make it instantly crash on startup? Maybe because I'm using multiple versions with the same grfs/AI's? I have used the most current nightly to download updates and then used an old build (9th of july, don't know revision) to play with it.

Yexo wrote:
I'm 99% sure it's because the version of OpenTTD is you use is too old for that version of Trans AI.

Then, this version should fix the 1% left. :D Just make sure you would need at least 0.7.2 (I don't remember if I've ever added newer API function)

Wold wrote:
With the previous screenshot I meant that the bridge problem is not fixed.

cmoiromain wrote:
One thing I have noticed about this AI is that it loves long bridges. I think that's the problem on he above screenshot. I also came across many situations where instead of simply building some straight track, the AI built a bridge.

I've tell him in this version to try build normal track instead, but still let him build bridge if necessary. :D
Long bridge is a feature, but Bridge-Happy is a bug. Agree ?
cmoiromain wrote:
Also, it seems reluctant to reusing its tracks, and sometimes builds three times the same path for three different industries.

re-using track : I've done some experiment in my other thread, and I've a not-published-yet version of Trans that re-use rail track. There is still a problem to avoid crossing on existing track. Of course I'll release it when ready. :D


Wold wrote:
With the following screenshot I want to show that your AI makes a route ( blocking the supply ). I think it will be a good idea when you transport secondary stuff to add a simple route ( either train or truck ) in order to feed the industry ensuring constant supply.

I left this one, couldn't implement it right now, probably in the trunk version. However the idea is good. Thanks :D

edit:
Forget to answer this:
Brumi wrote:
Wold wrote:
That's because it couldn't find a path. That's normal when it fails to build a route.

I'm not sure about that. The coal mine was quite nearby and there was no obstruction. Even if the pathfinder fails, it should delete the station.

TestMode said, AI can build route, ExecMode not. The pathfinder failed, it wouldn't delete the road station, because it was a drop off. It will re-used later. But in the next days, AI decide to build rail and success. The road station would only be used again, if AI couldn't build rail service.

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 200 posts ]  Go to page Previous 14 5 6 7 810 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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.