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

TheNewNo2
Engineer
Engineer
Posts: 4
Joined: 24 Feb 2012 18:33

Re: AdmiralAI v25

Post by TheNewNo2 »

I've come across a bug which happened around the early 70s. I was running a game against 5 AIs, and one by one, they crashed. Screenshot of one of them is below. One of the 3 crashes was different, in that [last_type] was 0 instead of 1, but that was the only difference in the error message. Screenshot attached.
Attachments
debug.gif
debug.gif (19.54 KiB) Viewed 12592 times
User avatar
PET
Engineer
Engineer
Posts: 17
Joined: 12 Jul 2004 19:10
Location: Timisoara/Romania
Contact:

Re: AdmiralAI v25

Post by PET »

I just started a game with this Ai. I constantly get errors like this:
Attachments
Clipboard01.jpg
Clipboard01.jpg (62.93 KiB) Viewed 5099 times
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AdmiralAI v25

Post by Brumi »

Please provide screenshots in PNG format, the red text is very hard to read in JPG.
MAG101
Engineer
Engineer
Posts: 28
Joined: 14 Dec 2011 00:55

Re: AdmiralAI v25

Post by MAG101 »

bug with choses logic train where cant haul wagon
Attachments
Bundwood Transport, 14th Jul 1951.png
(193.57 KiB) Downloaded 10 times
Bundwood Transport, 20th Jul 1951.png
(187.3 KiB) Downloaded 10 times
valcha45
Engineer
Engineer
Posts: 1
Joined: 25 Mar 2013 18:57

Re: AdmiralAI v25

Post by valcha45 »

What in the dogs name? A Bug or somethin? HELP!
Attachments
Nazi HQ, 4th Jun 2009.png
This is the photo
(271.04 KiB) Downloaded 9 times
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AdmiralAI v25

Post by Brumi »

You are missing a library for the AI. Where did you download AdmiralAI? I suggest you re-download it from the online content system and the problem should solve itself.
Or you can download the required libraries manually from http://noai.openttd.org/downloads/Libraries/, in this case you need version 2 of Queue.FibonacciHeap. Unpack it and put it in the OpenTTD/ai/library directory.
DaveS
Engineer
Engineer
Posts: 1
Joined: 01 Apr 2013 00:34

Re: AdmiralAI v25

Post by DaveS »

Please shout if this is not the right place to raise bugs (though it seems to be as others are).

I've recently started playing OpenTTD again after a few years away and picked your AI. In the current game (me vs four AIs currently, fairly easy custom settings) the AI script crashed for one of the competitors and tge game politely request I submit a bug report.

Attached are the screenshot as requested, the game save from immediately after taking the screenshot, and the last auto-save prior to the error. The trace says something about converting tracks which makes sense: I was recently distracted from the screen by a phone call and just missed the offer of initial exclusive use of the first electric train, so presumably that AI got the exclusive access instead and was working on making use of it.

I have the game paused but still loaded and can probably keep it that way for the next day or so - let me know if there are any further diagnostics you'd like me to run before closing it.
Attachments
Ludworth Transport, 3rd Nov 1966.png
(501.12 KiB) Downloaded 9 times
Ludworth Transport, 3rd Nov 1966, ai crash.sav
(513.04 KiB) Downloaded 211 times
autosave-before-crash.sav
(511.61 KiB) Downloaded 190 times
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AdmiralAI v25

Post by Samu »

Hi. AdmiralAI v25 transports Valuables but with full load and unload orders. Shouldn't it be full load on both? I noticed it on trains and trucks.
tear
Engineer
Engineer
Posts: 2
Joined: 03 Aug 2013 09:42

Re: AdmiralAI v25

Post by tear »

G'day,

I'd like to report a crash which happened upon introduction of SH30.

Pre-crash save games and post-crash screenshots are available.

Running OpenTTD 1.3.1 on Linux with TTDW graphics/sounds.

Let know if you need any add'l information.

Thank you!
Attachments
Tredinghead Transport, 23rd Sep 1966-test.sav
Save game 1966-09-23
(211.69 KiB) Downloaded 193 times
Tredinghead Transport, 30th Oct 1966-test.sav
Save gane 1966-10-30
(212.8 KiB) Downloaded 184 times
AdmiralAIlv25-1.png
Crash screenshot #1
(966.36 KiB) Downloaded 6 times
tear
Engineer
Engineer
Posts: 2
Joined: 03 Aug 2013 09:42

Re: AdmiralAI v25

Post by tear »

Follow-up to previous post.
Included few more screenshots.
Attachments
AdmiralAIlv25-2.png
Crash screenshot #2
(881.22 KiB) Downloaded 6 times
AdmiralAIlv25-3.png
Crash screenshot #3
(761.93 KiB) Downloaded 6 times
AdmiralAIlv25-4.png
Crash screenshot #4
(766.73 KiB) Downloaded 6 times
Yajna
Engineer
Engineer
Posts: 13
Joined: 02 Oct 2013 15:44

