View topic - State of the Nation



All times are UTC + 1 hour


Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: State of the Nation
PostPosted: 23 Jan 2009, 16:01 
AI Coder
User avatar

Joined: 14 Nov 2005, 17:07
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/getDocument?urn_nbn_no_ntnu_diva-1002-1__fulltext.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


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 23 Jan 2009, 16:03 
Moderator

Joined: 22 Aug 2006, 15:19
look around this forum and the dev forum. see caiinterface branch in git, which also has java bindings.


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 23 Jan 2009, 16:53 
Spring Developer

Joined: 08 Oct 2006, 15:58
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.

Quote:
KAI (now called KAIK?)


FTR, that wasn't my idea. ;)


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 23 Jan 2009, 18:50 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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 :/ )


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 23 Jan 2009, 18:57 
Lobby Developer
User avatar

Joined: 25 Sep 2006, 12:56
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


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 03:22 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
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.


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 05:56 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
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


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 10:24 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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 )


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 13:56 
User avatar

Joined: 16 May 2007, 17:33
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.


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 15:26 
Map Creator
User avatar

Joined: 10 Mar 2006, 10:24
Location: waiting in line for The Expendables 2
hey welcome back

your making another AI :D ?

edit: holy shit thats the testgame it played against me in the apendix 1: experiment


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 15:45 
User avatar

Joined: 06 Jan 2009, 14:14
Awesome ! Cool to see you back. Good luck on that AI, i will be very happy to test it ^^


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 24 Jan 2009, 19:44 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
So krogothe would your masters start in september? I thought your current course was longer!


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 25 Jan 2009, 01:57 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
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.


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 27 Jan 2009, 13:49 
AI Coder
User avatar

Joined: 14 Nov 2005, 17:07
Thanks for the feedback guys (feel free to keep it coming!)

Quote:
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...

Quote:
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.

Quote:
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!


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 27 Jan 2009, 13:53 
Moderator

Joined: 22 Aug 2006, 15:19
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.)


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 27 Jan 2009, 14:42 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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!)


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 27 Jan 2009, 15:02 
User avatar

Joined: 23 Oct 2004, 00:43
Metalstorm


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 27 Jan 2009, 17:42 
User avatar

Joined: 16 May 2007, 17:33
krogothe:
Maybe focus on one or two mods?


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 28 Jan 2009, 02:15 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
Yes and yes. You need to specialize or provide a scripting interface, no way around it. (Or make skynet.)
Absolutely yes.


Top
 Offline Profile  
 
 Post subject: Re: State of the Nation
PostPosted: 28 Jan 2009, 02:37 
User avatar

Joined: 23 Apr 2006, 01:15
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.