View topic - Interface Redesign



All times are UTC + 1 hour


Post new topic Reply to topic  [ 448 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23  Next
Author Message
 Post subject: Re: Interface Redesign
PostPosted: 24 Jan 2009, 21:17 
Moderator

Joined: 22 Aug 2006, 15:19
hoijui wrote:
You mean, we should have a "Hello, World" Test AI scheme, which is then implemted in each language (eg. C, C++, Java, C#) in a Test AI.

This scheme had to be working with absolutely every kind of mod, an if not everything can be done, it had to not crash at least, and report why it could not do what.

yes, exactly that; but, to simplify things, i suggest splitting every use case to separate demo AI.

Quote:
An example for such a scheme:
Code:
snipped

something like this would also be of help.

Quote:
it is possible to draw points, lines, paths and figures wiht the AI interface as it is now, i dont know if arrows are in fugures, or if they had to be constructed manually out of 3 lines eg.

see e.g. TryTarget in Weapon.cpp:
Code:
//geometricObjects->AddLine(weaponMuzzlePos, weaponMuzzlePos+dif, 3, 0, 16);


Quote:
you mean hashes for the mod and the map, to not use cached data for BA6.6 when BA6.8 is loaded eg?
if i am not wrong, this is not possible through the interface at the moment, would have to be added. is this the cleanest solution? (eg, what about mod-name + version?)

yes, exactly this. getting mod name, version and stuff like this should also be exposed. use case is e.g. precomputing choke points for maps/mod+map combos - need ability to access pathfinder data or heightmap+slopemap (if there is such a thing in spring, not sure) and an ability to uniquely identify which map is that.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 17:11 
Moderator

Joined: 22 Aug 2006, 15:19
BTW I strongly suggest merging into master after you get over the build problems. I'm going to need this real soon for uni 8)


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 17:38 
User avatar

Joined: 16 May 2007, 17:33
imbaczek wrote:
BTW I strongly suggest merging into master after you get over the build problems. I'm going to need this real soon for uni 8)

Oh, will you write an AI for Spring?
Or only a small AI which demonstrates an algorithm?

Seems like lot of AIs will grow up this year.
I can count 6 new AI project :mrgreen:


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 17:44 
Moderator

Joined: 22 Aug 2006, 15:19
indeed, i plan to write an ai, but it's going to be a KP AI because TA or any other mods are too complex ^^


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 17:55 
User avatar

Joined: 16 May 2007, 17:33
imbaczek wrote:
indeed, i plan to write an ai, but it's going to be a KP AI because TA or any other mods are too complex ^^

Well KP has already a AI (LuaAI) so you have a small competition.

I want to write a AI, too after the MonoAIInterface of course.
But I do not know which mod or how many I want to target for support.
And I'm not sure in which language, probably C# but I do not know :?


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 18:06 
Moderator

Joined: 22 Aug 2006, 15:19
that KP has its own AI is a good thing, i have a benchmark opponent ^^


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 18:09 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
that is the plan anyway :-)


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 18:25 
User avatar

Joined: 16 May 2007, 17:33
hoijui wrote:
that is the plan anyway :-)

Do you mean the benchmark?

I think my interface will go under as it is now :|

Hoijui: If you have the most things done in the new interface maybe which should discuss the Lua(mod)<->AI thing....


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 19:52 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
was reffereing to the merge into master. i compleetly missed the posts after that somehow :/

well, if i get the branch to compile on the buildbot, next thing is to merge into master..
i guess there will be some weeks of bug hunting after that.
... and then i am willing to go deeply into LUA-AI discussions.. well we can discuss now, but i wont code anything, the merge is just much more important to me right now.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 20:14 
Moderator

Joined: 22 Aug 2006, 15:19
LUA AI is something that current SendToAI (or whatever it's called) can take care of. The mod and the AI should agree on a protocol and just use it completely independently of spring.

I'm more interested in accessing modoptions/engineoptions/mapoptions/player settings and generally the stuff i requested examples for.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 20:36 
User avatar

Joined: 16 May 2007, 17:33
So we will talk about a protocol...
Which addresses hundreds of possibilities.

I think we already have something for custom resources, I'm right?


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 21:04 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
yes, resources are modular, from an AIs perspective.
there are not getMetalXXX() methods, but rather getResourceXXX(int resourceIndex)
i think it would be bad if mods and AIs would define special protocols. if you want that, you should rather write a LUA AI.
I think the goal of the Skirmish AI interface has to be complete modularity. also, to some extend it has to follow a common protocol, as it all has ot pass the C barrier.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 27 Jan 2009, 21:05 
Moderator

Joined: 22 Aug 2006, 15:19
but imho the priority should be to expose engine data which is otherwise inaccessible.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 28 Jan 2009, 23:35 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
We have a proposal for defining extra resources via lua that we can use right?

I would suggest we sort out the debacle that is transformations/upgrades of individual units. I cant even ask if all mods use the same implementation to pull it off, and in some cases it looks so easy to support but nobodies talking when asked, or they respond with garbage answers like learn lua.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 29 Jan 2009, 04:42 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
They mostly use the same gadget, and it's a simple order to issue. Issue is that the info is only exposed in the tooltip atm.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 29 Jan 2009, 05:10 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
I would suggest we sort out the debacle that is transformations/upgrades of individual units. I cant even ask if all mods use the same implementation to pull it off, and in some cases it looks so easy to support but nobodies talking when asked, or they respond with garbage answers like learn lua.
Everything but P.U.R.E. is pretty much just using CA's Morph Gadget. It should be easy enough, with Lua-->AI, to do a query through Lua to find out whether a given command ID exists, and whether that corresponds to the known command ID for Morph.

For P.U.R.E., that approach is utterly impossible. I use a transformation method that's custom to each unit-type, and the commands aren't standardized. If anybody wants to get really serious about this topic, I have a fairly lengthy set of feature specifications I'd like to propose, that would allow for the necessary flexibility.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 29 Jan 2009, 08:59 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
we should start a new topic for the LUA <-> AI stuff, or in the case of resources, we could go on here, though only the details of the implementaiton are left undecided there, and they may be better discussed when we actually will be implementing it:
viewtopic.php?f=15&t=16889


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 29 Jan 2009, 14:34 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
Argh wrote:
Everything but P.U.R.E. is pretty much just using CA's Morph Gadget. It should be easy enough, with Lua-->AI, to do a query through Lua to find out whether a given command ID exists, and whether that corresponds to the known command ID for Morph.

For P.U.R.E., that approach is utterly impossible. I use a transformation method that's custom to each unit-type, and the commands aren't standardized. If anybody wants to get really serious about this topic, I have a fairly lengthy set of feature specifications I'd like to propose, that would allow for the necessary flexibility.


In that case you could provide a wrapper layer around you implementation conforming to an agreed interface layer or mechanism. Since morphing is quite a common feature theres no reason we cant roll it into the C API


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 23 Feb 2009, 16:05 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
merged into master.

i should be in the lobby these days for direct help. or you might write mantis reports in hte AI section, or fix it yourself :D

You may use SpringLobby for testing, as it is curently the only lobby that supperts the new AI system. other lobby defs can come to me for help with implementing it.

known issue:
under Linux, you will probably have to do the following for hte Java AI interface to work (runtime):
Code:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/i386/server/

while ${JAVA_HOME}/jre/lib/i386/server/ should be a folder containing libjvm.so.
It seems that this is at least needed under Ubuntu.


Top
 Offline Profile  
 
 Post subject: Re: Interface Redesign
PostPosted: 23 Feb 2009, 17:14 
User avatar

Joined: 16 May 2007, 17:33
Nice, no more double merging master->caiinterface->monoaiinterface.

Btw. my interface should be ready in one month or less but without a prober OO wrapper or framework.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 448 posts ]  Go to page Previous  1 ... 19, 20, 21, 22, 23  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


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:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.