Page 5 of 17
Posted: 21 Nov 2007, 15:10
by Peet
Hmm...do AIs have access to the fbi's to read an otherwise unused techlevel tag, or would it have to be added to unitdef? T'would definitely be easier to check tech level that way, than checking a unit's place in the build tree.
Posted: 21 Nov 2007, 15:14
by Tobi
Trepan added techlevel to tooltip, isn't that stored in UnitDef?
Posted: 21 Nov 2007, 15:19
by Peet
Ah, yes it is. Accessible as #227 in the AI interface.
Posted: 21 Nov 2007, 15:26
by Kloot
It's true that AI's can read the techLevel tag, but it
doesn't really work in mods like eg. XTA where the
unit hierarchy is a graph rather than a tree (in XTA
the advanced labs can be built by the commander,
so the adv. aircraft plant gets erroneously assigned
to level 0 and all of its build-options to level 1, etc).
Posted: 21 Nov 2007, 16:24
by DJ
@Kloot
Is there any way that in the instance of two annihilators that KAIK can look at the unit data and assess that there is a weakness against air attack? If KAIK realises that its unit group can't over come a defensive position can it differentiate between types of unit groups that might be effective against the target?
I suppose this is really difficult to code, particularly as a human would probably look in that instance to take down surrounding anti air and then assualt the central problem.
I guess the break down would be:
determine the objective or defensive position that is stopping progress
identify the best method to attack that point
if that attack method is likely to be unsuccessful then identify lesser targets around the original target and repeat the process.
Maybe a recursive approach like that to attacking could work?
Failing that could you make the magnitude of how conservative the estimates are reduce in relation to the number of units KAIK has? So if it has 150 spare units it need not be so cautious?
Posted: 21 Nov 2007, 16:55
by AF
While AIs can read the fbis via the VFS, this falls apart as of svn/0.76b1 release as from then on unit definitions could be fbis, lua files, or even xml files ran through a lua based parser.
Posted: 15 Dec 2007, 01:02
by Guiltfeeder566
When can we expect support for naval units.
Posted: 18 Dec 2007, 06:35
by benthemeek
First of all at least for the current release this is the best AI I have played. My friends and I have been teaming up against them for two weeks now. It plays CA excellent with one exception, The computer never makes any storage. So the game pretty much stalls once the computer loses the commander.
Posted: 21 Dec 2007, 13:19
by Tobi
I got a crash with latest KAIK-0.13 (r5082):
http://pastebin.ca/826760
Manually looked up the KAIK stacktrace symbols.
Steps to reproduce: install r5082, host a battle with XTA v9 on Comet Catcher Redux, add four KAIK-0.13 bots, click start. Should crash within a few minutes at most.
Maybe it has to do with the bugged low resources (+low storage) in XTA v9 + Spring SVN, and KAIK not handling that?
Posted: 21 Dec 2007, 14:34
by Kloot
Hmm, that stacktrace looks rather odd... the KAIK
line numbers don't match up to any function calls
and it ends inside CSunParser, which is only used
during initialization (before the "inited succesfully"
prints in infolog). I'll try to reproduce this with my
own 4-way FFA GameSetup script, but it seemed
stable when testing the r5079 changes.
@GuiltFeeder: when I invent a Free-Time Generator
@ben: thanks. Like most AI's though KAIK only builds
storage out of need (typically not before it reaches an
income of +50), but if it loses its commander early its
chances of winning are slim anyway.
Posted: 21 Dec 2007, 15:53
by Tobi
Kloot wrote:Hmm, that stacktrace looks rather odd... the KAIK
line numbers don't match up to any function calls
and it ends inside CSunParser, which is only used
during initialization (before the "inited succesfully"
prints in infolog). I'll try to reproduce this with my
own 4-way FFA GameSetup script, but it seemed
stable when testing the r5079 changes.
Hmmm maybe I should test addr2line and in combination with the chosen debugging symbols format a bit more

Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 04 Jan 2008, 00:58
by YokoZar
KAIK completely freezes Spring for me upon launch with 0.76b1. It generates a blank log file, and I have to kill -9 it after hitting ctrl-alt-f1.
I am on Ubuntu 64 bit. Ubuntu 32 bit users have not reported a similar problem. How can I help debug this?
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 04 Jan 2008, 01:16
by Kloot
Yokozar:
Compile a debug build of KAIK:
Code: Select all
scons configure debug=2
scons GlobalAI
Move KAIK-0.13.so to AI/Bot-libs/ and run Spring in gdb:
Code: Select all
gdb ./spring
r
<do a GlobalAI test with the debug KAIK>
<wait until it crashes>
bt
Hopefully that'll produce some useful output.
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 04 Jan 2008, 01:32
by BrainDamage
i don't own a 64 bit system, but from what i've heard the users are getting ram bombs swapping by several gigs until the kernel kills the process as safety measure, i don't think it will be that easy to trace
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 04 Jan 2008, 01:53
by YokoZar
Brain Damage wrote:i don't own a 64 bit system, but from what i've heard the users are getting ram bombs swapping by several gigs until the kernel kills the process as safety measure, i don't think it will be that easy to trace
Sounds about right.
I suspect this is some integer overflow issue
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 05 Jan 2008, 21:46
by tunafish
Kloot wrote:Yokozar:
Compile a debug build of KAIK:
Move KAIK-0.13.so to AI/Bot-libs/ and run Spring in gdb:
Hopefully that'll produce some useful output.
or, you could just read the compile warnings.
AI/Global/KAIK-0.13/SunParser.cpp:413: warning: comparison is always true due to limited range of data type
The following minimal change fixes it:
Code: Select all
<SunParcer.cpp:406>
vector<string> CSunParser::GetLocationVector(string location) {
transform(location.begin(), location.end(), location.begin(), (int (*)(int)) tolower);
vector<string> loclist;
unsigned long start = 0; /// ***These used to be unsigned int
unsigned long next = 0; /// ***
while ((next = location.find_first_of("\\", start)) != std::string::npos) {
loclist.push_back(location.substr(start, next - start));
start = next + 1;
}
loclist.push_back(location.substr(start));
return loclist;
}
And it runs fine. btw, ran a test game against it and it rocks the socks off of any other ai I've tried.
Also, the smartness of GCC still keeps astounding me. It took quite a lot for a compiler to figure that one out.
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 05 Jan 2008, 21:54
by Kloot
tunafish wrote:
or, you could just read the compile warnings.
Thanks for the presumption, it only just so happens that
warning doesn't show up on 32-bit platforms (obviously,
since sizeof(long) equals sizeof(int) there):
http://pastebin.com/m74b5754b
In any event, fixed as of r5278.
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 07 Jan 2008, 01:41
by YokoZar
Kloot wrote:tunafish wrote:
or, you could just read the compile warnings.
Thanks for the presumption, it only just so happens that
warning doesn't show up on 32-bit platforms (obviously,
since sizeof(long) equals sizeof(int) there):
http://pastebin.com/m74b5754b
In any event, fixed as of r5278.
Thank you.
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 07 Jan 2008, 23:04
by Forboding Angel
As you know I am a very big fan of Kaik considering that it is a bastard to beat, which makes me love it even more!
I have a problem though.
Kaik does not like Evolution RTS, which really sucks. Kaik happens to be a great tool when ti comes to balancing, because of it's matter of fact, cost, vs time vs damage vs etc etc etc, unit selection.
I'm not sure why Kaik doesn't like Evolution. I can only guess that for one, the starting unit is stationary, and has a nanolathe that can build 2 things, an engineer (unlimited amounts), and a base defense tower (limited to 6).
Unit morphing is also possible, but as I understand, AI's are invisible to lua (which is fine, because upgraded versions can be built directly from the special factory).
There are 3 things that are important to AI success in Evolution. 1# storage, throughout the life of the game this builds up quick, but there is an orbital laser (that is commandfire 1) which it will need access to, but a storage of 250k energy per fire needs to be met. THe facility to control the laser gives a 100k energy storage right off the bat. Pretty much, the AI needs to make at least 10 storage buildings during it's lifetime (the storage buildings are cheap and quick to build).
#2, being able to fire the orbital laser. #1 and #2 are definately linked, but the orbital laser becomes a near necessity in the late game.
#3, emp missile launcher, commandfire=1; on this one too. THe buildings are limited to 3. They are dirt cheap, the missiles cost practically nothing, but even if it jsut shoots it at random stuff, believe me it has a positive impact.
Could you look into allowing Kaik to support evolution? It would help me out a lot (because I prefer multiplayer compstomps to straight up human vs human games, plus, it is a vital testing utility).
Re: KAIK 0.13 Unofficial (Spring 0.76b1)
Posted: 08 Jan 2008, 01:32
by YokoZar
Allied KAIK teammates still have a habit of building metal extractors right next to mine, which promptly get 0 metal.