QAI! V2.45! New (03/09/2007)

QAI! V2.45! New (03/09/2007)

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

Moderators: hoijui, Moderators

User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

QAI! V2.45! New (03/09/2007)

Post by QMan »

Hey all!

QAI is a relatively new AI written by QMan (me) aka John Andrews. It's been written from the ground up to be config-file free, and to have universal mod support.

Features:
Full Featured Unit Learning
Automatic Mod Support
Map Learning
Robust Economy Management
Detection of chokepoints for base defense
Enhanced Building Placement Algorithms for Superior Unit Support
Advanced unit selection routine, including:
--Sweepers, for eliminating those pesky enemy units roaming around
--Skirmishers, for taking out unprotected economy buildings
--Invaders, for tromping through enemy defensive lines and destroying all!
Construction Hub support (BETA)

Features Coming Soon (TM):
--Artillery/spotters support
--Wall building!
--Long range stationary artillery support

Files:
Get the windows binaries (2.45), linux binaries (2.44), or the source (2.45).

Known Bugs:
--Reasonably stable code
--AI takes a game or two to figure out correct unit & map usage
--Shipyard usage can be spotty sometimes
--Upgrading metal extractors disabled
--Nano towers are only given basic commands curently
--Hub usage may be erratic

-QMan
Last edited by QMan on 09 Mar 2007, 23:25, edited 31 times in total.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Great! Would you mind if I compiled QAI for Linux and uploaded it?
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Sure thing!
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Edit 1: something seems to have gone wrong during compression (the extracted file is only 45 bytes small), a fixed version is here!

Edit 2: uh-oh, QAI doesn't use the VFS interface extensions to read and write files, so it hangs on all the fprintf() and sprintf() calls that take "AI\\QAI\\..." as an argument. As a temporary workaround I'll replace them by forward slashes, but in the meantime don't try to run this version.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Can you give me a link to the VFS extension stuff so I can port it into the code?

-QMan
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

http://spring.clan-sy.com/phpbb/viewtop ... 699#115699

I think I explained it in some other thread too, maybe a little better, but I don't know which, maybe the search feature can find it if the above post isn't clear enough...
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

I fixed up the code a bit, see if the new source code fixes the linux directory crash.
BDCoolio
Posts: 40
Joined: 08 Jan 2007, 03:55

Re: QAI Is Back! V2.0!

Post by BDCoolio »

QMan wrote:NanoTower support is currently disabled.
I take it that means no hub support too?
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Yeah, until either the yardmap thing gets fixed or I write more advanced building placement algorithms.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Very nice! Glad to see another AI project here.

Just a side note, could you credit me krogothe and submarine? Looking through QAI source code I can pick out different parts, like krogs Unit class, etc.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The 2.1 source does not compile out of the box, there's a missing parenthesis on line 2316 of UnitMananger.cpp and it tries to include a non-existing header (FileHandler) in that file as well. There are also two case-sensitivity issues involving the inclusion of "Command.h" in CommandHolder.h and MathHelper.h, which the preprocessor can't find since its actual name is "command.h". ;)

Aside from that it works, but seemingly only on maps with a Spring-style metal distribution (eg. Small Divide, Brazillian Battlefield), and only after manually creating AI/QAI/WaterMaps/ and AI/QAI/MetalSpots/ and replacing '\\' by '/' in all strings passed to fopen(), for example in SaveWaterMap() and LoadWaterMap().
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Oh, I uploaded the wrong code, lemme fix that.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

AF, I don't think I used any code from you or submarine, just the CMetalMap and UNIT classes from Krog. I actually tried to code almost all of it without using other AI code as a reference, so that the code would be my abomination, instead of a rehash of someone else's. :)
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

New version up, 2.02, should fix compile errors and linux path errors.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

By the way, anyone know of a good document showing an easy way to get Boost into CodeBlocks?
User avatar
genblood
Posts: 862
Joined: 19 Jan 2005, 03:37

Post by genblood »

I just tried the new 2.02 AI release. It still crashs Spring. Here is the
printout of the info.txt of the error message.
Using script GlobalAI test (QAI.dll)
Map: Metal-Alley-Redux-V2.smf
Mod: "XTA v8.1" from XTAPE.sd7
Number of damage types: 5
Spring 0.74b3
Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
LuaUI: bound F11 to the widget selector
LuaUI: bound CTRL+F11 to tweak mode
LuaUI v0.1
Player GenBlood joined as 0
AI\Bot-libs\QAI.dll has C++ interface
Spring 0.74b3 has crashed.
Exception: Access violation (0xc0000005)
Exception Address: 0x6530207a
DLL information:
0x00400000 spring
0x7c900000 ntdll
0x7c800000 kernel32
0x77dd0000 ADVAPI32
0x77e70000 RPCRT4
0x73f10000 dsound
0x77c10000 msvcrt
0x77d40000 USER32
0x77f10000 GDI32
0x774e0000 ole32
0x76b40000 WINMM
0x77c00000 VERSION
0x68b20000 GLU32
0x5ed00000 OPENGL32
0x73760000 DDRAW
0x73bc0000 DCIMAN32
0x76c90000 IMAGEHLP
0x71ad0000 WSOCK32
0x71ab0000 WS2_32
0x71aa0000 WS2HELP
0x10000000 SDL
0x7c340000 MSVCR71
0x00b00000 DevIL
0x66fc0000 freetype6
0x61b80000 zlib1
0x003d0000 glew32
0x76390000 IMM32
0x5ad70000 uxtheme
0x74720000 MSCTF
0x01d50000 ophook32
0x77120000 OLEAUT32
0x755c0000 msctfime
0x69500000 nvoglnt
0x71a50000 mswsock
0x662b0000 hnetcfg
0x71a90000 wshtcpip
0x76f20000 DNSAPI
0x76fb0000 winrnr
0x76f60000 WLDAP32
0x76fc0000 rasadhlp
0x72d20000 wdmaud
0x76c30000 WINTRUST
0x77a80000 CRYPT32
0x77b20000 MSASN1
0x72d10000 msacm32
0x77be0000 MSACM32
0x77bd0000 midimap
0x73ee0000 KsUser
0x652c0000 QAI
0x59a60000 DBGHELP
Stacktrace:
(0) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x6530207A]
(1) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x65301478]
(2) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x653003D9]
(3) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652FA761]
(4) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652FABFF]
(5) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652FACE1]
(6) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652FAC2F]
(7) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652E212D]
(8) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652E1F7F]
(9) C:\Spring74b2\AI\Bot-libs\QAI.dll [0x652C9070]
(10) C:\Spring74b2\spring.exe [0x004D0A9C]
(11) C:\Spring74b2\spring.exe [0x004D2539]
(12) C:\Spring74b2\spring.exe [0x005F3B91]
(13) C:\Spring74b2\spring.exe [0x004DBE41]
(14) C:\Spring74b2\spring.exe [0x004EAD10]
(15) C:\Spring74b2\spring.exe [0x004ECDF4]
(16) C:\Spring74b2\spring.exe [0x007142C6]
(17) C:\Spring74b2\spring.exe [0x00719B96]
(18) C:\Spring74b2\spring.exe [0x00719F52]
(19) C:\Spring74b2\spring.exe [0x0071A0F2]
(20) C:\Spring74b2\spring.exe [0x007963E5]
(21) C:\Spring74b2\spring.exe [0x00401092]
(22) C:\Spring74b2\spring.exe [0x0040110F]
(23) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FD7]
If you need more info I'll post it.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Seems to be a bug with that map, I'll look into it. I've tested it with a few maps, including BrazillianBattlefield, CometCatcherRemake, CoreFaf, and a few others.

EDIT:
Heh, I had a mapwidth and mapheight swapped, should be fixed up now.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

StdInclude.h is NTais include.h with most of it commented out.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Yeah, I don't think I ever ended up using that at all. :) It's never been in my project file, I'm pretty sure.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Doesnt need to be for it to be compiled in.
Can we expect a v2.1/2? If so what new stuff can we expect?
Post Reply

Return to “AI”