Perhaps you could let lhrios comment on whether he finds it useful himself?petert wrote:Unfortunately, that error message is of little use to Ihrios
trAIns: An AI that plays only with trains (v2)
Moderator: OpenTTD Developers
Re: trAIns: An AI that plays only with trains
Re: trAIns: An AI that plays only with trains
Sorry for the long time to replay. I believe I have already correct this bug in newest version of trAIns (that I haven't published yet). If the problem persist, please send me a full screenshot with the line numbers.Felix Atagong wrote:A couple of posts I told how TrAIns will build stations even it if can't join them, and start building tracks even if it doesn't have enough money.
Same game, a couple of decades further and TrAIns manages to connect two stations and then...
Bigger screenshot with the beginning of the errors attached as well...
Regarding the problem of predicting the railroad cost, as Zuu explained, it is really difficult. The best solution for trAIns is to estimate the cost after the planning. This does not solve the problem but at least avoids part of the needless expenses.
Thank you for sending suggestions.
-
- Tycoon
- Posts: 1395
- Joined: 12 Jun 2004 00:37
- Location: United Kingdom of Great Britain and Northern Ireland
- Contact:
Re: trAIns: An AI that plays only with trains
I've just started a game and have the trAIns AI running. Using realistic acceleration and the American renewal trainset.
The problem is, the AI has built a nice coal route (and it is nice with a couple of quirks - nicely done), but the train it has built is completely unsuited to the task in that it can't climb a simple 2-cell-high hill. It slows to 1kph, though I'd swear it's slower.
The train has a tractive effort of 30kN and 450hp (4-4-0 American (Steam) type. The train has 144 tons of cargo capacity. I have the "freight multiplier" set to 4 (which I think is close to realistic). If it's 1, the train can make the hill.
Short version: The AI doesn't seem to take into account the freight multiplier when building trains.
The problem is, the AI has built a nice coal route (and it is nice with a couple of quirks - nicely done), but the train it has built is completely unsuited to the task in that it can't climb a simple 2-cell-high hill. It slows to 1kph, though I'd swear it's slower.
The train has a tractive effort of 30kN and 450hp (4-4-0 American (Steam) type. The train has 144 tons of cargo capacity. I have the "freight multiplier" set to 4 (which I think is close to realistic). If it's 1, the train can make the hill.
Short version: The AI doesn't seem to take into account the freight multiplier when building trains.
Re: trAIns: An AI that plays only with trains
I have a problem with this AI. I use 2cc trainset and UKRS. Realistic acceleration. 1.0.0 Beta2 Mac 10.5 PPC
See attachment (Under those black lines is /Users/My user folder.)
trAIns has not started yet. (Well, it built stations and before building trains, this.)
See attachment (Under those black lines is /Users/My user folder.)
trAIns has not started yet. (Well, it built stations and before building trains, this.)
Re: trAIns: An AI that plays only with trains
Sorry, but trAIns is only compatible with default train set. Some API functions are necessary to create a version that can play with 2CC or NARS. For example, there is no way to test (before buying the locomotive and the wagon) if a locomotive can pull a specific wagon. There are locomotives (Maglev in NARS, for example) can pull only "x" wagons. However, the API does not provide a way to gather this information. Some AIs are partially compatible adopting a "trial and error" strategy.Absolutis wrote:I have a problem with this AI. I use 2cc trainset and UKRS. Realistic acceleration. 1.0.0 Beta2 Mac 10.5 PPC
See attachment (Under those black lines is /Users/My user folder.)
trAIns has not started yet. (Well, it built stations and before building trains, this.)
Re: trAIns: An AI that plays only with trains
The API doesn't provide this information because it can't provide it. That logic is coded in the newgrf files and even OpenTTD only knows that it can't attach the wagons at the moment you try it.lhrios wrote:Sorry, but trAIns is only compatible with default train set. Some API functions are necessary to create a version that can play with 2CC or NARS. For example, there is no way to test (before buying the locomotive and the wagon) if a locomotive can pull a specific wagon. There are locomotives (Maglev in NARS, for example) can pull only "x" wagons. However, the API does not provide a way to gather this information. Some AIs are partially compatible adopting a "trial and error" strategy.
Re: trAIns: An AI that plays only with trains (v2)
This is the new version (v2) of trAIns. The full list of features can be found here. It needs to be tested more before be submitted to Bananas.
- Attachments
-
- trAIns.tar
- (400 KiB) Downloaded 214 times
Re: trAIns: An AI that plays only with trains (v2)
On your page, it says "trAIns - An AI for OpenTDD"lhrios wrote:This is the new version (v2) of trAIns. The full list of features can be found here. It needs to be tested more before be submitted to Bananas.
Re: trAIns: An AI that plays only with trains (v2)
The good:lhrios wrote:This is the new version (v2) of trAIns. The full list of features can be found here. It needs to be tested more before be submitted to Bananas.
Builds nice double lines all over the map, achieves high scores across the board. Those concentrated lines are nice with path-signal intersections.
Issues:
1.)
trAIns still can't start with a "hard" loan, i.e. $200k or even $300k for that matter. Suggested solution - first make it build some small (1-train if needed)-lines to get starting money, later the AI can delete these and start building its usual double lines (which are nice but require huge starting capital which the AI doesn't have).
2.)
trAIns doesn't upgrade bridges to newer/faster ones when they are available/when upgrading the rails.
3.)
trAIns spends so much time for looping/new connections (when there can hardly be built anything new) that it "doesn't have the time" to test for stations with 60 or less % transported, therefore it gets competition at those industries and/or such industries decrease production.
4.)
Signals on its double rails are too far (gaps too long) or not far enough apart (mostly on diagonal tracks).
Too far apart if looking from the point of view that a train has to wait the whole train-length before it can proceed down the line (especially when encountering Issue 5.)).
Not far enough apart - when Issue 5.) happens - i.e. trains wait to get to unloading station - because signals aren't one train-length apart, one train while reversing (if waiting too long) occupies two signal gaps instead of one.
5.)
Unloading stations are too small (only two lanes) for 23 to 50 trains that come to unload their cargo from multiple source industries to one factory/power station.
6.)
trAIns doesn't transport secondary/tertiary cargo, e.g. steel, goods. Although - this one didn't bother me - more for me to transport, but still, worth mentioning...
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 plays only with trains (v2)
Hi together.
Today the TrAIns AI crashed, when I was doing some testing with other AI's.
I think that it could not build a depot on the marked place in my screenshot and then crashed.
I played with the old version (v1) and Openttd 1.0 RC1.
Ok, hope you understand me and this report is helpful to you. Bye
Today the TrAIns AI crashed, when I was doing some testing with other AI's.
I think that it could not build a depot on the marked place in my screenshot and then crashed.
I played with the old version (v1) and Openttd 1.0 RC1.
Ok, hope you understand me and this report is helpful to you. Bye
Re: trAIns: An AI that plays only with trains (v2)
bug during upgrading railway (RV on crossing?)
- Attachments
-
- Przechwytywanie.PNG (77.61 KiB) Viewed 5786 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: trAIns: An AI that plays only with trains (v2)
Probably, what version was you using? If there was a vehicle in the road when it tries convert the track this will happen.
Re: trAIns: An AI that plays only with trains (v2)
From bananas / r19371
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: trAIns: An AI that plays only with trains (v2)
Hi, I found a little bug which let your AI crash.
I think the following code is false.
in railroad_manager.nut in line 768 & 778:
if(AIError.GetLastErrorString() == AIError.ERR_NOT_ENOUGH_CASH){
instead you should have written:
if(AIError.GetLastError() == AIError.ERR_NOT_ENOUGH_CASH){
GetLastErrorString is only for writing in the log and doesn't work here.
Bye.
I think the following code is false.
in railroad_manager.nut in line 768 & 778:
if(AIError.GetLastErrorString() == AIError.ERR_NOT_ENOUGH_CASH){
instead you should have written:
if(AIError.GetLastError() == AIError.ERR_NOT_ENOUGH_CASH){
GetLastErrorString is only for writing in the log and doesn't work here.
Bye.
Re: trAIns: An AI that plays only with trains (v2)
You are right. I will fix it as soon as possible.Steffl wrote:Hi, I found a little bug which let your AI crash.
I think the following code is false.
in railroad_manager.nut in line 768 & 778:
if(AIError.GetLastErrorString() == AIError.ERR_NOT_ENOUGH_CASH){
instead you should have written:
if(AIError.GetLastError() == AIError.ERR_NOT_ENOUGH_CASH){
GetLastErrorString is only for writing in the log and doesn't work here.
Bye.
Re: trAIns: An AI that plays only with trains (v2)
Wow, you're a fast man.
In so many lines of code there is always a place for some little bugs to hide .
In so many lines of code there is always a place for some little bugs to hide .
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: trAIns: An AI that plays only with trains (v2)
A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you you did very well!
Best areas of improvements now seem to be from this brief test: maybe you can try to add some air money maker in order to get fast(er) money for building more train routes? Due to a not very high income it'd be interesting to see whether the AI actually can build train networks... that'd be interesting to see
Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)
All in all: kudos, you did a great job
Best areas of improvements now seem to be from this brief test: maybe you can try to add some air money maker in order to get fast(er) money for building more train routes? Due to a not very high income it'd be interesting to see whether the AI actually can build train networks... that'd be interesting to see
Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)
All in all: kudos, you did a great job
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: trAIns: An AI that plays only with trains (v2)
Thank you! =) The feedback is very important for us.planetmaker wrote:A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you you did very well!
trAIns performance strongly depends on the scenario used. If the scenario has lot of water and an irregular landscape the path-finding will slow down and its performance will be negative affected. Regarding the networks, trAIns always tries to create them if "interesting" industries are near each other. If you want to see them, please try to run a test using a relative flat landscape with a high initial loan available.planetmaker wrote:Due to a not very high income it'd be interesting to see whether the AI actually can build train networks... that'd be interesting to see
Re: trAIns: An AI that plays only with trains (v2)
suggestion:
maybe you should let the ai build tunnels?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 plays only with trains (v2)
Wouldn't such a tunnel bankrupt the company?
Who is online
Users browsing this forum: No registered users and 24 guests