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: 3653
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo » 09 Nov 2010 23:43

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: 50
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc » 10 Nov 2010 17:21

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 » 10 Nov 2010 17:33

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: 3653
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo » 10 Nov 2010 22:10

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 » 10 Nov 2010 23:19

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 131 times

Yisc
Engineer
Engineer
Posts: 50
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc » 11 Nov 2010 00:04

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: 3653
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo » 11 Nov 2010 01:38

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 » 11 Nov 2010 01:55

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: 3653
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo » 12 Nov 2010 17:58

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 » 12 Nov 2010 20:31

RV adding is not perfect
Przechwytywanie.PNG
(242.78 KiB) Downloaded 1 time
Seconds later:
Attachments
Przechwytywanie.PNG
(197.31 KiB) Downloaded 1 time
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Yisc
Engineer
Engineer
Posts: 50
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc » 12 Nov 2010 20:34

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 3713 times

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

Re: AdmiralAI v25

Post by Yexo » 12 Nov 2010 20:59

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: 50
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc » 12 Nov 2010 22:44

Thanks for the quick fix, unfortunatly, the result seems to be the same.
Image1.png
Image1.png (10.4 KiB) Viewed 3701 times

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

Re: AdmiralAI v25

Post by Yexo » 13 Nov 2010 01:31

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 185 times

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut » 13 Nov 2010 07:52

It seems that Admiral ignores bandwidth of truck station.
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (141.02 KiB) Viewed 3684 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

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

Re: AdmiralAI v25

Post by Yexo » 13 Nov 2010 07:59

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 » 13 Nov 2010 08:14

yes
Attachments
yes.sav
(460.53 KiB) Downloaded 102 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Yisc
Engineer
Engineer
Posts: 50
Joined: 09 Apr 2004 21:14
Location: Leiden
Contact:

Re: AdmiralAI v25

Post by Yisc » 13 Nov 2010 13:50

Sadly another problem this time.
Sorry to be such a pain.
Image1.png
Image1.png (10.6 KiB) Viewed 3665 times

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v25

Post by Kogut » 14 Nov 2010 11:09

bugbugbugbugbugbug
Attachments
Przechwytywanie.PNG
(79.75 KiB) Downloaded 1 time
Przechwytywanie.PNG
(71.84 KiB) Downloaded 1 time
bugbug-admiral.sav
(172.94 KiB) Downloaded 110 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

User avatar
luk3Z
Engineer
Engineer
Posts: 69
Joined: 25 Dec 2005 17:42
Location: Poland

Re: AdmiralAI v25

Post by luk3Z » 21 Nov 2010 07:57

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 -> http://bananas.openttd.org/en/

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest