Page 2 of 11

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 18 Apr 2009 08:23
by fanioz
Zuu wrote:Sounds like a big step forward.

However, in last nightly I couldn't find FanAI in the content download window. So I tried in 0.7.0 and found it there, tested it but it did not build any trains. Then an hour later I realized that it might be under another name, but there was no Trans AI in last nightly, but in 0.7.0 there is.

So I guess you have told BaNaNaS that minimum version is 0.7.0. Unfortunately that don't make (later) nightlies able to download it. I use some kind of custom number for PAXLink that I got explained is the same as the OpenTTD version number that GRFs reads. Using this custom number both 0.7.0 and last nightly finds PAXLink. (Unless you really wanted to make it only available for 0.7.0)
Nice to see your AI building rails. :)
Yexo wrote: Using 0.7.0 as minimum version works ok, as long as you set the maximum version to "(None)". If it does not show up in a nightly when you do that, please report it as a bug.
I'm expected to make this AI run-able by both 0.7.0 and nightlies, Zuu is right, I've set minimum to 0.7.0, but the maximum is set to Nightly and leave the default value there (that is 0). Now, Yexo made it clear that the maximum value should be "(None)". And if it is still not available tonight, yeah ... it was a bug.
Thanks to make it clear now. :bow:

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 18 Apr 2009 08:46
by fanioz
cmoiromain wrote:yet another request:
your AI seems to like coal (so do I ^^), and it would be pretty neat to have it re-use previous tracks instead of desperately trying to find another way of reaching the same goal.
Trans AI (and maybe all AI too) can only determine the high price cargo (that is coal in temperate /or oil in dessert). Current strategy is cargo concept (see first post), thus the multi sources is transported to one destination. Current rail pathfinder can't re-use existing track. It still need more learning to combine here, split there, avoid joining signal etc... still need a lot of work :shock:
cmoiromain wrote: Another thing, I don't understand why it builds two way exit signals at stations, there is no rational reason for that is there?
signal now use 2 two way exit signal and 1 two way entry signal for each side. The reason is because I'm still lazy to check where is the head, and where is the back of station :D because it was decided by the pathfinder.
cmoiromain wrote: also something else (less important, maybe it's just a coincidence), the two trans AIs running build their HQ at the same place, maybe you could randomise this a little.
Good an idea, will be implemented in the next version. :D
cmoiromain wrote: I really love to play with train building AIs, I do hope this one will become even better! Keep up the good work!
Thanks again... :D
and thanks to all for feedbacks, corrections and suggestion :bow: I'll go offline now.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 19 Apr 2009 14:27
by davidx123
O.k Fanioz listen i really loved the fan AI,however,trans AI keeps crashing.
i download version 90418(the latest),and it doesn't work!i downloaded Aystart5 and whatever,but he keeps crashing.any ideas why?

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 19 Apr 2009 15:40
by Zuu
davidx123 wrote:O.k Fanioz listen i really loved the fan AI,however,trans AI keeps crashing.
i download version 90418(the latest),and it doesn't work!i downloaded Aystart5 and whatever,but he keeps crashing.any ideas why?
It would greatly help if you could post a screenshot of the AI Debug window that appear when Trans AI crashes. Enlarge the window so the read lines are shown.

If it says something about some library not fonud, then that library is missing or installed in the wrong directory so OpenTTD don't find it.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 19 Apr 2009 18:19
by davidx123
My bad :lol: .
well,i don't have time to post screenie,but ill describe it:
i have downloaded all of the libraries needed for that ai,+another ones,i even unzipped some(the tar files are still found in in the library folder),and a fater a while,after he builded a hq,and it already planning a path(i checked the ai debug),a than there is a eror some thing like "one of you Ai had a crash,please take a screeshot and post it on the forums",and a lot of red strings.i think somebody alredy posted this prboblem:
cmoiromain wrote:indeed the pathfinder seems to go quite wrong. Attached is a piece of track your AI just build... I goes all over the place ^^

EDIT: damn, the thing crashed here as well...
Here is the error message.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 19 Apr 2009 18:26
by cmoiromain
But apparently my crash was fixed in the last release, so it must me another error on your side, thus the need for a screenshot...

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 19 Apr 2009 18:40
by Zuu
If the error is the same as cmoiromain got, it might have been sorted out in this case. But generally the exact contents of "a lot of red strings" as well as sometimes some of the black just before are very useful for the AI author to know what went wrong in the code.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 20 Apr 2009 05:39
by fanioz
Revision 62
Fix :: Crash with tile not exist (happened if found unused station)
Fix :: Building Head quarter is randomized
Fix :: Rail that came from the tile exactly beside of depot now redirected to come from in front of depot instead
New :: add rail connection detection (you may seen "null" sign walking)
davidx123 wrote:O.k Fanioz listen i really loved the fan AI,however,trans AI keeps crashing.
i download version 90418(the latest),and it doesn't work!i downloaded Aystart5 and whatever,but he keeps crashing.any ideas why?
If you still love FanAI, its still available on Bananas only, since I was deleted it from this forum and my harddisk too :)
I'm expected to make trans AI doing better, but let it still have same behaviour as FanAI is.
The bug you want to report, may be has been fixed today. but without screenshot it's hard to know what is the actual problem (zuu had better explained in post above : thanks zuu)
If the last of a non-red line is yellow line that said "Should not come here (xxx) Suspected -> (xxx)" it's a planned crash to detect an unexpected situation.