Re: AdmiralAI v25

Post by Yajna »

I've seen v26 mentioned twice in this thread in a way that makes me think v26 is the most recent release. Is that the latest working release or is it still v25 (with v26 under development)? Online content/Bananas both list v25.
(With a gentle bump to the ConvertRailType error upon year's exclusive use of first electric engine.)
Lewistrick
Engineer
Engineer
Posts: 3
Joined: 23 Jan 2014 19:08

Re: AdmiralAI v25

Post by Lewistrick »

I have an error. This is the first time I try to use an AI player.
How can I solve this?
Attachments
Error.png
Error.png (7.45 KiB) Viewed 10752 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AdmiralAI v25

Post by planetmaker »

Did you obtain the AI via ingame content download? If you downloaded it elsewhere manually: make sure that you also have all libraries required by this AdmiralAI version in the ai/library path - or delete the manual download version and use ingame content download.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AdmiralAI v25

Post by Zuu »

It sounds like you are missing the compat_1.0.nut file for the OpenTTD version that you use. It should be located in the ai directory of your OpenTTD installation.

Note that you should never place these files in your shared directory to be shared between different versions of OpenTTD. Always keep the stock compat_*.nut files that are shipped with OpenTTD.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Lewistrick
Engineer
Engineer
Posts: 3
Joined: 23 Jan 2014 19:08

Re: AdmiralAI v25

Post by Lewistrick »

Thanks, I have indeed downloaded the AI via ingame content download.
I have now downloaded the compat_1.0.nut file, but I have another error. It starts building 2 stations and trains in between, but raises an error before the train starts to go.
Attachments
Error.png
Error.png (31.55 KiB) Viewed 5093 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AdmiralAI v25

Post by Zuu »

That still does sound like you do not have the correct compatibility layer file. The constant that it complains about being missing is the name of a constant that IIRC was renamed in 1.2.

Admiral AI declares that it is written for the AI API in OpenTTD 1.0. Since then some API methods/constants have been renamed. In order for OpenTTD to allow old AIs to work in new versions of OpenTTD compat_1.0.nut is loaded which adds back the old names of things so that old AIs will not break in the new version. The file compat_1.0.nut will look different when you obtain it for OpenTTD 1.1, 1.2, 1.3 etc. as the longer time progress it will contain more and more stuff. So if you download it manually, you must get the right version of that file for your version of OpenTTD.

That said, I don't recommend manually downloading the compat_*.nut files. I recommend that you install OpenTTD using an installer or if you download a .zip/.tar.gz/etc., extract all the contents into a directory of your choice. Also make sure that there are no compat_*.nut files in your shared OpenTTD directory. Eg. Documents\OpenTTD\ai if you use Windows.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Lewistrick
Engineer
Engineer
Posts: 3
Joined: 23 Jan 2014 19:08

Re: AdmiralAI v25

Post by Lewistrick »

Thank you very much! It's working now :)
bencze
Engineer
Engineer
Posts: 17
Joined: 16 May 2014 23:05

Re: AdmiralAI v25

Post by bencze »

Hi!

I'm unsure whether I'm thread necromancing or it's OK to post here but I encountered an error using AdmiralAI.
I downloaded the 1.4 stable Windows version of the game, using zBase graphics and that's pretty much it. Downloaded them using the in-game downloader.
Is this normal, expected, if I want to have AIs should I use a different one? I'm a bit unsure whether this one is supported or not currently.

Thanks.
Attachments
BuggedAdmiralAI.sav
save game
(76.94 KiB) Downloaded 164 times
Profit Inc., 16th Nov 1966#1.png
station screenshot
(1.08 MiB) Downloaded 4 times
Profit Inc., 16th Nov 1966.png
station screenshot
(1.32 MiB) Downloaded 4 times
Allamarein
Engineer
Engineer
Posts: 6
Joined: 07 Aug 2014 17:51

Re: AdmiralAI v25

Post by Allamarein »

Hi.
I have just downloaded AdmiralAI via Online Content. The downloaded was complete, but I get this error:
1.0 API compatability in effect
Your script made an error: couldn't find library 'queve.fibonacci_heap' with version 2
*FUNCTION[main()] admiralai-25\main.not line [22]
In Documents I have a folder with: Documents\OpenTTD\content_download\ai where each downloaded file via Online Content are inside in TAR format.
However Documents\OpenTTD\ai\library is empty.
In Documents\OpenTTD no *.nut files are present: they are stored in the directory where I installed OpenTTD: C:\Program Files\OpenTTD

Why I get this error?
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AdmiralAI v25

Post by Brumi »

Which version of OpenTTD are you using? The library should have been downloaded automatically with AdmiralAI when using the online content downloader.

You should try to download version 2 of Queue.FibonacciHeap from the online content downloader.

Why are you trying to find .nut files in the OpenTTD main directory?
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 8 guests