AAI v0.86 released - AAI v0.875 in SVN - Page 2

AAI v0.86 released - AAI v0.875 in SVN

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

AAI.dll included in the last official Spring release (0.76b1) was buggy. It has been fixed since (in svn), hence compiled svn Spring doesn't crash with it. Fixed dll is the file linked to in that thread, official Spring installer will only have it once the next Spring version is out. Buildbot should have it now btw.
User avatar
sanderbakkes
Posts: 27
Joined: 16 Aug 2006, 15:49

Re: AAI v0.86 released (link to binaries included)

Post by sanderbakkes »

Spring crashes when there are 2 AAI .dll's that have different filenames (I need this for testing). It crashes at init, with the lovely "Incorrect Global AI dll". Note that the .dll's are identical, only the filename is different.

No AAI log will be written for the second to be loaded AI, so I guess it has something to do with the AICallback to the engine. Cannot really find where in the code to solve the issue though.

Does anyone have a clue on this? Tnx a bunch!
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: AAI v0.86 released (link to binaries included)

Post by submarine »

maybe because both dlls try to acess the same files (learning etc.) you could try to modify the ai path in aidef.h:

Code: Select all

//#define MAIN_PATH "AI/AAI/ 
#define MAIN_PATH "AI/AAI2/ 
[code]

or maybe

[code]
DLL_EXPORT void GetAiName(char* name)
{
	strcpy(name, AAI_VERSION);
}
is causing problems - you could try to change the AAI_VERSION string for your second dll

btw: i got your mail, i'll try to answer it tomorrow
merijn
Posts: 59
Joined: 17 Feb 2007, 18:43

Re: AAI v0.86 released (link to binaries included)

Post by merijn »

yuritch wrote:AAI.dll included in the last official Spring release (0.76b1) was buggy. It has been fixed since (in svn), hence compiled svn Spring doesn't crash with it. Fixed dll is the file linked to in that thread, official Spring installer will only have it once the next Spring version is out. Buildbot should have it now btw.
But I compiled the 0.76b1 tag version, so that should mean i still have a bugged version. Unless the AAI.dll in the 0.76b1 release is not the same as the AAI code in the 0.76b1 svn tag?

Is there a way to see the version of a AAI.dll? Maybe its an idea to include a revision number or date, and print it on startup, just like KAIK is doing now.
merijn
Posts: 59
Joined: 17 Feb 2007, 18:43

Re: AAI v0.86 released (link to binaries included)

Post by merijn »

OK, I used the 0.86 AAI posted in this thread, and it gave me the same error as I had before (took an 2 hour game real time with a friend allied against a AAI and a KAIK allied).

I am running stock XP here, but I think I had that same error on vista too. I will check that tomorrow since its on another PC. [edit]No, I had a different error on vista, and it was with 0.85 so it might be fixed already[/edit]

The stacktrace is

0x6d7c0000 AAI
(0) C:\games\TASpring\AI\Bot-libs\AAI.dll [0x6D7D6144]
(1) C:\games\TASpring\AI\Bot-libs\AAI.dll [0x6D7DE57D]
(2) C:\games\TASpring\spring.exe [0x005AC361]
(3) C:\games\TASpring\spring.exe [0x005D941C]
(4) C:\games\TASpring\spring.exe [0x005F495A]
(5) C:\games\TASpring\spring.exe [0x005F684B]
(6) C:\games\TASpring\spring.exe [0x00855AB9]
(7) C:\games\TASpring\spring.exe [0x0085ED08]
(8) C:\games\TASpring\spring.exe [0x0085F0DE]
(9) C:\games\TASpring\spring.exe [0x0085F316]
(10) C:\games\TASpring\spring.exe [0x0095D309]
(11) C:\games\TASpring\spring.exe [0x004010A7]
(12) C:\games\TASpring\spring.exe [0x00401123]
(13) C:\WINDOWS\system32\kernel32.dll(GetCurrentDirectoryW+0x44) [0x77E814C7]

So exactly the same as before, except for the addresses in AAI.dll.
Last edited by merijn on 18 Mar 2008, 18:46, edited 1 time in total.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: AAI v0.86 released (link to binaries included)

Post by Vadi »

My AAI doesn't load, and I was told that I need the config files.. where can I get them? Didn't find them in this thread.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

AAI config files are in the Spring installer. They are compatible with the dll posted here, so there was no need to reupload them. Install Spring with AAI and just replace aai.dll with the file from this thread.
Of course, they were made for mods popular at that time, so anything new isn't in them. That means you may have to edit them a bit (most of the time just rename the file to match mod filename). It isn't hard to create a config for a brand-new mod either, look in ai\aai\cfg\help folder for examples.
User avatar
sanderbakkes
Posts: 27
Joined: 16 Aug 2006, 15:49

Re: AAI v0.86 released (link to binaries included)

Post by sanderbakkes »

submarine wrote:maybe because both dlls try to acess the same files (learning etc.) you could try to modify the ai path in aidef.h:

or maybe you could try to change the AAI_VERSION string for your second dll
no luck. with two differently named AAI .dll's, it crashes at or before

Code: Select all

