How to set a global LuaAI? - Page 3

How to set a global LuaAI?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

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

Re: How to set a global LuaAI?

Post by AF »

AF wrote:Any replies to this post are to be made in private, it's amazing this thread isnt any more derailed than it is
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to set a global LuaAI?

Post by Forboding Angel »

If hoijui's and Tobi's ideas on the subject were melded into one working deal, I would be more or less happy with it. However, it is a requirement that no part of these AI's break upon new engine releases (unless something with luaai changes that requires an edit).
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: How to set a global LuaAI?

Post by SpliFF »

I thought Forbs original proposal was adequate. It would seem to be:

1.) AI dev develops general AI
2.) Contacts authors of game(s) and gets added to AI list and dependencies
3.) Pushes new versions as standalone archive at any time (because dependencies are unversioned, right?)

That would seem to:
1.) Work without engine changes
2.) Give game authors the ability to whitelist AIs and later revoke
3.) Give AI authors the ability to push new versions as long as the archive/dependency name of the AI doesn't change

... or have I missed something?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: How to set a global LuaAI?

Post by hoijui »

dependencies are versioned.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: How to set a global LuaAI?

Post by AF »

Pitfalls:
  • Beta and alpha versions of AI are discriminated against testing
  • Popular AIs that work well enough for the community but fail to satisfy some specific criteria of the game developer are discriminated against
  • AIs that rely on maphacks may suffer from Ideologies of Games developers despite many users being perfectly fine with it and fully aware
  • Personal Vendettas
  • Continued support of an AI in a game may require AI developers to intervene and accept maintenance of the game should nobody pick it up after a game developer leaves ( yes it works both ways!! )
We should be able to say what definately works, and what definately does not work, but we that should be 2 part data, both from the content dev and the AI dev.

As time has shown content devs dont always stick around, and they dont always suddenly update their information and release a new version just because you announced something. As the only AI developer to actually attempt to put stuff inside many games in this engine that are then released, I got plenty of success getting tags into files, BUT, this didn't happen in a swift precise manner. Modders stuck to their release plans and just tagged what was given to them onto the ends. Why release a whole new version because a version number in an AI changed?

This delay can at times be critical if not devastating. Remember the whole NTai is broken fascade where a version horribly broken was bundled with the engine and the devs refused to fix it saying wait for the next release ( which took almost a year ). Can you guarantee that wouldnt happen with a lua AI because you got bored of dev'ing your game and went elsewhere to gather inspiration? What about games like EE or P.U.R.E? Would you be willing to drag an AI devs name through the mud after making demands of them because your not willing to continue your investment?


Whitelist - This AI/Version of AI definately works ( under spring xyz )
Graylist - This AI has been known to work or might work but either hasnt been tested or isnt 100% there ( e.g. a BA AI that can only do tech 1 but does it well )
Unknown - Shown but with caution and warning, use at users discretion, default status of an AI for which there is no information
DeveloperList - Intended support, under development, for use by content and AI developers, no guarantees made
Black list - Definately does not work, do not show

Priority:

AI then game list, if conflicting values are found, revert to unknown. Black list always takes precedence over other lists. e.g. if game says Black and AI says white, then AI is blacklisted

AI blacklists should be able to blacklist all games for those AIs dedicated to niche games, e.g. a springtanks AI should not require every game developer and AI developer to add springtanks to the blacklist
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to set a global LuaAI?

Post by Forboding Angel »

but AF, you're forgetting something. It wouldn't matter if the game stagnated, because that AI would pretty much always work, old version or no.

For example, if EE had a luaai built in, regardless of the fact that it might be an older version of that AI or not. On the whole, gamedevs around here tend to be more reliable than the AI devs (not really you AF, I'm more speaking of krogothe, reth, submarine, etc).
SpliFF wrote:I thought Forbs original proposal was adequate. It would seem to be:

1.) AI dev develops general AI
2.) Contacts authors of game(s) and gets added to AI list and dependencies
3.) Pushes new versions as standalone archive at any time (because dependencies are unversioned, right?)

That would seem to:
1.) Work without engine changes
2.) Give game authors the ability to whitelist AIs and later revoke
3.) Give AI authors the ability to push new versions as long as the archive/dependency name of the AI doesn't change

... or have I missed something?

Huh? I thought you hated that idea?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: How to set a global LuaAI?

Post by SpliFF »

No, I said I liked the idea but hated the tirade that went along with it.
SpliFF wrote:
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.
The debate derailed into who should have control. I don't care because I don't see many reasons why a game would reject an AI if it was worth anything. My problem was actually with the concept of having to create a "Game + AI" mutator every time a game gets updated.

In short, a game depending on an unversioned AI would suit me but an AI depending on a versioned game would not. The initial approach to game devs wouldn't be that tedious but maintaining constant contact for updates would be. It seems that either way you go the main issue is versioning. So perhaps the question is wether unversioned dependencies are practical.

There are going to be some big issues to consider there. One issue is what to do if players have different versions of an unversioned dependency (insist on the latest version or try to find a version every player has or drop players or throw an error).

This would require some engine development but it seems like the way forward to support not only global LuaAI but also global gadgets.

However it works out I do agree game devs should have the ability to blacklist particular AI if they choose. There's no value in offering the player an AI that doesn't work.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to set a global LuaAI?

Post by Forboding Angel »

what? no you don't have to do that.

Maybe I'm misunderstanding, but lets say that you were doing this work with evo. You would just grab the evo svn (it is public after all), whose version tag never changes. When you're ready for release, just make a copy of all your stuff, dump it in the evo svn and make a patch (actually I'd give you commit access but regardless).

Am I mistaken in that luaais included with the game don't have to have a version tag? (cause if they do, that is monumentally retarded)

And in this case, wouldn't it simply be a matter of exploding it into the evo svn and making a commit (which will turn it into a test revision)? Or, for that matter, send me a zip and I'll do it. Or even better, gimmie svn access to your luaai, and notify me upon significant changes, and I'll do export from your svn and dump the files into evo's svn.

Am I missing some hidden element somewhere? From what I can tell there are 50 million ways to do it and none of them are particularly complicated...
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: How to set a global LuaAI?

Post by SpliFF »

The problem is most AI devs won't want to do that. It will become more of a problem as the number of games grow. You aren't going to get such direct access to every game and for every fix you'd have to repeat this process.

It's important that the AI has it's own stand-alone package. The issue is how that package should be recognised by games.
Post Reply

Return to “Engine”