ValidAIs.lua

ValidAIs.lua

Requests for features in the spring code.

Moderator: Moderators

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

ValidAIs.lua

Post by zwzsg »

Feature Request: ValidAIs.lua

It would be a file that works just like ValidMaps.lua, but for AIs.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: ValidAIs.lua

Post by BrainDamage »

i once asked for something similar, ie ais be capable to list mods they are compatible with, but all i got was complaints from ai devs..
http://springrts.com/phpbb/viewtopic.ph ... 05#p241605
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

There are way more mods than C++ AI.

Therefore it makes more sense for each of the modder to test his mod against the 6 or so AI, than for the 6 or so AI-devs to test his AI against the > 9000 mods.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: ValidAIs.lua

Post by imbaczek »

this file should be only a suggestion, otherwise how would you develop an ai for a new mod? (yeah, that's easy, but how would you explain your testers that they need a modded mod?)

but in principle it's not a bad idea at all.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

imbaczek wrote:this file should be only a suggestion, otherwise how would you develop an ai for a new mod?
How comes map makers are still making maps nowadays with ValidMaps.lua?
imbaczek wrote:how would you explain your testers that they need a modded mod?
I would check myself the AI work with my mods, then release a new version of the mod. I would also allow any AIs that have certain sequences of letters.

If I am not around, the AI maker can release a mod .sd7 with nothing but a modinfo.tdf and a ValidMaps.lua, for testing purpose. Lastly, I certainly don't except any generic TA rehash mod to make use of it.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: ValidAIs.lua

Post by imbaczek »

zwzsg wrote:How comes map makers are still making maps nowadays with ValidMaps.lua?
because you're the only one who uses it ^^ BTW i think that ValidMaps.lua should also be merely a suggestion and all maps should show up after telling a lobby to do so - with the valid ones taking top spots on the list. I envision the same solution for ValidAIs.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

imbaczek wrote:
zwzsg wrote:How comes map makers are still making maps nowadays with ValidMaps.lua?
because you're the only one who uses it ^^
Not even: My only mod using it is not released.
imbaczek wrote:BTW i think that ValidMaps.lua should also be merely a suggestion and all maps should show up after telling a lobby to do so - with the valid ones taking top spots on the list.
I agree with that. I'd rather have ValidMaps.lua be overideable somehow somewhere, the exact way being left to the inspiration of the Lobby Maker.
imbaczek wrote:I envision the same solution for ValidAIs.
Only if the button to ovverride ValidAIs is extremely well hidden. Bad AI cause much worse issues that bad maps IMO. I've seen AI causing Spring.exe to crash because the mod wasn't fit for them.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: ValidAIs.lua

Post by imbaczek »

zwzsg wrote:
imbaczek wrote:I envision the same solution for ValidAIs.
Only if the button to ovverride ValidAIs is extremely well hidden. Bad AI cause much worse issues that bad maps IMO. I've seen AI causing Spring.exe to crash because the mod wasn't fit for them.
Yes, proper warnings and disclaimers and even discouragements will be needed, but the option should be there.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: ValidAIs.lua

Post by KDR_11k »

imbaczek wrote:
zwzsg wrote:How comes map makers are still making maps nowadays with ValidMaps.lua?
because you're the only one who uses it
I think that's me.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

+1
for imbaczeks solution (ValidAIs.lua containing suggestions)

one small scenario, trying to explain why this is better:
XAI crashes with KP. zwzsg makes sure XAI is not suggested for KP. it can still be tested and used by zwzsg, the XAI dev, and all the users (though the lobby will tell them not to do so). Therefore, users will only crash if they actually do something worng, or want to test stuff they know it is risky. hoijui, zwzsg and Mr. X will receive crash reports (eg infolog.txt's, or error messages) form the users, or will generate them themselfs. maybe XAI needs only a little change to work wiht KP, or at least Mr. X can modify his AI to fail gracefully, or in general give a good error message for unsupported games.
In practice, you would never get any reports if XAI does not show up in the lobby for KP.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

More like:
90% of the people wanting to try Gundam, KP, S44, The Cursed, etc... will pick AAI as it is the first in their list. It won't work because AAI needs configs and anyway can't play non *A mod. The user will not give error report but simply think Spring is crap, and resume playing the lastest C&C.

If there was a ValidAIs.lua to remove AI that we (as mod developpers) know for a fact do no work with the mod, we could remove at least one pitfall in the long list of trap paving the way to getting Spring work.

Anyone either working on AI or working on mods or even Spring-litterate enough to submit useful crash report will have no trouble circumvent the ValidAIs.lua anyway.

So ValidAIs.lua should no be a mere suggestion. The lobby should not just tell "please don't use that AI". It should not even mention the AI no valided by ValidAIs.lua.
In practice, you would never get any reports if XAI does not show up in the lobby for KP.
1) The author of XAI would not care about ModY support anyway, his goal his BA support.
2) I, or any person motivated enough to, could still unzip mod and modify ValidAIs.lua, or edit the startscript with notepad, or whatever, to test XAI with ModY and post an error report. Which wouldn't achieve anything but pages of AF drama.
3) XAI not maintained anymore.
4) Everybody knows that XAI can't play ModY! The newb is laughed at for having tried and having posted his error report.


You have too idyllic views, hoijui:
- Some people want to actually play, not debug.
- AI coder do not care, or have no time to, support every mod.
- Player don't read error messages.
- Crash report are rarely submited.
- Submited crah reports are rarely used or even useful.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

zwzsg wrote:More like:
90% of the people wanting to try Gundam, KP, S44, The Cursed, etc... will pick AAI as it is the first in their list.
no.
imbaczek said lobbies would/should show valid AIs on top of the list, plus invalid ones could be marked red.
zwzsg wrote:
In practice, you would never get any reports if XAI does not show up in the lobby for KP.
1) The author of XAI would not care about ModY support anyway, his goal his BA support. <- not true in practice
2) I, or any person motivated enough to, could still unzip mod and modify ValidAIs.lua, or edit the startscript with notepad, or whatever, to test XAI with ModY and post an error report. Which wouldn't achieve anything but pages of AF drama. <- not every going to happen in practice
3) XAI not maintained anymore.
4) Everybody knows that XAI can't play ModY! The newb is laughed at for having tried and having posted his error report. <- newbs are never laughed at, and they would not choose this AI as it is in red and on the bottom of the list with a tooltip saying DO NOT USE THIS
zwzsg wrote: You have too idyllic views, hoijui:
- Some people want to actually play, not debug.
- AI coder do not care, or have no time to, support every mod.
- Player don't read error messages.
- Crash report are rarely submited.
- Submited crah reports are rarely used or even useful.
I am the AI center of spring these days, and i cna tell yo ui get a lof of reports from users, most of them usefull.
I can imagine that you get tons of less useful ones, from angry users telling you your mod is shit cause it always crashes, case they try to use AAI; but be assured, that there are a lot of useful ones.

We are trying to find a solution that is good for you and for us (AI devs and me). I am sure that the system proposed by imbaczek will help you a lot already (much less enraged users), and still satisfy us.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: ValidAIs.lua

Post by FLOZi »

newbs are never laughed at
I think you overestimate the Spring community.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: ValidAIs.lua

Post by AF »

You cannot blacklist or whitelist AIs because its not that simple. I dont want to have to modify the mod archvie to develop support for it, nor do I want to deal with the problem of support for a game being broken in a new release

What do we do when an AI only supports one faction of 3? Or only certain game modes?

This sort of AI list will only ever work as a blacklist for AIs that are known to not work and never will work, and as a white list for those that definately will work, but it will not remain accurate for long. As soon as an AI or mod changes or a new one is released then it becomes utterly useless. A simple balance change or tech tree change could affect an AI depending on how that AI works.

The best and nearest I managed to what is wanted is getting people to put tags in the archive info file for NTai to read. If a tag was found ti knew which config to read. Whenever a major new release of a game was amde the tag was meant to be changed to signify that a new config should be used that worked differently.

Otherwise a generic configuration would be used
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

hoijui wrote:they would not choose this AI as it is in red and on the bottom of the list with a tooltip saying DO NOT USE THIS
Red catch eyes. Instead of writing a DO NOT USE THIS sign, just hide the AI a little. Like a [>> Show unsupported AI] button extending the panel, a tickbox "show all AI" off by default, ...
AF wrote:nor do I want to deal with the problem of support for a game being broken in a new release
I do want to deal with the problem of AI being broken with my mods but I have no mean to.
AF wrote:I dont want to have to modify the mod archvie to develop support for it
Then don't develop until the modder modify his mod.
AF wrote:What do we do when an AI only supports one faction of 3? Or only certain game modes?
Up to the modder to decide if he still wants to allows it.
AF wrote:This sort of AI list will only ever work as a blacklist for AIs that are known to not work and never will work, and as a white list for those that definately will work, but it will not remain accurate for long. As soon as an AI or mod changes or a new one is released then it becomes utterly useless. A simple balance change or tech tree change could affect an AI depending on how that AI works.
Not really. Beside NTai which first worked then didn't work, all the AI that worked with a mod kept on working with it, and the AI hopelessly broken for a mod didn't start working by magic.
AF wrote:or mod changes
When mod changes, ValidAIs.lua can be updated.
AF wrote:The best and nearest I managed to what is wanted is getting people to put tags in the archive info file for NTai to read. If a tag was found ti knew which config to read.
But even when the NTai tag was not present, the NTai could still be picked in the list of AI, and it was up to the end user to understand why it didn't work.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: ValidAIs.lua

Post by hoijui »

zwzsg wrote:
hoijui wrote:they would not choose this AI as it is in red and on the bottom of the list with a tooltip saying DO NOT USE THIS
Red catch eyes. Instead of writing a DO NOT USE THIS sign, just hide the AI a little. Like a [>> Show unsupported AI] button extending the panel, a tickbox "show all AI" off by default, ...
yeah.. to me, this are details, and up to the lobby devs anyway.

you seem to think mod devs should have all the rights...
to say it again. the proposed way would make live easier for you and not cut out much for AI devs, but yo useem not to be happy wiht this and want all the good for yourself, and force AI devs to do more work and get less reports.
this is socialism!!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: ValidAIs.lua

Post by AF »

zwzsg, an example being when XTA added upgradable commanders and broke ALL the XTA AIs in the process. Your not alone with the NTai kernel panic fiasco and I think it's wise you don't retrace your steps down that dark and firey road.
I do want to deal with the problem of mod being broken with my AIs but I have no mean to.
Then don't develop until the Ai dev modify his AI.
Up to the AI dev to decide if he still wants to allows it.
Not really. Beside kernel panic which first worked then didn't work, all the mod that worked with a AI kept on working with it, and the mod hopelessly broken for a AI didn't start working by magic.
When AI changes, ValidMods.lua can be updated.
But even when the mod tag was not present, the mod could still be picked in the list of mods, and it was up to the end user to understand why it didn't work.
May I also add that if this goes beyond suggestions then you are nto simply fixing a loophole but actually posing a grave threat to the AI development community by adding a seemingly impenetrable barrier for new AI projects.

It is an AIs responsibility too not a mods responsibility to tell the engine what ti supports.

Who is better at telling the community what your skills are zwzsg? A random person who comes into threads and exclaims the truth, or you yourself? So in that case which is better at giving reliable information on what games an AI supports? The AI itself ? Or a mod writen by somebody else? If an AI has incorrect information then that is a bug, and I find it far more likely that a mod will get it wrong, I trust an AI developer knows more about what games hsi AI supports than a flotilla of random content developers.

And I will pretend you did not tell someone to quit developing while you work on your project. You should be ashamed of yourself for even suggesting it.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: ValidAIs.lua

Post by zwzsg »

Bump!

Recent studies indicate lack of ValidAIs.lua is the main cause of leaking bucket syndrome: http://springrts.com/phpbb/viewtopic.php?f=11&t=21865

Alantai Firestar, by talking against ValidAIs.lua, you are personally responsible for the loss of countless potential players.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: ValidAIs.lua

Post by FLOZi »

S44 has had several players being puzzled over why their game is crashing when trying to use AI's that don't support it.

+1 to this request.
Last edited by FLOZi on 26 Jan 2010, 19:28, edited 1 time in total.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: ValidAIs.lua

Post by Pxtl »

Do AIs have a metadata file (analogous to mapinfo.lua and modinfo.lua)

If so, then AI devs could use this spot to inform mods that they support their gameplay, couldn't they? For example:

Z develops KP, restricts it to known-KP-supporting mods.

X develops a new AI, and tests it against KP and a variety of other mods. To inform KP that he supports it, he adds "KP" to the mod-tags in his hypothetical AIInfo.Lua.

The ValidAIs.Lua reads the AI's AIInfo.Lua and adds the AI to it's whitelist.

Totally custom behavior, but using a "mods" collection in the AI-Info to allow new AIs into the fold.
Post Reply

Return to “Feature Requests”