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

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Re: AdmiralAI v22

Post by Moriarty »

This is easily the best AI, if only because 40 years into the game it's the only one that hasn't crashed (wright AI), gone bankrupt, or slowed the game down so much I had to stop_ai it (chooChoo).
Note: In my game there are no AI road vehicles or ships.

It does have some issues though.
a) As with Wasila above, it doesn't clear up stations. See screenshot. It's made 9 attempts (or at least there are 9 stations at each) to get from the coalmine in the bottom right to the power plant in the top left.

b) It builds airports, but doesn't use them. The first airports built are always small (game start year 1950), and these it uses. But then it also builds more airports later in the game but doesn't really use them. I'm wondering if it just builds them to use up the noise-limit. Some of these airports it's had for years but just not used. It's not short on money either (£47mil in the bank).
daff
Engineer
Engineer
Posts: 1
Joined: 06 Feb 2010 16:05

Re: AdmiralAI v22

Post by daff »

Hello,

I'm relativly new in this topic and I got a crash with Openttd an AdmiralAI v22.
It seems to be a problem with saving.
A screenshot is below.
Here some facts about my environment:
OpenTTD 0.7.5
win7 x64
3200x1200 res ^^

If you need more I try to find out
Attachments
admiralAI-v22-crash-log.png
admiralAI-v22-crash-log.png (18.37 KiB) Viewed 12381 times
labm0nkey
Engineer
Engineer
Posts: 1
Joined: 09 Feb 2010 17:42

Re: AdmiralAI v22

Post by labm0nkey »

I want to report something. I started new game 512x512 with 7 Admiral AI's. They were coming one by one (default settings) and below you see what they did. Looks like every of them knew only one way to start his business. There were many other forests and treadmills close like that on my map but they still were choosing this location. Very similar situation also had place at coal mine and power plant, so they made same stupid mistake 2 times on one map. I think that it's natural to build own business somewhere where is no competition and then trying to sneak into other's business when your business is advanced enought.

EDIT: they did this 3rd time. I noticed that all Admirals build their stations at same time. It's like playing vs 1 guy with 6 clones.
Attachments
ttd.jpg
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: AdmiralAI v22

Post by Roujin »

labm0nkey wrote:EDIT: they did this 3rd time. I noticed that all Admirals build their stations at same time. It's like playing vs 1 guy with 6 clones.
Well, that's exactly the case, isn't it? You are playing against seven instances (=clones) of the same AI...

The problem here is that the AI seems to have a specific way of choosing the industries it wants to connect. And "stations already nearby" does not seem to be a parameter in its calculations (neither a random factor). Thus, multiple instances of the AI will always choose the same industry to start with.

Have you tried mixing different AIs? There are more than only AdmiralAI :)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

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

Re: AdmiralAI v22

Post by Yexo »

The amount already transported is a factor, but as soon as the road is build all others instances find that road, find that it connects the industries and that nothing was transported the last month, so it's a good opportunity to build a route there.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AdmiralAI v22

Post by planetmaker »

Admiral is doing well (top 3), but at a certain point it stops being profitable, changing its strategy for a reason I don't quite comprehend. Looking at some of the routes, it seems that from that point onward, his operation profit is eaten by failed building projects as the rail line shown in the attached screenshots.
Attachments
station #1
station #1
Neu Hahnmünster Transport, 20-02-1983.png (300.16 KiB) Viewed 12171 times
station #2, the other line end
station #2, the other line end
Neu Hahnmünster Transport, 23-02-1983.png (295.02 KiB) Viewed 12171 times
trancedanne
Engineer
Engineer
Posts: 4
Joined: 17 Aug 2006 17:22

Re: AdmiralAI v22

Post by trancedanne »

Hey guys, i need help starting admiral ai, i get this message:

sorry for the bad picture

I have the librarys, and the tar files. AI and AI/Library maps, whats wrong?
Attachments
hora.jpg
hora.jpg (36.48 KiB) Viewed 12102 times
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v22

Post by Yexo »

You need to download the FibonacciHeap library. You can do so either via the ingame content download system (the easy easy) or download it from http://noai.openttd.org/downloads/Libraries/. If you download it manually you'll have to extract the .gz file and put the tar or directory in "openttd-dir/ai/library/".
hrp
Engineer
Engineer
Posts: 1
Joined: 06 Mar 2010 20:12

AdminralAI(v22) initializing error

