Moderator: OpenTTD Developers
or airplane will refuse flying
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
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 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.
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 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.
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:I had a error messages a couple of times
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 itAotrs 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!
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.
- AI crash.jpg
- (452.12 KiB) Downloaded 14 times
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.
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.
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
- Non nommé, 1994-01-28.png
- (127.4 KiB) Downloaded 9 times
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
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?
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...
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.
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.
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.
Glad I could help. I'll give this version a try. Thanks.
Anyway, feedback is welcome, hopefully I will be able to make a release of version 7 in the near future.
Users browsing this forum: No registered users and 1 guest