aicb = callback;
cb = callback->GetAICallback();
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: AAI v0.86 released (link to binaries included)

Post by Vadi »

I'm afraid I'm on Ubuntu, and I installed spring via the PPA. Apparently the config files weren't installed.

So could they be reposted please?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

Here they are.
I'm not sure where they go on Linux, but on Windows they should be in spring\ai subfolder (so it looks like spring\ai\aai\cfg\mod\*.cfg, etc.)
Attachments
aai-cfg.7z
AAI config files
(15.39 KiB) Downloaded 223 times
Kerensky
Posts: 5
Joined: 21 Mar 2008, 17:07

Re: AAI v0.86 released (link to binaries included)

Post by Kerensky »

what mods does this work for?
So far i've tried it with BA and XTA successfully but it fails for me on gundam, spring 1944 and kernel panic.
Does anyone have cfg's or whatever i need to make them work?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

Gundam should work (if you rename the config accordingly so it matches mod filename). Kernel Panic won't work most probably as it's just too different from what the AI expects of a Spring mod. S'44 may or may not work depending on which S'44 version you use it with, and you still need to rename config file to match mod filename.
Of course, if Gundam had new units added since the config was written (esp. commanders), then the config may need to be updated - it has to contain a proper commander unit name, else AI won't work. S'44 AIs that start with a building as a commander may need to be given an order to make an engineer (via .cheat) to start playing.
Kerensky
Posts: 5
Joined: 21 Mar 2008, 17:07

Re: AAI v0.86 released (link to binaries included)

Post by Kerensky »

ok i renamed the config to what i hope is the right name.
Mod config file AI\AAI\cfg\mod\GUNDAM_Installer_Version.cfg not found is what the log said so i changed the cfg to that and it crashes if i use the GM commander option and doesnt load the AI if i select the pegasus commander option.
It seems wierd to me that one option crashes it and the other just doesnt load the AI.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

Doesn't load the AI? How is that? AI just sits there doing nothing or what? There is a <spring dir>\ai\aai\log folder, look in there for a log file. That may contain the answer as to what the problem is exactly.
As for the crash, it's most probably caused by incorrect commander unit name. It expects FEDCOM (or ZECOM, depending on side) unit to be present at game start, and it cannot find one, so it crashes. So, AAI will only work with 1 of the commanders for a mod that can change commander type via mod options. It also expects proper scout unit names (as defined in the config), if those aren't found, it may also crash.
Kerensky
Posts: 5
Joined: 21 Mar 2008, 17:07

Re: AAI v0.86 released (link to binaries included)

Post by Kerensky »

yeah the enemy commander just sits and does nothing
well i renamed the config like i said but i still get this if i use pegasus/graw commander option

AAI 0.86 running mod GUNDAM_Installer_Version.sd7
Mod config file AI\AAI\cfg\mod\GUNDAM_Installer_Version.cfg not found

and it crashes if i use the other option
i've double checked the spelling of the config and made sure it matches exactly but apparently it's still not finding it
no idea about how to create my own config for it so i'll probably stick with XTA for now
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

Well, that must be the wrong commander name problem then. Wait a bit, I'll get that version of Gundam and make a proper config for it (it will only work with one of the commander options though).
Kerensky
Posts: 5
Joined: 21 Mar 2008, 17:07

Re: AAI v0.86 released (link to binaries included)

Post by Kerensky »

that would be brilliant thanks
its the same gundam that comes with the latest spring.
if i knew what the commander was called so i could change the config i could probably have a go myself.
as far as i can see the scouts names were correct so the commander must not be called fedcom or zecom anymore
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: AAI v0.86 released (link to binaries included)

Post by yuritch »

Here's a config that works for me. It's for the Epic Commanders mode (ie huge flying things). Don't try it with other modes, it won't work. Also, you may have to delete <Spring folder>\AI\AAI\learn\mod\GUNDAM_Installer_Version.dat file before the first time you run AAI with Gundam since it doesn't like learning data produced with different configs.
I tested it, in an AAI vs AAI match (one was Federation, the other was Zeon). I looked at them blowing each other for 30 minutes, and since there were no visible winner (and it didn't crash), ended the game. Map: Prokhorovka_1944.sd7 (probably not the best map for Gundam, but it worked). The start was a bit slow, both commanders were reclaiming trees for a few minutes, but after ~5 minutes both had a factory and some units and then the battle really started.
Attachments
gundam_installer_version.7z
gundam AAI config
(511 Bytes) Downloaded 65 times
Kerensky
Posts: 5
Joined: 21 Mar 2008, 17:07

Re: AAI v0.86 released (link to binaries included)

Post by Kerensky »

Thanks man thats great, really appreciate it.
Gonna have a look around to see if i can learn to make configs myself so i can play other mods.
User avatar
sanderbakkes
Posts: 27
Joined: 16 Aug 2006, 15:49

Re: AAI v0.86 released (link to binaries included)

Post by sanderbakkes »

could anyone please check how to have two AAI's (one slightly modified) play against the other. currently it will crash (see above).

i am approaching a deadline and really am in need for a solution for this issue. or a simple workaround :)

hope you can help, am offering chocolate for my savior :)
Post Reply

Return to “AI”