Trans AI .:19.07.23 :.
Moderator: OpenTTD Developers
Trans AI .:19.07.23 :.
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 . Ah.. not must be like that, in fact I really only need a name.
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, Train, 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. A version of 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.
The following items are configurable inside game (you've to set the difficulty setting to "custom") ::
- Vehicle to use
- Build Sign
- Dump Log
- Build pathfinder sign
-type "start_ai trans" in your OpenTTD console
Note:
-You would need at least OpenTTD 1.3 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 https://github.com/fanioz/AI-Trans/issues
TODO :
- Always fix coding style to follow 'OTTD/Doxygen standard'
- Always Bug fixing
- Be SMART
-----------------------------------------------------------
Trans is an effort to be a transporter.
Build first, improve later, No Final Version.
Trans AI repositories
https://github.com/fanioz/AI-Trans/
Change log
see changelog.txt
Road Map
see Roadmap
===============================
Manual Download
Libraries:
Hello all, here now an AI player for OpenTTD named 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, Train, 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. A version of 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.
The following items are configurable inside game (you've to set the difficulty setting to "custom") ::
- Vehicle to use
- Build Sign
- Dump Log
- Build pathfinder sign
-type "start_ai trans" in your OpenTTD console
Note:
-You would need at least OpenTTD 1.3 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 https://github.com/fanioz/AI-Trans/issues
TODO :
- Always fix coding style to follow 'OTTD/Doxygen standard'
- Always Bug fixing
- Be SMART
-----------------------------------------------------------
Trans is an effort to be a transporter.
Build first, improve later, No Final Version.
Trans AI repositories
https://github.com/fanioz/AI-Trans/
Change log
see changelog.txt
Road Map
see Roadmap
===============================
Manual Download
Libraries:
Last edited by fanioz on 23 Jul 2019 00:00, edited 63 times in total.
Download Section
Download Area
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.
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.
Last edited by Chrill on 11 Apr 2018 08:39, edited 64 times in total.
Reason: Removed file download on user's request
Reason: Removed file download on user's request
Re: New Comer: Fan AI
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. 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
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. 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
- Attachments
-
- and this 5th year (1950-1955)
- 5th_year.PNG (52.13 KiB) Viewed 55650 times
-
- Engineer
- Posts: 34
- Joined: 01 Mar 2009 19:56
Re: New Comer: Fan AI
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:
http://www.tt-forums.net/viewtopic.php? ... 86#p772286
http://www.tt-forums.net/viewtopic.php? ... 86#p772286
Re: New Comer: Fan AI
I've introduced IOrder::SkipToOrder() in r15684.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).
You shouldn't ever call AIEventController.InsertEvent from your AI (I've made that more clear now in the docs).
Re: New Comer: Fan AI
You're right, the current performance is still need to improve. thank youdefaultluser 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:
http://www.tt-forums.net/viewtopic.php? ... 86#p772286
Thank you yexo, I 'll try itYexo 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).
Re: New Comer: Fan AI
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)
: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
: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)
: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
Re: Trans AI :: Reborn (a.k.a Fan AI)
:Made announcement for new Project.
:Updated the first post.
=========================
:Updated the first post.
=========================
Re: Trans AI :: Reborn (a.k.a Fan AI)
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 Download link in the 2nd post
=========================================
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 Download link in the 2nd post
Re: Trans AI :: Reborn (a.k.a Fan AI)
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 .
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
-
- Error message
- Unnamed, 1st Mar 1951.png (25.6 KiB) Viewed 5381 times
Re: Trans AI :: Reborn (a.k.a Fan AI)
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.
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.
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Trans AI :: Reborn (a.k.a Fan AI)
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.
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) Viewed 5341 times
I am little, ugly, and nasty. How do you do?
Re: Trans AI :: Reborn (a.k.a Fan AI)
So, construction style of "good old AI" returns? :)
How do you manage to construct this style of tracks?
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)
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)
Re: Trans AI :: Reborn (a.k.a Fan AI)
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.
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)
Junctioneer (a traffic intersection simulator)
Re: Trans AI :: Reborn (a.k.a Fan AI)
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.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.
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Trans AI :: Reborn (a.k.a Fan AI)
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. 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!
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. 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?
Re: Trans AI :: Reborn (a.k.a Fan AI)
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
And now, time to answer/respond your suggestion/feedback ..
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
And now, time to answer/respond your suggestion/feedback ..
Re: Trans AI :: Reborn (a.k.a Fan AI)
I've adjusted a cost little bit, still found unnecessary bridge there but not as much as yesterday version. Thanks Morloth.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 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 thanks for testing.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.
However the crash you're reported has been fixed today.
Re: Trans AI :: Reborn (a.k.a Fan AI)
mmm.. I didn't mean to be the "good old AI". (can't stop laughing right now)Bilbo wrote:So, construction style of "good old AI" returns?
How do you manage to construct this style of tracks?
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
Who is online
Users browsing this forum: No registered users and 3 guests