Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Dec 15, 2018 9:57 pm

All times are UTC




Post new topic  Reply to topic  [ 70 posts ]  Go to page 1 2 3 4 Next
Author Message
PostPosted: Tue Aug 11, 2009 7:37 pm 
Offline
Engineer
Engineer

Joined: Sun Dec 28, 2008 12:16 am
Posts: 22
Newest post here!

Description: trAIns is based on a previous work reported in this post. It is a competitive AI that plays only with trains. It creates and manages railroad routes that connects industries and railroad routes that connects two towns. The last can transport passengers. It is also partially compatible with NARS and 2CC.

The list of features and more details can be found here.

Bugs and/or suggestions: Please, use this thread.


Last edited by lhrios on Sun Aug 03, 2014 11:29 pm, edited 11 times in total.

Top
   
PostPosted: Tue Aug 11, 2009 7:40 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Fri May 18, 2007 12:47 pm
Posts: 485
Location: Oxford
An IA, you say? Interesting... :P

_________________
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence


Top
   
PostPosted: Tue Aug 11, 2009 7:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Aug 03, 2009 2:29 pm
Posts: 1418
Location: Manchester
From the screenshots this looks quite good, I'll be shure to test it out and give you some feedback later :mrgreen:

_________________
==Flickr==


Top
   
PostPosted: Tue Aug 11, 2009 8:03 pm 
Offline
Director
Director
User avatar

Joined: Tue Jan 22, 2008 4:33 pm
Posts: 565
Wow, very impressive. I like the neat double rails.

Keep up the good work.

_________________
PathZilla - A networking AI - Now with tram support.


Top
   
PostPosted: Tue Aug 11, 2009 8:14 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
i got this when i started it up

i'm on 0.7.2 if it matters


Attachments:
Unnamed, 28th Jan 1950.png [207.4 KiB]
Downloaded 160 times

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Top
   
PostPosted: Tue Aug 11, 2009 8:16 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Aug 03, 2009 2:29 pm
Posts: 1418
Location: Manchester
I got that too on 7.1, I thought upgrading to 7.2 would fix it; I haven’t been able to test it on 7.2 yet due to and unexpected error.

_________________
==Flickr==


Top
   
PostPosted: Tue Aug 11, 2009 8:19 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Fri May 18, 2007 12:47 pm
Posts: 485
Location: Oxford
Initial impression is very impressive.

trAIns didn't go straight to the nearest power plant but instead took the line a good distance, to earn good money on each run. The double tracking looks great.

Only 2 real niggles and they really are minor.

1) If you're not building buses yourself then is there any need to spend money on bridges over roads?

2) In the image I've attatched trAIns built two lines from coal mines to power plants. The second line stopped at the power plant in the bottom of the image when all it needed was a little more investment to connect to the existing tracks and go to a power plant even further away, netting more money. It's really not an issue, just a refinement you might want to investigate.

Otherwise, 9/10 - looks great, plays great. An excellent debut onto the AI scene :)

_________________
Real Tycoons do it on Trains!

JAMI: Just Another Moronic Intelligence


Top
   
PostPosted: Tue Aug 11, 2009 8:35 pm 
Offline
Engineer
Engineer

Joined: Sun Dec 28, 2008 12:16 am
Posts: 22
lawton27 wrote:
I got that too on 7.1, I thought upgrading to 7.2 would fix it; I haven’t been able to test it on 7.2 yet due to and unexpected error.


I think I have solved this problem.


Top
   
PostPosted: Tue Aug 11, 2009 9:08 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Wed Dec 07, 2005 7:22 pm
Posts: 272
Xander wrote:
1) If you're not building buses yourself then is there any need to spend money on bridges over roads?


I can think of some reasons:

  • Pathfinding is hard.
  • Roads are a special case of AITile.IsBuildable() == false. So just treating them as "bridgeable" along with rails is easier in some respects.
  • The Ai might want to add busses in the future. (Doubtful based on the name and mission statement, but D&RG has bus plans in V2).
  • Trains hit busses and that's not very nice. :D

_________________
Denver & Rio Grande Railroad AI


Top
   
PostPosted: Tue Aug 11, 2009 9:32 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Aug 03, 2009 2:29 pm
Posts: 1418
Location: Manchester
Very good work, downloaded your new version and all works fine :mrgreen:
it builds tracks nice, in fact similar to how a human would, (well at least me).
I found one problem it got stuck trying to find a path and just stood their doing nothing for ages, maybe add a pathfinder timeout, i resorted to doing some teraforming for it to get it to find a path, (see pic).
Later on it got stuck again for a rather obvious reason, it was trying to build efectivly over a station and then across a huge sea.

Besides from the pathfinder I've had no other problems and I'm very impressed by this ai.

A few ideas:

