AdmiralAI v25

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

The latest nightly can be found here: http://bundles.openttdcoop.org/ai-admir ... es/LATEST/

I've fixed the your problem actually two months ago but never did a new release. Could you test that version? If it works I'll upload it to bananas.
Yisc
Engineer
Engineer
Posts: 55
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc »

Yexo wrote:The latest nightly can be found here: http://bundles.openttdcoop.org/ai-admir ... es/LATEST/

I've fixed the your problem actually two months ago but never did a new release. Could you test that version? If it works I'll upload it to bananas.
Thanks for the new version.
I downloaded the .tar file, but where do I have to extract those file to?
Did a search on my disk, but can't find any of the files packed in that .tar file
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut »

on windows: \your documents folder [there is shortcut from desktop]\OpenTTD\content_download\ai
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

Actually when you manually download something you shouldn't put in under content_download. Just put it under "Documents\OpenTTD\ai\". If that directory doesn't exist yet create it. You don't need to extract the tar at all.
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AdmiralAI v25

Post by Samu »

I'm trying to understand why AdmiralAI has many of its trains stopped in the depot, and it seems to be related to the number of wagons or train size.

(The screenshot shows more than half of the trains stopped and it's sorted by age. If I am correct, whenever the AI replaces and old SH '40' to a newer SH '40' it adds a new wagon in the process. The new train works normally until the AI decides the train must stop into a depot and stay there for no reason. I checked the rails, everything seems fine and connected.)

I may be wrong in my analysis, but it seems to be what's happening. EDIT: I am wrong with my analysis. I checked the age of the last train in the depot sorted by age and there's an age gap of 16 years between the non-stopped engines which also happen to have 1 less wagon. I just noticed the AI replacing engines of 1 year old, while the engine lasts for 23 years. It's doing this cycle all the time: Replace engine of 1 year of age, set him off for a while, then send it to stop in depot, wait about 1 year, replace, etc... and it only happens with trains with an extra wagon.

The second issue is the diesel trains. There seems to be one problem with the rail. Not all of the rail network was converted to electric. I then went to check the network and I spotted a missing rail track, and next to it a station. It also coincides with the Manley-Morell DMU trains that weren't replaced to electric engines because apparently only part of the rail is electric, or there must have been an error upgrading all the rail to electric, which caused that missing tile.

The remaining diesel trains that weren't replaced are 'Dash', which have no problem, they still profit, despite having lots of breakdowns, but the rail is half electrified, half normal.

I tried to read the network, to make sure if it's only 1 gigantic network connecting all of the trains, but it's way too complex to me, however, I have the impression all trains are in this network, they can go every station in the map. I'm not sure if that can influence the AI into abnormal behaviour or not.
Attachments
Sem nome, 2044-03-05.png
(55.39 KiB) Downloaded 1 time
Sem nome, 2046-06-21.png
(190.28 KiB) Downloaded 2 times
Sem nome, 2048-03-27.sav
(235.53 KiB) Downloaded 236 times
Yisc
Engineer
Engineer
Posts: 55
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc »

Yexo wrote:Actually when you manually download something you shouldn't put in under content_download. Just put it under "Documents\OpenTTD\ai\". If that directory doesn't exist yet create it. You don't need to extract the tar at all.
I've placed it in the given directory (thanks for that Kogut) but after starting OTTD it still says AdmiralAI 25 is installed.
Maybe I'm missing the plot here, but I can't find a way to activate the latest version.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

Yisc wrote:
Yexo wrote:Actually when you manually download something you shouldn't put in under content_download. Just put it under "Documents\OpenTTD\ai\". If that directory doesn't exist yet create it. You don't need to extract the tar at all.
I've placed it in the given directory (thanks for that Kogut) but after starting OTTD it still says AdmiralAI 25 is installed.
Maybe I'm missing the plot here, but I can't find a way to activate the latest version.
Putting the tar from that download in "My Documents\OpenTTD\ai\" works fine for me, putting it in "My Documents\OpenTTD\content_download\ai\" works as well. Did you restart openttd after you put the tar file in that directory?

@Samu: AdmiralAI doesn't "manually" replace vehicles, it uses autorenew. The behavior you describe (selling one train, buying a new one with a wagon more) is because autoreplace made the old train one wagon short. At some point that short train was not profitable enough, so it was sold. A bit later the AI determines it needs more trains for that line again, so it buys a new train (with the proper amount of wagons).

The large amount of trains waiting in a depot is clearly a bug. As you can see most of them have their depot orders changed to "stop in depot", that means the AI was going to sell them. I have currently no idea why it didn't actually sell them, but I'll fix that bug before releasing v26.

The half-electric route is easily explained: AdmiralAI will only convert rails to a compatible type (so only normal->electric, never normal->monoral or normal->maglev). When it wants to convert a route it just goes ahead and tries, if the route it too busy and it converting fails for too long, it'll stop converting and go on as if the complete route was of the old type (so no electric trains in this case). Later it may try to convert the route again, but that may take a while.

Thanks for your extremely detailed report after testing, it really helps.
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AdmiralAI v25

Post by Samu »

There is a missing rail tile on the left side of the screenshot with the diesel only trains, near Minas de Drendingham. All those diesel trains, which are 16, are unprofitable.

Also, I think the question is, why does the AI wants to sell?

From my observations, there would be no need to sell, those trains would profit for sure, there's farms with 300 livestock or grain per month, I see no reason why there's barely a train loading cargo, the AI decides to have them stopped in depots.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

Samu wrote:There is a missing rail tile on the left side of the screenshot with the diesel only trains, near Minas de Drendingham.
Thanks, that was a bug with removing dead road ends. It's fixed in the latest nightly. I've also implemented a hack so that the trains that are stopped in the depot are sold. Unfortunately I haven't found the actual cause of this bug yet.

Thanks again for your reports and keep them coming :)
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut »

