View topic - How to set a global LuaAI?



All times are UTC + 1 hour


Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: 01 May 2011, 09:39 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
I'm working on a LuaAI right now that will support a number a games (and fail quietly on those it doesn't support). Rather than require each game to package the gadget I want to ship it separately.

Trouble is I'm not sure how I'd go about adding it the list returned by LuaAI.lua. In a quick test it looks like lobbies will only read the mods LuaAI.lua and not one in the spring root.

Is there an existing workaround for this or does it require modifying the lobbies and/or unitsync?


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 10:55 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
some time ago in lobby i was told it is not possible (atm?) for technical reasons :/
might also raise a cheats problem?
Still would be nice to have.

btw:
Image to delete as long as no replies


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 14:21 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
Put your AI in an archive/SDD and then make a mod/game that specifies your AI and the chosen game as a dependency?


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 14:27 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
if i am not mistaken the point is to make a LuaAI play a game without modifying the game


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 14:33 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
AF wrote:
Put your AI in an archive/SDD and then make a mod/game that specifies your AI and the chosen game as a dependency?


The issue there is players would have to select the mod (ie, BA + Nemesis AI) and I'd need one of these mods for every Spring game. Then I'd need variations for other mods (BA + Chickens + Nemesis AI) and other AIs (BA + Chickens + Nemesis AI + Shard AI). It's not a very practical solution compared to supporting a master AI file in addition to the mod one.

knorke wrote:
btw:
Image to delete as long as no replies


No button like that and forum says I don't have permission to delete posts


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 15:35 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
No because eventually you'd declare that version fit for purpose and it'd be rolled into BA or whichever game itself either directly or as a versioned dependency


Top
 Offline Profile  
 
PostPosted: 01 May 2011, 19:39 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
That's a terrible idea. It would mean instead of releasing 1 version of the AI there would be multiple versions floating around in different states depending on when a mod was last updated and how cooperative the game authors are. How could you possibly expect that to be easier than allowing non game-specific AI in the engine (like all other AI bindings do already)?

If it can't be done now then the answer is not messy hacks, it's adding support where it's needed (whether that's in the lobbies or unitsync or both).

And before anyone brings up the state of other non-specific AI's that crash the game you must realise this is different. LuaAI's are just gadgets so the worse they can do is play badly or not at all - they aren't likely to crash the whole engine like C++ bindings can.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 01:06 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Once again an AI dev falls into the trap of thinking that we don't want the best AI possible for our games.

This is the biggest bitch that we gamedevs have with you aidevs. We want a static version of your ai included that works. Not a version that we can't control when it works and when it breaks. If, after testing, your ai works correctly, the version would of course be bumped by any decent moddev.

I'll tell you what to do.

Create your luaia as a separate sd7 package, give it modtype 0, a name and a version.

Inform games that you support of it's existence and give them the option of calling your packaged-ai-SD7 as a dependency, thereby adding support for it in the various lobbies. Also, if your sd7 is on springfiles, the lobbies will automatically dl it for the users if the game calls on it as a dependency.

Release each new version on springfiles, as a separate file (so as not to break backwards compatibility for new users (as well as avoiding royally pissing off gamedevs)). Announce your new versions here or via email to mod authors. They'll get tested, and once they are, the moddev can jsut change the version number in the dependency and the new version of your sd7 will be downloaded by the lobbies.

However, most of us may just crack open the sd7 and include the ai directly. Most of us lothe depending on outside sources (hence the demise of the C++ AI).


So you can either go that route, or post an svn of your luaia ready to be dropped into games. If it's worth a shit, it'll get used and updated. If you AI devs would stop being so ridiculously pedantic in trying to control every little fucking facet and realize that the majority of us gamedevs aren't lazy fucktards, you might get more cooperation from us.


As an example, if your AI supported evo, and was decent, I would happily include it, and if I was notified of new significant updates I would update it quite regularly (might wanna keep it to a weekly or bi-weekly/monthly large update, because it's hard to test an ai so often along with all the other shit we have to do on a daily basis).


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 02:19 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
Forboding Angel wrote:
... rant ...


That's all very nice but first you accuse me of being a control freak then go on to demand absolute control over your game. That's nice in theory if user widgets and mutators didn't exist.

The issue for me isn't about controlling your game. It's that the AI I'm writing is 95% framework (shared code) and 5% game-specific logic. When I find a bug in the framework code I want to push 1 archive not 10.

Forboding Angel wrote:
Create your luaia as a separate sd7 package, give it modtype 0, a name and a version.

Inform games that you support of it's existence and give them the option of calling your packaged-ai-SD7 as a dependency, thereby adding support for it in the various lobbies


Everything you just said could have been reduced to these two lines - the rest is just rage and insults. As it happens I have no problem with that option because it solves my only 2 concerns: 1.) that I'm only maintaining and packaging 1 set of code and 2.) that users won't have to host a "Game + AI" version of the game.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 04:53 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
I didn't insult you personally. I just called ai devs control freak, which you are, yet you guys are omgshocked when you find out that gamedevs are too.

