Trans AI .:19.06.25 :.

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

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 18 Apr 2009 08:23

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:
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 18 Apr 2009 08:46

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.
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 19 Apr 2009 14:27

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?
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

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

Post by Zuu » 19 Apr 2009 15:40

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.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 19 Apr 2009 18:19

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.
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

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

Post by cmoiromain » 19 Apr 2009 18:26

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...
I am little, ugly, and nasty. How do you do?

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

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

Post by Zuu » 19 Apr 2009 18:40

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.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 20 Apr 2009 05:39

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.
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 20 Apr 2009 14:47

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
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 20 Apr 2009 23:59

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.
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 21 Apr 2009 04:09

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 3562 times
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 22 Apr 2009 04:39

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
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 22 Apr 2009 18:51

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)
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 23 Apr 2009 06:04

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
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 23 Apr 2009 15:28

believe me or not,i am the know English better than most of my classmates.
and i'm in 8 grade!
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

User avatar
davidx123
Traffic Manager
Traffic Manager
Posts: 146
Joined: 21 Feb 2008 19:05
Location: boring city in the middle of nowhere,Israel.
Contact:

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

Post by davidx123 » 25 Apr 2009 15:00

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?
Your Faithful Student, Twilight Sparkle.
____
Visit my screenshot thread
Image


thanks to Supercheese for help with the GIF.cheers.

Wold
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 03 Aug 2006 19:32
Skype: woldy_bg
Location: Bulgaria

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

Post by Wold » 25 Apr 2009 16:23

Well, this is something that I've encountered
Attachments
Unnamed, 1st May 1960.png
(54.47 KiB) Downloaded 83 times
Image

Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

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

Post by Morloth » 26 Apr 2009 00:07

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 :).

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 26 Apr 2009 06:32

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
Correct me If I am wrong - PM me if my English was bad :D

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

User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

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

Post by fanioz » 26 Apr 2009 11:04

Well, uploaded. a new valid tar one :D
Correct me If I am wrong - PM me if my English was bad :D

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

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests