KAIK 0.13 Unofficial (Spring 0.80.5*) - Page 5

KAIK 0.13 Unofficial (Spring 0.80.5*)

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

Moderators: hoijui, Moderators, hoijui, Moderators

Post Reply
User avatar
Peet
Malcontent
Posts: 4381
Joined: 27 Feb 2006, 22:04

Post 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.
0 x

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

Post by Tobi »

Trepan added techlevel to tooltip, isn't that stored in UnitDef?
0 x

User avatar
Peet
Malcontent
Posts: 4381
Joined: 27 Feb 2006, 22:04

Post by Peet »

Ah, yes it is. Accessible as #227 in the AI interface.
0 x

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

Post 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).
Last edited by Kloot on 07 Jan 2008, 19:19, edited 3 times in total.
0 x

User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post 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?
0 x

User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

Post 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.
0 x

Guiltfeeder566
Posts: 13
Joined: 22 Oct 2007, 02:44

Post by Guiltfeeder566 »

When can we expect support for naval units.
0 x

benthemeek
Posts: 10
Joined: 21 Mar 2007, 22:49

Post 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.
0 x

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

Post 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?
0 x

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

Post 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.
0 x

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

Post 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 :?
0 x

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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?
0 x

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

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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.
0 x

User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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
0 x

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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
0 x

tunafish
Posts: 11
Joined: 08 Nov 2007, 22:53

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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.
0 x

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

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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.
0 x

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14636
Joined: 17 Nov 2005, 02:43

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post 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).
0 x

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: KAIK 0.13 Unofficial (Spring 0.76b1)

Post by YokoZar »

Allied KAIK teammates still have a habit of building metal extractors right next to mine, which promptly get 0 metal.
0 x

Post Reply

Return to “AI”