ValidAIs.lua - Page 4

ValidAIs.lua

Requests for features in the spring code.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: ValidAIs.lua

Post by Argh »

It would need at least a map scanner able to extract the minimap of any maps, and I don't even know how would that be doable.
IDK either... maybe for each map in maps, VFS to unzip (if not SDD) grab mini.dds / whatever if present? When I've gotten some sleep, I'll take a look at that.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

Sure, but few maps include a valid mini.dds or mini.bmp. Most of the time it's either absent or a black one.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: ValidAIs.lua

Post by Argh »

True; the only way then (with Lua, at any rate) is... the very first time a new map's detected... run the map, capture a screen from tab view and crop it.

Or ask the Lobby folks how they're auto-creating minimaps for maps that don't have one; with io, it's probably feasible to duplicate their code in Lua. Not *pleasant*... but possible. File parsing is file parsing, after all.

Or just don't bother, and maybe mappers will get the hint someday that not including a minimap is not going to help them create popular products. Maybe I can deliver one of my infamous sermons to that effect, not that I expect it to work, tbh ;)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: ValidAIs.lua

Post by Tobi »

Special call-out to get minimap from .smf file would be easier, but this seems quite off-topic here.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

What do newbies loves more than skirmishes? Bot-stomping! And coding a Lua lobby that support multiplayer, for the newbs to join and team up against an AI, is just a dream. At this point, it is ludicrous to discard the existing lobbies, they are lighyears ahead of anything a widget could achieve.

Whilst being an worthy endeavour, this whole concept of Lua lobby is off-topic. Would a moderator kindly split this derailing, from there to here, so we can get back to the subject at hand: ValidAIs.lua
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: ValidAIs.lua

Post by AF »

I support a dual white list, with a white list in mod and AI.

As for testing, you can test your game with my AI and tell me if you want to save me time and effort, Id rather know it works than be told ages on that my project is being used in a game yet I have made no effort to support it because I wasn't even aware, resulting in negative design decisions.

Again:

AIs that do not crash gracefully are downright irresponsible, and should not be distributed

As for your comment Argh on NTai not doing enough to notify the user upon a failure, sometimes this is unavoidable. I don't have the means to make ti obvious to the user that NTai has failed without writing up widgets to block out the screen.

Historically all Ive been able to do is spam the console, but at start up the console is subjected to a torrent of messages and it quickly gets buried and out of view.

Heck I should be able to write up my own white list system via AIInfo.lua that checks these things but I don't know how, and since NTai makes a fair job at playing unsupported mods anyway, and will play most discounting exceptions like tower defence or THIS etc
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

yeah.. the main problem (from my point of view), that makes it hard for AIs to communicate with the user is a missing cross mod Lua GUI framework.
of course, there is other stuff missing, mainly, a good/easy way for AI <=> Lua (widgets) communication, but that is something i could do, and which would not need so much time. my motivation just was not high enough for this yet. will do it some day; sooner if i see more use for it.

i did not yet put much though into this, put it would need some stuff like:
showing map overlays, showing special messages, for example, big fat red screen-centered: "AI X does not support this Mod/Game!". and maybe a basic Yes/No dialog and an option panel (yeah, that would already be quite some work, i guess).

the problem with this...
it would have to be shipped with every mod (which wants AIs to be able to use this), and of course it would not fit their design guidelines, and even if it would be fully skin-able and whatnot, i can could well imagine and understand if mod devs do not want to create and maintain an additional skin/design format just for AI support widgets.
-> all in all -> non-trivia problems

are there better solutions?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: ValidAIs.lua

Post by Tobi »

Make the AI send a predefined Lua UI message and have the game be responsible for including a default enabled widget that displays this big fat warning in whatever style the game wants if this predefined message is received.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

hmm yeah true, for a simple message alone, it should be no problem, and for more stuff.. well, most of it is only applicable for AI testing/developing, so having one widget that looks the same for all mods, and has to be installed by the user/dev himself, should be ok too, as long as the AI can run without it too.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: ValidAIs.lua

Post by Argh »

Make the AI send a predefined Lua UI message and have the game be responsible for including a default enabled widget that displays this big fat warning in whatever style the game wants if this predefined message is received.
That. Exactly. Hell, I'll write the damn Widget, if an AI can demonstrate compliance. It will take maybe half an hour.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: ValidAIs.lua

Post by AF »

Argh wrote:
Make the AI send a predefined Lua UI message and have the game be responsible for including a default enabled widget that displays this big fat warning in whatever style the game wants if this predefined message is received.
That. Exactly. Hell, I'll write the damn Widget, if an AI can demonstrate compliance. It will take maybe half an hour.

This would be useful for me, but I wont have anything to show until such a widget exists. Chicken/egg problem here.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

edit: skip garbage until READ HERE

a question:
how would the white-listing work, in terms of shortName version.
shortName will have to be used/defined always, and i guess, we just do == comparison (this is, for both mod and ai). now what about the version?
simplest of course, we ignore versions completely.
we could also give the version less importance, eg:
base value: 0
short-name match: +2
version match: +1
any value > 0 -> valid
and then it is up to lobbies how to handle the rest (eg, different colors or ordering in the selection list)

an other sub-decission to be taken:
which version to handle how:
for example, i could imagine that the AI version is less important, first, cause most AIs do not ever change it ;-), and second, if they change, they change more often, with less fatal changes to certain mods usually.. and nobody would probably keep track of that...

an other thing: what about version ==, >=, and multiple accepted versions as an array...

in short.. can we just ignore versions alltogether? :D

READ HERE
not am in good shape...
so the versions matter or not will be handled inside ValidAIs.lua, and i do not have to worry about that. only for AIs white list checking against the current mod, i would have to do the version checking myself.
i will not do that for now.
though that brings me to an other question:
what exactly should i use to check against the AIs white-list?
mod name, short-name, or archive name?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

Just ignore AI versions. When a new version comes out and makes the AI compatible, then a whitelist can be made.

Similarly, it would be better if the AI whitelist ignored the version of the mod. Since the mod name often comes with version appended to it, I guess use mod short name?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: ValidAIs.lua

Post by SpliFF »

Ignoring versions or using >= is a very bad idea. it defeats the entire MEANING of the whitelist, which is not "I think it will work" but "I have tested this, and it works"

You allow that sort of laziness and you're back where this started. New players pick up an old mod with ">= SuperAI 0.1" when in fact support was broken in "SuperAI 0.3" and you've just crashed their game.
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: ValidAIs.lua

Post by slogic »

You're all talking way too much with no progress. Just tell AI devs and lobby devs key names and format specification withing AIInfo.lua where we can enumerate short names of supported or never supported mods (yeah, white list and backlist), then let lobby devs to implement them is their lovely way and that is all. Then we'll see how this will help in practice.

Each AI version has its own AIInfo.lua. So, we can track mods per AI version.

Also why the hell mod devs should decide AI can work with their mod or not? New mod is always in untested state: not in black and not in whitelist. And lobby will allow to play with untested AI. It is just more confusing stuff when fixing problems like "why AI is not listed for mod": we need to scan two files instead of one.

Make things more simple cause they are more stable.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

please slogic.. you are of no help here (read, you are messing it all up again). if you want to know why there is so much talk about this, read the whole thread. we have come up with a solution that everyone (or the majority) is happy with. also, it needs to be implemented in unitsync, not the lobbies. i started doing it, but it fell short, and stays in-the-makings because of my general lack of motivation these days.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: ValidAIs.lua

Post by Forboding Angel »

ValidAIs.lua should be strict. If an AI dev isn't smart enough to download the source of the game and change it himself in an sdd or at the very least ask the gamedev, then that really isn't our problem.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: ValidAIs.lua

Post by AF »

Forboding Angel wrote:ValidAIs.lua should be strict. If an AI dev isn't smart enough to download the source of the game and change it himself in an sdd or at the very least ask the gamedev, then that really isn't our problem.
What if EE was the most popular game, dwarfing BA and ZK, and it had a ValidAIs.lua file? What if a new AI came out for EE, or a major bug meant the existing AIs needed updating? Fang isn't here and when he is here, releasing more EE archives is the last thing he'd want, and we're forbidden from releasing new versions of EE
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

Then we would be left wondering how comes a game that crash in twenty different places, where the start units don't even spawn, a game the archive of isn't even listed by Spring & lobbies, would somehow still manage to reach top popularity.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: ValidAIs.lua

Post by FLOZi »

AF wrote:
Forboding Angel wrote:ValidAIs.lua should be strict. If an AI dev isn't smart enough to download the source of the game and change it himself in an sdd or at the very least ask the gamedev, then that really isn't our problem.
What if EE was the most popular game, dwarfing BA and ZK, and it had a ValidAIs.lua file? What if a new AI came out for EE, or a major bug meant the existing AIs needed updating? Fang isn't here and when he is here, releasing more EE archives is the last thing he'd want, and we're forbidden from releasing new versions of EE
More evidence for such an attitude being completely unacceptable in an OS community - not evidence against the utility of validais.lua
Post Reply

Return to “Feature Requests”