trAIns: An AI that plays only with trains (v2)
Moderator: OpenTTD Developers
trAIns: An AI that plays only with trains (v2)
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.
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 03 Aug 2014 23:29, edited 11 times in total.
Re: trAIns: An IA that play only with trains
An IA, you say? Interesting...
Re: trAIns: An AI that play only with trains
From the screenshots this looks quite good, I'll be shure to test it out and give you some feedback later
Re: trAIns: An AI that play only with trains
Wow, very impressive. I like the neat double rails.
Keep up the good work.
Keep up the good work.
PathZilla - A networking AI - Now with tram support.
Re: trAIns: An AI that play only with trains
i got this when i started it up
i'm on 0.7.2 if it matters
i'm on 0.7.2 if it matters
- Attachments
-
- Unnamed, 28th Jan 1950.png (207.4 KiB) Viewed 1305 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
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
Re: trAIns: An AI that play only with trains
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.
Re: trAIns: An AI that play only with trains
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
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
Re: trAIns: An AI that play only with trains
I think I have solved this problem.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.
Re: trAIns: An AI that play only with trains
I can think of some reasons:Xander wrote: 1) If you're not building buses yourself then is there any need to spend money on bridges over roads?
- 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.
Re: trAIns: An AI that play only with trains
Very good work, downloaded your new version and all works fine
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.
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) Viewed 1299 times
Re: trAIns: An AI that play only with trains
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) -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?
Some suggestions:
-build some planes to get starting money
(or some simple single lines with the two way depot and two trains) -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'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: trAIns: An AI that play only with trains
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)
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)
Re: trAIns: An AI that play only with trains
Hi again,
I'm dropping back in here again to support a suggestion SirkoZ has made:
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
I'm dropping back in here again to support a suggestion SirkoZ has made:
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).-GPL2?
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
Re: trAIns: An AI that play only with trains
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.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
Re: trAIns: An AI that play only with trains
Thanks a lot!Roujin wrote:Hi again,
I'm dropping back in here again to support a suggestion SirkoZ has made:The reason? Well, as I wrote already I am quite amazed by your pathfinder.-GPL2?
That is true, but it needs to be improved before the creation of a library.Roujin wrote:You wrote in several places that you hope your algorithms are useful to others, and I indeed think so
Ok, I am working in a new version of trAIns. I will release it using the GPL2.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
Some screenshoots of the new version:
Re: trAIns: An AI that play only with trains
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. - 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
- 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. - 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
Re: trAIns: An AI that play only with trains
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:
Source-code:
- 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;
Source-code:
Re: trAIns: An AI that play only with trains
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.
-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'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: trAIns: An AI that play only with trains
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.
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).
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.
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.
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.
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).
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.
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?
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: trAIns: An AI that play only with trains
Is the AI drunk? It can't walk straight ^^
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?
Who is online
Users browsing this forum: No registered users and 25 guests