Well... duh.

And no, I conveyed some very important information in my post. Read it again without taking everything so damn personal.

Also this was the only part of my post that was a rant:
Quote:
If you AI devs would stop being so ridiculously pedantic in trying to control every little fucking facet and realize that the majority of us gamedevs aren't lazy fucktards, you might get more cooperation from us.


What you have to realize is that AI's are an addon essentially, and a bad AI makes the game look bad as well.

It's like *A advertising, claiming to have singleplayer and pointing at AAI.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 05:45 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Of course LuaAIs should be able to work just like any other AI, without having to alter the game in any way!
It is only like that because of <some technical reason> or because nobody thought of changing it yet.


Quote:
What you have to realize is that AI's are an addon essentially, and a bad AI makes the game look bad as well.
Forb I can not believe you want to "block" global LuaAI because it might look your game look bad? :shock:
So does a a bad non-Lua AI, a bad lobby, a bad map, a bad widget, etc
Of those you can only block the widgets.

Quote:
We want a static version of your ai included that works.
Then make an installer and include whatever you like.

Or ask for white/black list support.
Or make such list yourself as gadget:
If ai != "whatever ai works with evo" then echo ("big fat warning")

In the end it just depends on engine devs anyway. if they explain or implent global Lua AIs ;)


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 06:15 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Why would I want to block it knorke? That's just silly. I was telling him how to do it currently with no necessary change to anything.

Also, this make an installer shit is getting old. Do you want me to continue supporting current spring users or not?


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 06:21 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Quote:
Why would I want to block it knorke? That's just silly.
because some AIs dont work with your game? I plan to soon-ish add such warning to spring tanks, for maps too.
at least in infolog:
"You are playing on a water map. Noticed how you can not even move your units? look at this map list: blabla"
"Noticed how the AI players do not do anything? Use one of those AIs: blabla"

Quote:
how to do it currently with no necessary change to anything.
i see. But just because there is some (imo) hackish way does not mean a better solution is needed.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 06:39 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
You confuse me. First you say that blocking a global luaai feature is bad, then you go on to explain why it should be. Huh?

