Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Feb 21, 2017 7:06 pm

All times are UTC




Post new topic  Reply to topic  [ 192 posts ]  Go to page 1 2 3 4 510 Next
Author Message
PostPosted: Tue Mar 10, 2009 5:20 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Attachment:
scr-demo.png
scr-demo.png [ 43.02 KiB | Viewed 27014 times ]

Hello all, here now an AI player for OpenTTD named Trans. Project started at Sunday, February 01, 2009 as Fan AI. After looking for this AI name for a few months, finally I've found TRANS, wich is Train_Road-vehicle_Aircraft_N_Ship :D . Ah.. not must be like that, in fact I really only need a name. :lol:
There are many AI's available, and this one is not good enough to beat them :-)

Description:
Trans is an AI for OpenTTD. It try to transporting cargoes from/to any towns and industries using Bus, Truck, Tram, Aircraft and Ship. In the future it would try to use all available vehicles. Current strategy is try to use only one type of industry (if possible) as the destination of transporting cargo named "Cargo Concept", As described in openttd-coop

Short Name ID:
FTAI => Fanioz Trans AI :

Version numbering:
The version number is in YYMMDD format. Latest version was 100307, mean it was released at 7th of March 2010.

Usage:
-Download file (from Bananas-"In Game Content Download")
-Open AI configuration window and you have an options.
Attachment:
setting.png
setting.png [ 10.5 KiB | Viewed 27014 times ]

note : -"Allow build Rail vehicle" would only take effect once available

The following items are configurable inside game (you've to set the difficulty setting to "custom") ::
- Vehicle to use
- Build Sign
- Dump Log


-type "start_ai trans" in your OpenTTD console

Note:
-You would need at least OpenTTD RC-1 to run
-Please, report the bug(s) or something absurd that build by this AI (attach the screen shoot too)
-Bug report/suggestion/feature request could be made on this thread or http://noai.openttd.org/projects/ai-trans/issues/new

TODO :
- Always fix coding style to follow 'OTTD/Doxygen standard'
- Always Bug fixing
- Be SMART :P
-----------------------------------------------------------
Trans is an effort to be a transporter.
Build first, improve later, No Final Version.

Trans On OpenTTD NoAI
http://noai.openttd.org/projects/show/ai-trans

Change log
see changelog.txt

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

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


Last edited by fanioz on Mon Jul 22, 2013 1:23 pm, edited 52 times in total.

Top
   
 Post subject: Download Section
PostPosted: Tue Mar 10, 2009 10:05 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Download Area

Attachment:
File comment: 10-03-07
Trans_AI.100307.tar [240 KiB]
Downloaded 1651 times


Libraries is needed to download if you haven't. Simply click link below. (don't forget to extract the *.gz one)

Trans AI would need :
1. Fibonacci Heap 2
2. AI Library - Common
3. AI Library - List (improvement of AIList)

Put in your ....\content_download\ai\library folder.

Code host :
provided by noai Project site at http://noai.openttd.org/svn/ai-trans
If you want to see the latest code, make a branch or patch of it, check it out.

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

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


Last edited by fanioz on Sat Jun 12, 2010 5:21 pm, edited 63 times in total.

Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Wed Mar 11, 2009 6:49 pm 
Offline
Engineer
Engineer

Joined: Wed Jan 28, 2009 10:20 pm
Posts: 9
Great! I'm going to test it now!

_________________
Webhosting - http://www.ejac.nl


Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Thu Mar 12, 2009 1:38 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Change Log :: 90312

fix ::Sleep value < 0
fix :: some typos
fix:: forget to remark un-finished generator code
change some operational parameter.
fix:: even handler on vehicle lost and unprofitable
:: problem :: Can't found AIOrder.SkipOrderCurrent(vehicle_ID) in API (to skip current order)
:: problem :: AIEventController.InsertEvent <- index not exist (some time, on runtime)
fix:: Road Station Heading & Building (Join Distance Station)

Note:
this is just a test case, result of 2nd year (1950-1951). Standard generated map with 256*256. Difficulty level = medium. No NewGRF at all. Run on OpenTTD beta2.
Attachment:
File comment: 1950-1951
2nd_year.png
2nd_year.png [ 26.63 KiB | Viewed 37401 times ]


Right now, I can't update the content server, because it doesn't recognize well other .nut file.

Unknown file in pack: changelog.txt

Fixing mean, re-tar-ing the file, and force me to use *nix clone, wich is not available now. Maybe later :lol:


Attachments:
File comment: and this 5th year (1950-1955)
5th_year.PNG
5th_year.PNG [ 52.13 KiB | Viewed 37403 times ]

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

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Thu Mar 12, 2009 2:37 am 
Offline
Engineer
Engineer

Joined: Sun Mar 01, 2009 7:56 pm
Posts: 30
You sure it's doing that well? I just played a 512x512 Hard map (300k start loan), and Fan AI isn't doing so well. See here:

viewtopic.php?f=65&t=42247&p=772286#p772286


Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Thu Mar 12, 2009 11:47 am 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
fanioz wrote:
:: problem :: Can't found AIOrder.SkipOrderCurrent(vehicle_ID) in API (to skip current order)
:: problem :: AIEventController.InsertEvent <- index not exist (some time, on runtime).

I've introduced IOrder::SkipToOrder() in r15684.
You shouldn't ever call AIEventController.InsertEvent from your AI (I've made that more clear now in the docs).


Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Fri Mar 13, 2009 3:17 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
defaultluser wrote:
You sure it's doing that well? I just played a 512x512 Hard map (300k start loan), and Fan AI isn't doing so well. See here:

viewtopic.php?f=65&t=42247&p=772286#p772286

You're right, the current performance is still need to improve. thank you :D

Yexo wrote:
I've introduced IOrder::SkipToOrder() in r15684.
You shouldn't ever call AIEventController.InsertEvent from your AI (I've made that more clear now in the docs).


Thank you yexo, I 'll try it :bow:

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

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


Top
   
 Post subject: Re: New Comer: Fan AI
PostPosted: Wed Mar 18, 2009 8:07 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Change Log ::
:Adjust: some operating parameters
:fix: road station building, now use AITileList_IndustryProducing/Accepting
:fix: Vehicle group name have leading zero if it is below 10 (some one PM-me about this issue) :D
:fix:Better handling on vehicle unprofitable (after AIOrdr.SkipToOrder is available)

New (experimental) : Use conditional order to prevent congestion

min. requirement : OpenTTD 0.7.0 RC-1 (or latest trunk)

And still getting hard for this "FAirly_Naive_AI" (FANAI) to beat prior AI :roll: :lol:

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

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


Top
   
PostPosted: Mon Apr 06, 2009 8:39 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
:Made announcement for new Project.
:Updated the first post.
=========================

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

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


Top
   
PostPosted: Fri Apr 17, 2009 3:51 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Development milestone to Trans AI 090417

=========================================
Remove :: Conditional order on loading

Fix :: Loading save game will not try to rename President Name anymore
Fix :: Try to replace vehicle after 2 year
Fix :: More event handling
Fix :: recode the service generator
Fix :: Un-grouped vehicle now moved to its group
Fix :: Add vehicle to station by cargo waiting
Fix :: Train can't detect whether the second line has been built or not
Fix :: Typos in rail pathfinder

New :: Add depot near destination
New :: Conditional Order for servicing on destination depot if required.
New :: Try to rename Drop Off Station (1, 2, ...)
New :: Try to handle Industry -> Town cargo (water, good, food)
New :: Try to support save / load (known problem : not work in the middle of building station/depot)
New :: Try to use train for servicing, if failed fall back to road vehicle
New :: Detect a number of vehicle in front off station and inside rail depot
New :: Add a little bit randomization to allow run with same instance
New :: Try to implement "be nice" (to SirkoZ) :-)
New :: Simple Flattening land to build rail station
New :: Support New GRF for Rail Stations

Internal :: Restructure folders and files
Internal :: Try to debug nicely
Internal :: Aystar.5 and BinaryHeap.1 not included anymore
Internal :: Try to (re)write more documentation
Internal :: Used pathfinder :
- Road Path Finder as discussed here
- Rail Path Finder as discussed here

However you may still found "old school" AI here :lol:
Attachment:
old_school.png
old_school.png [ 130.22 KiB | Viewed 35839 times ]


Download link in the 2nd post

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

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


Top
   
PostPosted: Fri Apr 17, 2009 6:01 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Feb 07, 2008 2:06 pm
Posts: 376
Location: Glasgow
Nice work fanioz,