Post by hrp »

Hi all! Not sure if this is the right location for this post but I'm just following what the dialog box wanted me to do...
I am running OpenTTD 1.0.0-RC1

The game was attempting to add the first computer opponent when this bug occured.
Attached is screenshot of the AI Debug console and a save game with the issue.
aierror.jpg
Sonwood Transport, 6th Jan 1951 ai issue.sav
(760.07 KiB) Downloaded 322 times
Hopefully this will help. Thanks to the community for making this project happen!
Ross
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v22

Post by Yexo »

Thanks for your report, I'll take a look tomorrow to see if I can fix the problem.
Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: AdmiralAI v22

Post by Morloth »

Hey Yexo,

I ran into the following crash when testing your AI, I only encountered it once in the zillion times I ran it agains NoCAB so it's not that common. I use OpenTTD 1.0.0-RC1 as a test platform.
NoCAB - v2.0a9, 11th Jul 1995.png
Cheers,
Bram
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v22

Post by Kogut »

Congratulations for using newgrf stations (other ais refused to construct sth except default)!
But is unable to repair connections.
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (33.67 KiB) Viewed 11910 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Steffl
Engineer
Engineer
Posts: 103
Joined: 23 Feb 2010 15:44

Re: AdmiralAI v22

Post by Steffl »

I had an error with your AI, when testing my own AI.
I played in toyland (only for testing, I swear), when it suddenly crashed and showed this error:
Attachments
CrashInToyland.png
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AdmiralAI v22

Post by Kogut »

+ Admiral uses IRS stations
- Stations are left after failed contruction
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (37.31 KiB) Viewed 11544 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AdmiralAI v22

Post by planetmaker »

A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you did very well!

Best areas of improvements now seem to be from this brief test: add (more) train support and make use of them. Also while building statues and additional stations in many places helped to improve the income situation, more might have been gained at least in some places (just a guess, though), when adding e.g. long-distance train routes - you have the money to start it :-)

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 :-)
Attachments
admiralAI.png
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v23

Post by Yexo »

Finally a new version, not much new features so it's basically a bug-fix release. Most of the bugs reported so far have been fixed, if you find another bug (or an old bug still present) please report it here.

Changelog:
-Feature: don't use "AdmiralAI #" as company name, but add a nice suffix
-Feature: build the company headquarters
-Update to 1.0 api
-Change: continue the checking of routes even if we don't have enough money, some other routes might need to sell some vehicles
-Fix: crash in case Save() got called before Init() was complete
-Fix: loading any data from a savegame was broken
-Fix: Don't crash when encountering a heli port/station/depot because it may be a leftover from another AI
-Fix: don't remove bridges / tunnels when removing a dead end because those bridges / tunnels are most likely not part of it
-Fix: only sell (parts of) a station when all vehicles going to that station have been sold. This prevents problems with trains no longer being able to turn around
-Fix: don't use AIVehicle.SendVehicleToDepot for trains because they sometimes get send to a depot they can't easily reach
-Fix: terraforming can remove single roadbits when "build on slopes" is off, make sure to rebuild those roadbits

Download from bananas or the first post in this topic.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

My script to create a tar file was broken, so the directories didn't end up in the tar and as a consequence version 23 was broken. Version 24 is exactly the same but now with a working tar file on bananas.
Edit: I'm making a mess of it, v24 was also broken because main.nut was trying to include some experimental files that weren't in the tar. Version 25 is online which really works.
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AdmiralAI v25

Post by Brumi »

When I logged in, I saw the title: AdmiralAI v25. I started to wonder if the last version I saw was really v22, not something else :)
Congratulations on the new release! :D

And now AdmiralAI is dropped from the top of the download list on Bananas, we will have to wait for some time until this version is also downloaded 100.000 times... :mrgreen:
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AdmiralAI v25

Post by Yexo »

That happens when you mess up releasing a new version :p. Version 22 was downloaded 143165 times from bananas and a few 100 times from the forums.
iNVERTED
Route Supervisor
Route Supervisor
Posts: 387
Joined: 24 Apr 2005 21:21
Location: Torquay, England
Contact:

Re: AdmiralAI v25

Post by iNVERTED »

Have a crash report.

Edit: Grr, seems I have an old version, so whatever it was is probably fixed already.
Attachments
Fundtown Transport, 1956-01-10.png
(239.69 KiB) Downloaded 2 times
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests