Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Sep 25, 2018 6:12 am

All times are UTC




Post new topic  Reply to topic  [ 254 posts ]  Go to page Previous 19 10 11 12 13 Next
Author Message
PostPosted: Mon May 14, 2012 9:34 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Oh, and don't mind flyspray (the bugtracker for reporting bugs in OpenTTD, see http://bugs.openttd.org/), I already reported it, and now I'm going to request its deletion because it turned out that this is not an OpenTTD bug.


Top
   
PostPosted: Mon May 14, 2012 10:30 pm 
Offline
Engineer
Engineer

Joined: Wed Dec 14, 2011 12:55 am
Posts: 28
This Ai need support range since when using range supported plane
or airplane will refuse flying




Bug 1

1. found a bug when using train grf with logic trains break AI thinks Logic trains better but cant haul wagons and freight ,

also seen in certain AIs


Attachments:
File comment: cant haul wagons
Bundwood Transport, 2nd Sep 1950.png [111.34 KiB]
Downloaded 15 times
File comment: Logic train breaks AI NUTS trains
Bundwood Transport, 4th May 1951.png [96.01 KiB]
Downloaded 15 times
Unnamed, 12th Sep 1953.png [269.5 KiB]
Downloaded 15 times
Top
   
PostPosted: Tue May 15, 2012 3:04 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Thanks for the report.
NewGRF trainsets and track sets are not (yet) supported, although I have already started some work to include NewGRF trainset support. I'll probably have some time to finish it in the summer. Range-limited planes are also not supported.
Hopefully version 7 will have both these features :)

And the third screenshot is some serious oldAI-ism :mrgreen: Luckily it doesn't occur too frequently, and it doesn't cause further problems, only the attention of the AI is drawn away for quite some time. This could be solved by adding some blacklist to the pathfinder.


Top
   
PostPosted: Fri Oct 19, 2012 12:23 pm 
Offline
Engineer
Engineer

Joined: Sun Sep 23, 2012 5:29 pm
Posts: 25
Though I can see from the posts above me the issue is probably already under advisment, it was pointed out to me that I should mention that in my last game using SimpleAI, where I was using the 2CC trainset, as soon as monorails became available, the AI started trying to build them for railways exclusively, and struggled because there were no freight engines available to it. (Towards the end of the game, when there wasn't much room left, the AI stuck to using roads, fortunately.) I had a error messages a couple of times, which I think were most likely due to this - I recall it was something about "vehicle does not exist", and I think tended to come up after I'd loaded a save. I reset the AI the first time, but when it happened sometime later (I cycled through a lot of competator companies, about one every ten years, as I bought them out!) I let it alone, and it just plugged on anyway.

Actually, come to that it also showed a preference for using the "updated default" (I was using FIRS) vehicles, rather than the ones from eGRVTS NewGRF that had much lower running costs. Knowing nothing about how the scripting works, I don't know whether this is a issue that can be dealt with or not, but I thought I ought to mention it anyway, on the basis that feedback is feedback!


Top
   
PostPosted: Fri Oct 19, 2012 4:01 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Thank you for your feedback. :)

The current version lacks support for NewGRF trainsets and railway track sets, so strange things may happen when using the 2CC trainset. However, FIRS is supported, so the AI will be able to play with it using the ECS & FIRS original vehicle set NewGRF, or if trains are disabled. I've started some work to include support for NewGRF trainsets, but it is currently on the hold, I was simply lazy to continue it... At the moment I'm quite busy due to assignments.

Aotrs Commander wrote:
I had a error messages a couple of times

Did the AI crash? Even if NewGRF trainsets aren't supported, the AI should never crash. So if you experience that again, please send a screenshot of the AI debug window, possibly with a savegame. I'll look into the issue.

Aotrs Commander wrote:
Actually, come to that it also showed a preference for using the "updated default" (I was using FIRS) vehicles, rather than the ones from eGRVTS NewGRF that had much lower running costs. Knowing nothing about how the scripting works, I don't know whether this is a issue that can be dealt with or not, but I thought I ought to mention it anyway, on the basis that feedback is feedback!

The algorithm for selecting road vehicles is quite simple, currently the AI simply picks the fastest vehicle available which can transport the given cargo. It works well with the original vehicle set and eGRVTS, there are generally no tough choices with road vehicles. If there are multiple road vehicle sets enabled, this may not the best choice, but it is sufficient as long as the AI doesn't lose money on it :)


Top
   
PostPosted: Tue Oct 30, 2012 10:29 pm 
Offline
Engineer
Engineer

Joined: Tue Oct 30, 2012 10:20 pm
Posts: 2
Hi,

I'm new here so sorry if this is in the wrong place. My game just crashed and I got an error message when I loaded the game next time. I've attached a screenshot of it below. I have 2 opponents on the game, both with SimpleAI. All settings and stuff should be default, since I just installed the game a few days ago and haven't had time to explore them yet.


Attachments:
AI crash.jpg [452.12 KiB]
Downloaded 14 times
Top
   
PostPosted: Wed Oct 31, 2012 3:35 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Thank you for the report! It looks like I have some work to do now :)

Until I fix this problem, you can recover the AI in your game if you load an earlier savegame. The game was saved just between the construction of two road stations, which is quite rare, so noone has found this bug yet.

By the way, please send screenshots in PNG format, as it is quite hard to read the red lines in JPG format.


Top
   
PostPosted: Wed Oct 31, 2012 4:52 pm 
Offline
Engineer
Engineer

Joined: Tue Oct 30, 2012 10:20 pm
Posts: 2
Yeah I noticed the screenshot didn't come out too good. Will use .PNG in the future.

Got the game running again, thanks.


Top
   
PostPosted: Thu Nov 01, 2012 1:46 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
I'd like to share what I've been working on today: the first beta of version 7 8)

Most importanty it has some support for NewGRF trainsets. I have tested it with URKS, UKRS2, NARS and 2CC. FIRS and ECS are supported, although the AI may have a very hard time if only trains are enabled, as the running costs of these sets are quite high. So the AI only does decently if road vehicles are also enabled, but on easy difficulty it succeeds with trains only as well.
Engine selection is made in a way that if the default train set is used, the AI makes the same choices as the previous versions. My biggest challenges were articulated wagons and express trains. Articulated wagons (like the 3x Freightliner container rake in UKRS) tend to be very long, so I tried to exclude them, but in UKRS2 and 2CC all wagons are articulated for some reason, so I cannot make a distinction. So I introduced blacklisting for wagons, and extra long wagons are put into the blacklist. (I cannot determine their length before buying one...)
Some engines cannot attach certain wagons, and this was also quite a challenge for me, again it was solved by blacklisting.
There is some minimal support for extra railtypes, so the AI won't try to build maglev all the time when there is only a passenger train available on maglev.

Range limited planes should be also supported, but I encountered some strange behaviour, I opened a topic about it. Most probaby I don't know something :)

And of course I fixed the bug Poppis reported above.

So the new version is available in the first post, please give it some time and test it :) It's been quite a time I last worked on this AI, so it will need some thorough testing before I release version 7.


Top
   
PostPosted: Wed Nov 07, 2012 7:59 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Dec 29, 2010 7:36 pm
Posts: 336
I would say 2 errors are there :
1/ the crash because of route var
2/ choosing the train engine endup returning 0 and displaying that engine display null, obviously there's a trouble with that return value as it must be an invalid engine (line 456).
So ChooseTrainEngine need a check too :)


Attachments:
Non nommé, 1994-01-28.png [127.4 KiB]
Downloaded 9 times
Top
   
PostPosted: Wed Nov 07, 2012 7:30 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Thanks for your report, I'll look into it when I have some time again. :)


Top
   
PostPosted: Mon Dec 17, 2012 12:30 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Finally I had some time to work on SimpleAI again, so I fixed the bugs krinn reported above and fixed the support for range-limited planes.
Krinn helped me out a lot, there is a new road vehicle selection algorithm in this version borrowed from DictatorAI :)

As always, see the first post to download beta2, any feedback is welcome! Hopefully I didn't break anything after this long pause in development 8)


Top
   
PostPosted: Mon Dec 17, 2012 1:34 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
I really like Simple-AI as it's one of the few AIs that use shared orders, so that if/when I take over an AI company, it's easy to take control of the additional vehicles.

I'm giving this a test now (14 AI having at-it).

Thanks for your efforts on this AI script - much appreciated.

I wonder if it's possible to make it aware of bigger maps for the purposes of building longer routes? For the last version, I amended a couple of values so it could build really long train routes and even road routes of 200 tiles. It worked...but it would be nice if the script could know it's playing on a large (500/1000+ tile) map and extend the possibility of longer routes...maybe also tied into available cash?


Top
   
PostPosted: Mon Dec 17, 2012 1:53 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
Oops, a problem...no idea if it's an old one or a new one.
White builds a road route that crosses an existing rail line. It builds the red bridge and thinks that completes the route...but it's not joined. It's just bought some trucks so I'll wait and see what it does.

Eventually realises the truck is lost...
Attachment:
Unnamed, 21st Apr 1951.png
Unnamed, 21st Apr 1951.png [ 116.22 KiB | Viewed 3451 times ]


Top
   
PostPosted: Mon Dec 17, 2012 6:22 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Thank you for your feedback. Not building long routes is a design issue: First, I tried to make it similar to the old AI, which didn't build longer routes. There is also a problem with rail lines having only two passing lane sections, which is quite hard-coded at the moment, and it also heavily limits the maximum length of rail routes. And lastly, I tried to make sure that pathfinding won't take too long even on the very slow setting.
Anyway, you may freely alter these values if you want to :)

The bridge building bug is most probably an old one, I didn't change the road building code recently. It is very rare and quite hard to reproduce, but maybe I'll try to give it another go in fixing it. By the way, nothing really serious happens here, as the AI will notice that these vehicles are running unprofitable and will eventually close down the route.


Top
   
PostPosted: Tue Dec 18, 2012 6:45 am 
Offline
Engineer
Engineer

Joined: Thu Jun 02, 2005 7:28 am
Posts: 46
The blue deport in the lower right of the image is not placed very efficiently, too.


Top
   
PostPosted: Tue Dec 18, 2012 8:25 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
Didn't notice that blue depot...

Brumi: I agree that having just 2 passing lanes on a basic single track does have serious implications for long routes. Having longer road routes is ok though as my experiments have shown...useful for vehicles that can run at 70mph rather than 30mph at game start (or even slower!).

That company realised those trucks were loss-makers and shut them down...I shouldn't worry too much about the road/bridge issue. I guessed it was an old problem.


Top
   
PostPosted: Tue Dec 18, 2012 1:53 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
I uploaded the third beta which hopefully fixes the bug you reported, I was able to reproduce it by copying the screenshot :)
This bug occured if the road pathfinder wanted to build a bridge on the last tile, I had to exclude bridges to be built there.


Top
   
PostPosted: Tue Dec 18, 2012 4:13 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
I think the AI did build the bridge last...it was quite quick and I wasn't expecting it to do something strange.

Glad I could help. I'll give this version a try. Thanks.


Top
   
PostPosted: Thu Jan 10, 2013 10:50 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Well, version 7 is still not ready yet, but I have uploaded the fourth beta. The previous version wasn't handling NUTS correctly because the AI couldn't handle the situation when the passenger and the mail cars had the same model. And I also had to avoid the universal railtype to prevent the AI from going bankrupt :)

Anyway, feedback is welcome, hopefully I will be able to make a release of version 7 in the near future.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 254 posts ]  Go to page Previous 19 10 11 12 13 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.