it likes coal, but coal can get a bit boring all of the time, does it do anything else? some passengers too would be nice.

Work on the pathfinder, I look forward to a new release, I don't know the ai script but I can imagine pathfinding is hard keep working at it and you'll have a great ai here.


Attachments:
Cunnbury Transport, 16th Dec 1951.png [81.02 KiB]
Downloaded 154 times

_________________
==Flickr==
Top
   
PostPosted: Sat Aug 15, 2009 11:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
Nice to see your development of AI now in noAI-AI form, Ihrios.

Some suggestions:
-build some planes to get starting money :-)
(or some simple single lines with the two way depot and two trains)
Attachment:
File comment: two way depot - simple line for two trains
Pinningville Transport, 4th Feb 1950.png
Pinningville Transport, 4th Feb 1950.png [ 11.53 KiB | Viewed 10532 times ]

-use conditional order service at depot if reliability <50% or such, better than constant servicing - can really slow down the unloading station traffic
-perhaps 3-lane unloading station with trains from many different source going to it
-upgrading the suspension bridges to tubular (I'm not sure if it's already done)...was too sleepy to wait the game to roll some more...
-GPL2? :-)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Sat Aug 15, 2009 11:43 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
I just tried you AI out and I can only say: Impressive. I really like your pathfinder. That's exactly how I would build those tracks...

edit: Maybe you'd like to make the routines you're using available as an AI library for other AI authors? They're really neat from what I see (only looked at the game, not the code though)
:bow:

_________________
* @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: Sun Aug 16, 2009 10:06 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Hi again,

I'm dropping back in here again to support a suggestion SirkoZ has made:
Quote:
-GPL2? :-)


The reason? Well, as I wrote already I am quite amazed by your pathfinder. You wrote in several places that you hope your algorithms are useful to others, and I indeed think so - I've been collecting ideas for an own AI for some time now, and I've noticed that that the rails your pathfinder builds are very much like what I'd like my AI to build. So I'd like to reuse this part (rail building) of your AI in my AI, whereas I plan to let my AI different "bigger picture" than your AI (more emphasis on networking than being most competitive).
I read the LICENSING file of GPLv3, and understand that of course I may reuse parts of your AI (that's the spirit of GPL after all) BUT, I must also license my work under the GPLv3 or later.
On the other hand, the OpenTTD devs have constructed a project site for AI authors including all sorts of useful tools that I would like to use. Unfortunately, the use of this service is limited for works licensed under the GPLv2, which I cannot do if I use parts of your AI.

So, long story short, I would appreciate if you could make this possible somehow. I have heard about such things as licensing a work under both GPLv2 and GPLv3, so afaik it's possible - you may want to double check and/or ask someone more knowledgable about open source licenses than me though.

I'm looking forward to your answer :)

_________________
* @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: Sun Aug 16, 2009 10:35 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Wed Dec 07, 2005 7:22 pm
Posts: 272
Roujin wrote:
I have heard about such things as licensing a work under both GPLv2 and GPLv3, so afaik it's possible - you may want to double check and/or ask someone more knowledgable about open source licenses than me though.

I'm looking forward to your answer :)


The copywright owner (original author) in this case may license software however they see fit, and under different terms. So this shouldn't be a problem should the author decide to add a license.

_________________
Denver & Rio Grande Railroad AI


Top
   
PostPosted: Wed Aug 19, 2009 1:50 pm 
Offline
Engineer
Engineer

Joined: Sun Dec 28, 2008 12:16 am
Posts: 22
Roujin wrote:
Hi again,

I'm dropping back in here again to support a suggestion SirkoZ has made:
Quote:
-GPL2? :-)


The reason? Well, as I wrote already I am quite amazed by your pathfinder.

Thanks a lot!
Roujin wrote:
You wrote in several places that you hope your algorithms are useful to others, and I indeed think so

