State of the Nation

State of the Nation

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

Moderators: hoijui, Moderators

User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

State of the Nation

Post by krogothe »

Hey guys,

Its been ages since I've been around these forums, played spring etc...
For those that don't know me, I was the guy who started KAI (now called KAIK?).

I am applying for my Master's degree, and suddenly the prospects of working on a serious AI became attractive once again, as I need a large-ish project proposal for next year. KAI's combat manager was already used as a basis for a master's thesis by firenu http://www.diva-portal.org/diva/getDocu ... lltext.pdf.

With my MUCH improved experience in coding, algorithms and AI it could really become something interesting :-)

Now to the questions that led me to post here in first place:

1- What are the prospects for coding AIs in Java in the near future (few months)? I read about JAI but apparently that is deprecated etc. This is very important as I can code in Java(eclipse) about 10x faster than in C++, no kidding!
1a- Is there a large performance hit by using the Java interface? (if less than an order of magnitude it shouldn't matter too much)
2-What is the state of the interface and engine complexity? I remember that by late KAI development it was getting ridiculous. Units could have hundreds of tags to let them do all sorts of stuff and that made it really hard to cater for all mods automatically. Was there a cleanup on the tags units are allowed to have etc?
3-Have there been any major changes to the AI interface over the past 2 years?


I'll try and download spring at some point to see what's new, after so long I bet theres a lot of cool new stuff!

Glad to see so many old-school people and devs are still around :-)

x
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: State of the Nation

Post by imbaczek »

look around this forum and the dev forum. see caiinterface branch in git, which also has java bindings.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: State of the Nation

Post by Kloot »

Regarding #2: afraid not, the tag forest has only grown bigger. But the real complexity these days lies in interaction with mod-side Lua gadgets, which can override and expand engine logic almost arbitrarily. As a result of that, mods are also far more diverse than three years ago. Universal support was possible for, say, AA 2.23 and EE 0.173, but not really for current (heavily Lua-driven) games.
KAI (now called KAIK?)
FTR, that wasn't my idea. ;)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: State of the Nation

Post by hoijui »

sounds good!!!
yeah JAI is deprecated, but the new interface is better, of course ;-)
it is at least as stable as JAI was, i would say, and it is.. well better :D

it should come into spring master very soon. there is only one thing that holds me back: the branch is not building on the buildbot, partly because of the buildbot setup, partly because of the scons buildscript.
Thanks to BrainDamage, SpringLobby supports the new interface aswell now (though it is not yet in the main dev line of SpringLobby, i think).
so when the problems with the buildbot are fixed, we can do some tests, and then merge into master.
then we will have to get support for the LUA-driven stuff into AIs.

So.. you should be able to write your AI in Java. you can already have a look at how it works in the caiinterface branch, as imbaczek said. it is fully working, just not yet heavyly tested, but some ppl do use it for experimenting already.

KAI is still in the repo, i guess as you left it here.

(i also see the masses of tags as the most annoying thing for AI devs :/ )
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: State of the Nation

Post by BrainDamage »

hoijui wrote: Thanks to BrainDamage, SpringLobby supports the new interface aswell now (though it is not yet in the main dev line of SpringLobby, i think).
it actually is, SL detects if the unitsync version supports the functions and switches modality automatically, grab a recent release and you should be set
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: State of the Nation

Post by AF »

Can someone answer the question on java AI efficiency versus c++ efficiency effectively? I'd be interested to see how the two compare in tests.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: State of the Nation

Post by Forboding Angel »

Korgothe, If you are serious about starting this up again, I would love to help in the Way of EvolutionRTS vs AI's (pretty much the same thing as KAI vs EE). Just pm me or catch me on the lobby. I can promise plenty of feedback ;p
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: State of the Nation

Post by hoijui »

there are no performance test or whatsoever so far.
though....
if we could put together a really simple test scenario, i could probalby write some AWK that generates the tests automatically.

i would need suggestions from AI devs for that.. what would be a good test? i think of something like: fetch all UnitDefs, cheat create 1000 units, give a new move order to each unit every frame..
though this would rather stress test the engine, hm? :/
well as said. you know better what a good test would contain.
I am pretty sure that.. if there is a problem wiht performance, it would be becuase of JNI calls, an dnot becuase Java is slower then C/C++. I did a search for JNI performance but... some say it is very slow, some say it is very fast. So we need a benchmark i think, but i expect it to not be a problem, and if yes, thne only on very old hardware, that is barely capable of running Spring (like my machine eg :D )
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Re: State of the Nation

Post by Agon »

What about calling faked handleEvents 1000 times?
And count the time for C/C++ and Java.
Hopeful later Mono (C#) with JIT or AOT compiled, too.

Best would be to do this without the engine or with the dedicated server if removing the engine from the AI for test is to much work.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: State of the Nation

Post by 1v0ry_k1ng »

hey welcome back

your making another AI :D ?

edit: holy shit thats the testgame it played against me in the apendix 1: experiment
User avatar
adin_panther
Posts: 164
Joined: 06 Jan 2009, 14:14

Re: State of the Nation

Post by adin_panther »

Awesome ! Cool to see you back. Good luck on that AI, i will be very happy to test it ^^
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: State of the Nation

Post by AF »

So krogothe would your masters start in september? I thought your current course was longer!
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: State of the Nation

Post by SpliFF »

Hi krogothe,

You don't know me, as I am new around Spring. I have lead mod projects for Dawn Of War (Epic Legions) and Supreme Commander (Coop, Advanced AI, Multiplayer Save, Mod Support).

I'm writing a Spring mod called Metalstorm with plans to push the RTS genre into new territory. I'm telling you this because it may make an excellent platform for your new AI project. The reasons are:

* It is being designed from the ground up for AI interaction at the army and squad level.
* It is designed for Support AIs to help micromanage player armies.
* It has limited unit types with minimal or no special abilities. You wouldn't need to worry about custom tags. All units are logical combinations of chassis (small, medium or large) + weapon(s).
* It supports orders applied directly to the map (zones). Idle units in zones take on "standing orders" specific to that zone. In other words you can set the region around an enemy base to "capture" and your units will take out defenses and leave resource structures intact.
* It has simple armor types.
* It has no construction or tech tree. All units and structures are provided at game setup and/or via dropships. This eliminates some common AI weaknesses (like buildings blocking access) and allows you to concentrate on AI combat techniques.
* No economy to manage.
* No TA content or commercial IP, so no license issues.
* Small team of competent developers (2 lua devs, 1 modeller).
* Serious project with realistic goals, not likely to die anytime soon.

Like I said, the main draw for this mod will be that use of player AI is not considered a cheat but rather an essential component of the gameplay. This makes AI as important for online play as for SP. Having the AI run your units is a great way to test your AI, since you can see what it is planning by simply pressing shift.

The main drawback is this is a mod in development. However I believe i can complete all of the key components fast enough to not impact on your project.

I am going to write the AI components in Lua, however if you were interested in developing your AI for this platform I would have no objections to it being Java.

Let me know if you are interested and I will be happy to provide additional details.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Re: State of the Nation

Post by krogothe »

Thanks for the feedback guys (feel free to keep it coming!)
Regarding #2: afraid not, the tag forest has only grown bigger.
Too bad! This really makes it hard to provide universal support, and specializing is a bad idea. This is especially true when a mod can be the most popular today and not played at all in 3 months...
But the real complexity these days lies in interaction with mod-side Lua gadgets, which can override and expand engine logic almost arbitrarily
Eeek! Can those gadgets add special abilities/buttons like a dgun? AIs can be made to learn over time if a unit that has bad stats but performs well is good, but they cannot guess what abilities are for and how to target them.
So krogothe would your masters start in september? I thought your current course was longer!
Well october! When I applied for uni I thought my course would be 4 years, but it is actually 3, even my student loan got it wrong...

Spliff, your mod sounds really cool! I actually enjoyed the economy aspect of KAI (it could beat really good players at that in some mods/maps), but combat was great fun. One of my dreams was to make KAI a player assistant AI, managing your idle units, micromanaging attack groups, building mexes, repairing the base, etc...

It is all too soon to tell, however. I am insanely busy in my final year and could well be working as soon as I graduate (skipping the master's). The prospects of writing an AI in java are very exciting but at the same time, the tag forest is a big turn-off. Making the engine more general necessarily makes modding more complex, and soon we will be writing our own games in the high-level programming language called spring, only it will be full of old deprecated/duplicated stuff (e.g. tags that could be replaced by lua scripts) ;-)

I'll try and keep you guys posted, maybe even have a game or two once i get the time, take care!
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: State of the Nation

Post by imbaczek »

krogothe wrote:Eeek! Can those gadgets add special abilities/buttons like a dgun? AIs can be made to learn over time if a unit that has bad stats but performs well is good, but they cannot guess what abilities are for and how to target them.
Yes and yes. You need to specialize or provide a scripting interface, no way around it. (Or make skynet.)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: State of the Nation

Post by hoijui »

there is no way around it yet, but the idea is to make everything available through the C interface. though, it will need planning and.. coding.. (yeah!)
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: State of the Nation

Post by Pxtl »

User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Re: State of the Nation

Post by Agon »

krogothe:
Maybe focus on one or two mods?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: State of the Nation

Post by Argh »

Yes and yes. You need to specialize or provide a scripting interface, no way around it. (Or make skynet.)
Absolutely yes.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: State of the Nation

Post by Acidd_UK »

Agon wrote:krogothe:
Maybe focus on one or two mods?
This is almost certainly the way to go - trying ot handle all the nuances even of all the *A mods would rapidly drive a generic AI mental.
Post Reply

Return to “AI”