Couple of comments about your pathfinder, it seems to very very bridge happy. Often building bridges where it has no advantage (see the screenshot in your latest post) and I also get some pretty 'interesting' track sometimes (couldn't reproduce at time of writing :/). I had similar problems when I set the cost of building bridges to low, in which case the pathfinder will find building bridges cheaper than building normal tracks.

Besides that I get an error message which is in the included screenshot. Otherwise well done and congrats on including train support :).


Attachments:
File comment: Error message
Unnamed, 1st Mar 1951.png [25.6 KiB]
Downloaded 146 times
Top
   
PostPosted: Fri Apr 17, 2009 1:51 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
:oops: that is just a typos, and not enough testing time. Thanks Morloth, However the update would be available at least tomorrow,due to version numbering.
About the bridge, I think thats because the neighbour function in path finder doesn't mark that tile as rail buildable, thus the path builder interpreting it as a request to build bridge over an ignored tile.

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

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


Top
   
PostPosted: Fri Apr 17, 2009 4:07 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 15, 2007 9:45 pm
Posts: 655
Location: FRANCE
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.


Attachments:
bug.png [438.33 KiB]
Downloaded 178 times
crash.png [24.7 KiB]
Downloaded 106 times

_________________
I am little, ugly, and nasty. How do you do?
Top
   
PostPosted: Fri Apr 17, 2009 5:02 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
So, construction style of "good old AI" returns? :)

How do you manage to construct this style of tracks?

_________________
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)


Top
   
PostPosted: Fri Apr 17, 2009 5:26 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4516
Location: /home/sweden
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. :)

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


Top
   
PostPosted: Fri Apr 17, 2009 5:44 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
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. :)

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.


Top
   
PostPosted: Sat Apr 18, 2009 12:02 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 15, 2007 9:45 pm
Posts: 655
Location: FRANCE
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.
Attachment:
better rails.png [691.12 KiB]
Downloaded 115 times

Another thing, I don't understand why it builds two way exit signals at stations, there is no rational reason for that is there?

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.

I really love to play with train building AIs, I do hope this one will become even better! Keep up the good work!

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


Top
   
PostPosted: Sat Apr 18, 2009 7:56 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
TRANS AI 090418
Revision 59
Fix :: Typos in vehicle detection
Fix :: Now, used combo type signal on rail station instead of exit type to make the train waiting inside of depot.
Fix :: wrong calculation of signal positioning has been corrected
Fix :: Build signal on existing signal will cycle signal type, so must do detect it before build.
Revision 60
Fix :: Issue with send vehicle to depot. (hope it fine now)
Fix :: adjustment little bit at rail path finder
Revision 61
Fix :: Combo signal has a 'feature', fall back to exit signal, and add entry signal too.
Fix :: un grouped vehicle after replacement now bounded to it group again

I hope no more red box crash there, Happy playing :D

And now, time to answer/respond your suggestion/feedback ..

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

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


Top
   
PostPosted: Sat Apr 18, 2009 8:04 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Morloth wrote:
Nice work fanioz,

Couple of comments about your pathfinder, it seems to very very bridge happy. Often building bridges where it has no advantage (see the screenshot in your latest post) and I also get some pretty 'interesting' track sometimes (couldn't reproduce at time of writing :/). I had similar problems when I set the cost of building bridges to low, in which case the pathfinder will find building bridges cheaper than building normal tracks.

Besides that I get an error message which is in the included screenshot. Otherwise well done and congrats on including train support :).

I've adjusted a cost little bit, still found unnecessary bridge there but not as much as yesterday version. Thanks Morloth.
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.

I could not understand whats wrong with that, as long as the rail is connected, for me it is not wrong, it just a (what to say exactly?) abnormal/ un - natural rail building :lol: thanks for testing.
However the crash you're reported has been fixed today.

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

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


Top
   
PostPosted: Sat Apr 18, 2009 8:13 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Bilbo wrote:
So, construction style of "good old AI" returns? :)

How do you manage to construct this style of tracks?

mmm.. I didn't mean to be the "good old AI". :mrgreen: (can't stop laughing right now)
I don't know exactly the reason, but it seem because I gave 2 input for both source and goals. The goals has an estimated_tile routine but not the sources, So the pathfinder is "splitted" before going to the right direction of source. Right now, for me, it is the safest way to connect both side of a station on limited buildable space. Maybe later will change again. Thanks :D

_________________
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  [ 192 posts ]  Go to page 1 2 3 4 510 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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-2017 phpBB Limited

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