RV adding is not perfect
Przechwytywanie.PNG
Przechwytywanie.PNG (242.78 KiB) Viewed 4913 times
Seconds later:
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (197.31 KiB) Viewed 4913 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yisc
Engineer
Engineer
Posts: 55
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc »

Placed the tar file in the following directory: C:\Users\sjoerd\Documents\OpenTTD\ai
Which didn't existed by default.

Earlier I placed it in: C:\Users\sjoerd\Documents\OpenTTD\content_download\ai
But that didn't worked at all.

When I now load my game played against AdmiralAI it crashes immediatly with the following error:
Image1.png
Image1.png (10.43 KiB) Viewed 10761 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

Kogut wrote:RV adding is not perfect
Przechwytywanie.PNG
Seconds later:
Extending the road station fails because the road vehicle is in the way, it'll try again later.
Yisc wrote:When I now load my game played against AdmiralAI it crashes immediatly with the following error:
A little bug in the conversion from data stored by version 25. Attached a fixed version that should load ok.
Yisc
Engineer
Engineer
Posts: 55
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc »

Thanks for the quick fix, unfortunatly, the result seems to be the same.
Image1.png
Image1.png (10.4 KiB) Viewed 10749 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

I fixed the problem at one place but forgot another, attached a new version that hopefully works.
Attachments
AdmiralAI-26-r75.tar
(390 KiB) Downloaded 288 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut »

It seems that Admiral ignores bandwidth of truck station.
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (141.02 KiB) Viewed 10732 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

Kogut wrote:It seems that Admiral ignores bandwidth of truck station.
Do you still have a savegame of that game?
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut »

yes
Attachments
yes.sav
(460.53 KiB) Downloaded 204 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yisc
Engineer
Engineer
Posts: 55
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc »

Sadly another problem this time.
Sorry to be such a pain.
Image1.png
Image1.png (10.6 KiB) Viewed 10713 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut »

bugbugbugbugbugbug
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (79.75 KiB) Viewed 4913 times
Przechwytywanie.PNG
Przechwytywanie.PNG (71.84 KiB) Viewed 4913 times
bugbug-admiral.sav
(172.94 KiB) Downloaded 208 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: AdmiralAI v25

Post by luk3Z »

Yexo wrote:I fixed the problem at one place but forgot another, attached a new version that hopefully works.
We need all new versions in the 1st post to avoid problems with old ones. Thanks!
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 7 guests