Suffice it to say, spliff, you should probably work with some gamedevs and get them to include it. If you would like to support evo (which should be really easy, evo has a lot of AI exceptions built in to make it easy for AIs to support it. For example, AI's are exempted from the power/teching requirements, etc) I'll be happy to help out wherever I can.

Unfortunately, I am more or less anti c++ AI anymore, because c++ AI devs go on hiatus and ai breaks and I can't do shit to fix it because I can't compile it, blah blah blah, I want no part of that anymore. So luaai is the only type of ai that holds my interest anymore.

Seriously, why are AI devs so worried about us including their AI's with our games? It's silly. I think that most of us would give the ai dev svn access so that they can make changes, or if they just wanted to work out of their svn and have us update our own copies, that would be fine with me.

But the thing is, AIs such as c++ ai's give us gamedevs no control over it, and therefore we don't want any part of it. Moreover, a luaai in our project we can just revert to an earlier version if the dev goes retarded and breaking crap. Moreover, barring changes to lua, it will ALWAYS work, and that, is attractive.

P.S. Spliff, on a personal note, you seem to think I have it in for you. Well I don't.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 06:51 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Quote:
First you say that blocking a global luaai feature is bad, then you go on to explain why it should be.

global LuaAIs are (afaik) not possible at the moment.
Saying that the engine should not be changed to make them possible: stupid.
Added checks/filters in your game to notice players of failing AI: good.
AIs saying "i cant play this but ill try. ill probally fail." instead of just failing: good

Quote:
I think that most of us would give the ai dev svn access so that they can make changes, or if they just wanted to work out of their svn and have us update our own copies, that would be fine with me
I would be fine too, see:
viewtopic.php?f=15&t=25642
But only because it is the only way ATM. But does not make it a good way.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 08:09 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Ok I understand what you're saying now, and I agree. However, if global ais are allowed, won't it jsut lead to the same issue we have currently with c++ ais?

Imo it is better to force the ai devs and the gamedevs to work together. Lets be honest, neither side is that bad to work with, and for the most part, the vast majority of us devvy types (beit engine, game, ai...) are really nice people.


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 17:01 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
Forboding Angel wrote:

As an example, if your AI supported evo, and was decent, I would happily include it, and if I was notified of new significant updates I would update it
.....

Unfortunately, I am more or less anti c++ AI anymore, because c++ AI devs go on hiatus and ai breaks and I can't do shit to fix it because I can't compile it, blah blah blah, I want no part of that anymore. So luaai is the only type of ai that holds my interest anymore.

Seriously, why are AI devs so worried about us including their AI's with our games? It's silly. I think that most of us would give the ai dev svn access so that they can make changes, or if they just wanted to work out of their svn and have us update our own copies, that would be fine with me.

But the thing is, AIs such as c++ ai's give us gamedevs no control over it, and therefore we don't want any part of it. Moreover, a luaai in our project we can just revert to an earlier version if the dev goes retarded and breaking crap. Moreover, barring changes to lua, it will ALWAYS work, and that, is attractive.

P.S. Spliff, on a personal note, you seem to think I have it in for you. Well I don't.



Im sorry foreboding about my Hiatus due to major internet issues but your forgetting:

  • This is a two way path, be it C++ or lua, you need ot tell me or whichever AI developer that your game has become horribly broken.
  • You made ZERO attempt to contact me, and when you finally said it, it was because I had contacted you to check
  • During my Hiatus the only messages I recieved was a post from zwzsg saying 'omg it still works'

But most damning of all.

  • The problem you complained about required no C++ knowledge or my involvement to fix.

This problem could have been fixed using pure lua, shard lua yes, but nonetheless no C++ knowledge at all. Shards lua is not especially complex at all, it was designed to be simple deliberately. The entire engine API is laid out in api.lua as a proxy object that merely passes parameters making what parameters etc are present obvious, and I was still posting. I was obviously here in some capacity.

To be precise, all you had to do was add a few extra parameters to a function call in a file, numbers to be precise, and change them one by one to see which spacing value worked best.


So why did Shard break while I was away?

It didnt, it was working exactly the same when I left as when I came back properly. So whatever issues it had must have been present when me and you were testing before I went and gone unnoticed

If I had never gone come back, would you all be buggered?

No, Abma and Hoijui are perfectly capable of making sure the c++ continues to work, as it is a very thin layer. There's nothing stopping a pure luaAI port, and the lua that Shard has is simple, and highly modular, with an API that is written out with full parameters in files

Was this because Shard is a C++ AI?

Considering that 90% of Shards code is lua, and the c++ portion is a glorified API wrapper, no it is not. Would the same thing have happened if it was a pure lua AI? YES This is a story of negligence, not technical implementation. No AI interface changes occurred, no binary recompilations were required. The behaviour of Shard did not change

Why have I not investigated the problem with Evolution RTS yet

  • Outright lies on the forum about the demise of native AIs that rely on events that happened 'after' the said demise took place
  • Snarky comments in threads such as this
  • A complete and utter lack of information

I have a lot of things on my plate, but I'm willing to make time if its needed, and indeed I have pencilled in time for a large amount of Shard work for various people and done some groundwork locally, consulted with many people. AI is a lot of work and your very demanding.

But when your being two faced and bitchy about it on the forums, referring to me like this without naming me, when you yourself aren't exactly smelling of roses either makes me think is it worth offering you everything you want on a silver platter. Why should I help you with your game when your being bitchy? Maybe I should go help someone nice who shows gratitude for what help I give and avoid mud throwing on forums.

Wether your being a two faced b*stard or not, that's what it looks like from here, so I would be more tactful if I were you, and maybe I and others will pretend you didnt post in this thread and forget about it

Any replies to this post are to be made in private, it's amazing this thread isnt any more derailed than it is


Last edited by AF on 02 May 2011, 19:19, edited 2 times in total.

Top
 Offline Profile  
 
PostPosted: 02 May 2011, 17:11 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
knorke wrote:
Of course LuaAIs should be able to work just like any other AI, without having to alter the game in any way!
It is only like that because of <some technical reason> or because nobody thought of changing it yet.

this


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 17:12 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
smoth wrote:
knorke wrote:
Of course LuaAIs should be able to work just like any other AI, without having to alter the game in any way!
It is only like that because of <some technical reason> or because nobody thought of changing it yet.

this


+1 It would reduce the needed logistics greatly


Top
 Offline Profile  
 
PostPosted: 02 May 2011, 17:16 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
AF wrote:
smoth wrote:
knorke wrote:
Of course LuaAIs should be able to work just like any other AI, without having to alter the game in any way!
It is only like that because of <some technical reason> or because nobody thought of changing it yet.

this


+1 It would reduce the needed logistics greatly


+1 from me too.

Does anyone have an explanation of the technical problem stopping this?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3  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:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.