And about the crash that I've been fixed in this rev. :
This happened if the AI try to use existing rail station. Checking tiles around industry for a rail Station tile will give return 6 tiles (that is 2 tile platform in 3 tile length)
and calling each tile with AIRail.GetRailStationDirection(tile) will return an invalid result (not NW_SE nor NE_SW but '0' or '1') thus generating a planned crash.
I didn't really know if it was a bug with the API or that is the rule :-), however I've change the routine to call AIRail.GetRailStationDirection(tile) once for each valid station ID, no longer 6 call. and make a hack to check if the result was 0 so it prevent crash.

Trans AI 090420 now available at 2nd post of this thread and Bananas.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 20 Apr 2009 14:47
by davidx123
I loved the Fan ai,and i still love him.
his effors are just so brave!
oh,and irealy loved you small "good job ;-D" every time the AI did some thing rigth(that means most of the time ;))
i hope that the latest trans ai will work,if not ill post a screeshot of the problem.
EDIT:
nope,still the same ol' crash:
Wrenborough Transport, 1950-03-20.png
(122.59 KiB) Downloaded 88 times

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 20 Apr 2009 23:59
by fanioz
davidx123 wrote:I loved the Fan ai,and i still love him.
his effors are just so brave!
oh,and irealy loved you small "good job ;-D" every time the AI did some thing rigth(that means most of the time ;))
i hope that the latest trans ai will work,if not ill post a screeshot of the problem.
EDIT:
nope,still the same ol' crash:
1. It's weird since I'v not used yet the cost callback of rail pathfinder. But I'll try to find it out.
2. Your screen shoot said that the running Trans AI is 090418, FYI the latest is 090420.
Thanks for reporting.

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 21 Apr 2009 04:09
by davidx123
well,even now that i fixed the problem,and for some reason the revision or whatever is now 49025 as the Ai selection window shows me.
any way,i discovered i have not replaced,but added the latest to the old one,so the game chooses the old one,and when i have get rid of the old,i just need to check WA' happens.maybe my system requirements are low?
edit:
WHY???????!!!!!!
1951-06-09 ,DST.png
1951-06-09 ,DST.png (68.35 KiB) Viewed 3717 times

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 22 Apr 2009 04:39
by fanioz
davidx123 wrote:well,even now that i fixed the problem,and for some reason the revision or whatever is now 49025 as the Ai selection window shows me.
any way,i discovered i have not replaced,but added the latest to the old one,so the game chooses the old one,and when i have get rid of the old,i just need to check WA' happens.maybe my system requirements are low?
edit:
WHY???????!!!!!!
Well, it said 090425, because I'm actually planned to release it at that date, thus its purely typos :oops:
Right now, Im still work out with the bug you've reported, maybe in a few days it would be done. Thanks :D

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 22 Apr 2009 18:51
by davidx123
I'm glad that i helped.
by the way, i know you kinda busy with you own AI,but can you teach me how to write AI,the tutorial didn't teach me anything.could you help?
(if my English is to bad,blame the education office of Israel>:<,i can also speak in Russian,but yet again,i suck a grammar thingies and whatever)

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 23 Apr 2009 06:04
by fanioz
davidx123 wrote:I'm glad that i helped.
by the way, i know you kinda busy with you own AI,but can you teach me how to write AI,the tutorial didn't teach me anything.could you help?
1. Start reading from here
2. Make a fork from FanAI 090418 (or whatever version you have) and learning from it. :D
3. Make your own name and version based on that. :wink:
davidx123 wrote: (if my English is to bad,blame the education office of Israel>:<,i can also speak in Russian,but yet again,i suck a grammar thingies and whatever)
[OOT] You may forget, english isn't may mother language too. And I learn much english from this forum too. :lol:

===
Right Now, fixing a problem with the crash you've reported has been done. But I'd rather test-run it on my laptop first for about 24 hours before uploading on to Bananas/here. :D

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 23 Apr 2009 15:28
by davidx123
believe me or not,i am the know English better than most of my classmates.
and i'm in 8 grade!

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 25 Apr 2009 15:00
by davidx123
Nocab AI also crash,but because he try to dived by zero,and trans,well,for unknown reason.
but it looks the same.maybe after all the problem is in my PC?

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 25 Apr 2009 16:23
by Wold
Well, this is something that I've encountered

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 26 Apr 2009 00:07
by Morloth
davidx123 wrote:Nocab AI also crash,but because he try to dived by zero,and trans,well,for unknown reason.
but it looks the same.maybe after all the problem is in my PC?
Could you please provide a screenshot which shows the error? I'm currently unaware of this bug, thanks :).

Re: Trans AI :: Reborn (a.k.a Fan AI)

Posted: 26 Apr 2009 06:32
by fanioz
Wold wrote:Well, this is something that I've encountered

Trans AI 090426 has been released to day. Not much change, only bug fix and adjusted several operating parameters.
Still hope no more crash :D

Re: Trans AI :: 09-04-26 (a.k.a Fan AI)

Posted: 26 Apr 2009 11:04
by fanioz
Well, uploaded. a new valid tar one :D