That is true, but it needs to be improved before the creation of a library.
Roujin wrote:
- I've been collecting ideas for an own AI for some time now, and I've noticed that that the rails your pathfinder builds are very much like what I'd like my AI to build. So I'd like to reuse this part (rail building) of your AI in my AI, whereas I plan to let my AI different "bigger picture" than your AI (more emphasis on networking than being most competitive).
I read the LICENSING file of GPLv3, and understand that of course I may reuse parts of your AI (that's the spirit of GPL after all) BUT, I must also license my work under the GPLv3 or later.
On the other hand, the OpenTTD devs have constructed a project site for AI authors including all sorts of useful tools that I would like to use. Unfortunately, the use of this service is limited for works licensed under the GPLv2, which I cannot do if I use parts of your AI.

So, long story short, I would appreciate if you could make this possible somehow. I have heard about such things as licensing a work under both GPLv2 and GPLv3, so afaik it's possible - you may want to double check and/or ask someone more knowledgable about open source licenses than me though.

I'm looking forward to your answer :)


Ok, I am working in a new version of trAIns. I will release it using the GPL2.
Some screenshoots of the new version:

Attachment:
trAIns.png
trAIns.png [ 67.64 KiB | Viewed 10286 times ]

Attachment:
trAIns_2.png [57.83 KiB]
Downloaded 63 times


Top
   
PostPosted: Thu Aug 20, 2009 8:02 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Mar 22, 2009 7:24 am
Posts: 81
Location: Haarlem, The Netherlands
I really love the way it builds double rails. I have three suggestions:

- when a path is found, why not let it check the path again? It happens oftenly that another AI (I'm playing a duo game with NoCAB) builds something in the way of trAIns.
- (see attached image) -- it builds these routes quite oftenly. When trying to travel over a road with bridges or just for no reason. I don't see how it's pathfinding comes out more positive then just a straight track.
Attachment:
File comment: Non-straight track where straight was possible.
Predhead Transport, 15th Feb 1980.png
Predhead Transport, 15th Feb 1980.png [ 136.16 KiB | Viewed 10202 times ]

- EDT: it doesn't stop pathfinding. When there's a huge lake in the middle of two stations, it'll just continue for years. x_x


Top
   
PostPosted: Mon Aug 24, 2009 2:29 pm 
Offline
Engineer
Engineer

Joined: Sun Dec 28, 2008 12:16 am
Posts: 22
I want to thank everyone who tested trAIns and/or suggested some modifications. It's not possible to implement all suggestion but some were used. Here is a small list of features:

  • Double railways;
  • Can create simple networks sharing part of railroads;
  • Can change the locomotive or rail type of already constructed railroads;
  • Adjusts the number of vehicles according to the production;
  • Build relative long railways (250 tiles);
  • Two kinds of arrangements for railroad stations;
  • GPLv2;

Main correction: Path finding won't freeze the AI anymore;

Source-code:
Attachment:
trAIns.tar [330 KiB]
Downloaded 308 times


Top
   
PostPosted: Tue Aug 25, 2009 4:41 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
List of flaws (to fix):
-mandatory servicing
-no unload (with no loading) orders
-no autorenew
-no upgrade of bridges to tubular for e.g. Lev4.

Laying tracks as before - flawless.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Wed Aug 26, 2009 2:01 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 15, 2007 9:45 pm
Posts: 655
Location: FRANCE
Hi

First of all, I really love your AI. Other train building AIs are nice, but none have the building style which I like to see in my games.

I just decided to run a game with only trAIns, nothing else, to see how it goes. Immediately it started to build pretty networks all over the map.

Here are a few remarks I want to point out, to make the pathfinding even better.

Attachment:
weird1.png [141.07 KiB]
Downloaded 47 times


Here, I think the AI is trying to link the coal mine at the bottom left to the power plant at the top. IMO it should instead link the coal mine to the power plant that is at the end of the line that disappears at the bottom of the screen (as it did with the other three coal mines already linked to is).

Attachment:
weird2.png
weird2.png [ 120.38 KiB | Viewed 9729 times ]


This is a closeup on where the three lines merge. I think some improvement can be made there. The bottom one could have this tight turn removed, and the top one could have been replaced by a straight line, connecting to the main line closer to where the bottom one links.

Attachment:
weird3.png
weird3.png [ 107.54 KiB | Viewed 9731 times ]


I think those bridges are unnecessary, it would be better tu go arround the lake rather than over it. OTOH, I don't know which of the two is cheaper.

More on the following post.

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


Top
   
PostPosted: Wed Aug 26, 2009 2:09 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 15, 2007 9:45 pm
Posts: 655
Location: FRANCE
Attachment:
weird4.png
weird4.png [ 71.86 KiB | Viewed 9720 times ]


This is just a little detail, but there is a bump on the line that could have been terraformed. It would look better, and be better for the trains.

Attachment:
weird5.png
weird5.png [ 102.5 KiB | Viewed 9723 times ]


Is the AI drunk? It can't walk straight ^^

Attachment:
weird6.png
weird6.png [ 102.18 KiB | Viewed 9710 times ]


Two things ot say about this one. First, the AI should have built the station to get the cargo from both coal mines. Second, and this is a global remark about the AI, using presignals there isn't IMO the best solution: if a lost train arrives here, the pathfinder doesn't know how to handle turning around. In this particular case, the train will not stop at the entrance signal, and wil block the whole station. Path signals would suit better here, because they would both prevent that problem and allow a better flow.

That's it. Hope you can improve those points, to make the AI even better.

Keep up the good work!

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 70 posts ]  Go to page 1 2 3 4 Next

All times are UTC


Who is online

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