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 » 27 Jan 2010, 18:11

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.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7009
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg » 27 Jan 2010, 18:13

Sure, but few maps include a valid mini.dds or mini.bmp. Most of the time it's either absent or a black one.
0 x

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

Re: ValidAIs.lua

Post by Argh » 27 Jan 2010, 18:25

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 ;)
0 x

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: ValidAIs.lua

Post by Tobi » 27 Jan 2010, 18:51

Special call-out to get minimap from .smf file would be easier, but this seems quite off-topic here.
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7009
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg » 27 Jan 2010, 19:05

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
0 x

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

Re: ValidAIs.lua

Post by AF » 29 Jan 2010, 04:12

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
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui » 29 Jan 2010, 10:52

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?
0 x

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: ValidAIs.lua

Post by Tobi » 29 Jan 2010, 11:00

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.
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui » 29 Jan 2010, 11:04

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.
0 x

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

Re: ValidAIs.lua

Post by Argh » 29 Jan 2010, 15:34

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.
0 x

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

Re: ValidAIs.lua

Post by AF » 31 Jan 2010, 06:11

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.
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui » 31 Jan 2010, 13:26

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?
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7009
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg » 31 Jan 2010, 15:55

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?
0 x

User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: ValidAIs.lua

Post by SpliFF » 31 Jan 2010, 16:03

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.
0 x

slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: ValidAIs.lua

Post by slogic » 27 Feb 2010, 12:09

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.
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui » 27 Feb 2010, 15:12

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.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14548
Joined: 17 Nov 2005, 02:43

Re: ValidAIs.lua

Post by Forboding Angel » 09 Mar 2012, 10:38

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.
0 x

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

Re: ValidAIs.lua

Post by AF » 31 Mar 2012, 00:40

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
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7009
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg » 31 Mar 2012, 00:57

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.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6081
Joined: 29 Apr 2005, 01:14

Re: ValidAIs.lua

Post by FLOZi » 31 Mar 2012, 03:05

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
0 x

Post Reply

Return to “Feature Requests”