OpenXcom Forum

Modding => Released Mods => Brutal AI => Topic started by: Xilmi on March 10, 2023, 02:22:36 pm

Title: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 10, 2023, 02:22:36 pm
I'm seeing some rather contradictory opinions on how configurable a feature should be depending on who you ask.

In the case of my Brutal-AI, I'm seeing modders, who want to have as much control over the feature as they possibly can and seem to not only want to be able to tweak any possible parameter about it but also ask for even more of them.

On the other hand I'm watching players who seem a bit overwhelmed by the options that already exist because it is not clear what kind of experience to expect.

What I've been pondering is whether instead of having 5 different options that all impact the AI's behavior, to simply condense the likely chosen option-combinations into difficulty-levels. There I could focus more on the experience they are going to provide instead of what it means from a technical perspective.

Of course this would drastically reduce the amount of possible combinations. But considering the phenomenon of "overchoice", that can also be a good thing. I think someone who had a bad experience with the current default-configuration might be much more likely to "lower the difficulty-level" instead of reading through and understanding how which option could impact the gameplay in a way might be more suitable to them.

So for those who know about Brutal-OXCE, to make the question less meta and more exemplary, here's what I have in mind:

Instead of having:
"Targetting Mode for Brutal-AI" (TM, 1-4)
"Allow AI to preprime grenades" (PG, bool)
"Allow AI to ignore item-use-turn-limits" (ITL, bool)
"Omnicience for Brutal AI" (OMNI, bool)
"Charge Mode for Brutal-AI" (CM, 0-2)

Right now that's 2x2x2x4x3 = 96 possible configuration-combinations.

I'd instead do something like this:

AI-Difficulty with meaning using the abbreviations I just introduced:

1 = TM 1
2 = TM 3
3 = TM 3, PG, ITL
4 = TM 3, PG, ITL, OMNI
5 = TM 4, PG, ITL, OMNI

Charge mode as global option would be removed completely and instead just always adhere to the Leeroy-flag. Same for TM 2 as it's difference to TM 3 doesn't justify it's separate existence anymore.

Do you think anyone would miss a now possible combination or do you think it would be more accessible and thus motivating to try and find the personal sweet-spot among this massively reduced amount of possible combinations?
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: psavola on March 10, 2023, 05:51:37 pm
I would suspect that only preprime grenades and omniscience would spark particular interest. The preprime grenades one bacause the behaviour differs in a major way from the OXC/OXCE, and some might like to avoid such changes (though because OXC allows you to preprime grenades, also having the aliens to do isn't such a far stretch). Personally I'm indifferent to this behaviour. The omniscience one because some (others) would probably like a tough challenge, but not so that the AI would "cheat". I have not played with Brutal-AI, but I would much more appreciate non-omniscient mode even if I want a challenge.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 10, 2023, 08:44:43 pm
There are already loads of options, never mind non-option configuration variables a player/modder could tweak. Reducing the theoretical size of the decision space for anyone who even looks at what's possible is already a pointless exercise. As long as the whole thing is not yet adopted by a major mod, I would not remove options lightly.

PG and ITL are both things a mod might find useful or not useful independent of targeting considerations, so I would not make these part of the preset. Although I'm not even sure why you can't just leave the turn limits be. They can already be configured to let the aliens ignore them.

In brief, my opinion is that a player who can't decide should rely on someone who can, i.e. a modder. Even if the mod is just a collection of preset difficulty variables. You could just include the five (or six, or seven) 'difficulty levels' as default mods bundled with Brutal-AI, like OXC comes with a bunch of UFOExtender and XcomUtil mods.


Speaking of option presets, I for one would want something like TM3 and PG, but no ITL.

Since TM3 is "debateable of whether that's a cheat or an emulation of smart player behaviour", not sure removing TM2 altogether is a good idea.

Removing charging and tying it to the leeroy flag seems fine.

One thing I miss in the whole Brutal-AI targeting mode business is a spotter equivalent. Maybe Sectoid snipers can get targeting data from Celatids, but a gangbanger having his dog spot for him is a bit too much.



Although take what I say with a grain of salt, since I haven't managed to actually play Brutal-AI much due to the shader thing.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 10, 2023, 08:55:42 pm
I have not played with Brutal-AI, but I would much more appreciate non-omniscient mode even if I want a challenge.
That would be level 3 then. It's the highest challenge my AI can currently provide without cheating.

Omni and TM4 are the ones clearly considered as cheating. Omni isn't as bad as it's not completely obvious and could also look like luck or "intuition", so it's a lower difficulty than TM4.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 10, 2023, 09:15:30 pm
Although I'm not even sure why you can't just leave the turn limits be. They can already be configured to let the aliens ignore them.
You are clearly speaking from a modder's perspective here. Of course you can disable it by a little modification in the respective file, that for some reason holds a non-zero default-value for that. A player usually would never know that any such limitations exist without either reading through the rul-files or hearing about it online.

Adding the difficulty-presets as mods, however, isn't a bad idea at all. I think it would actually deserve it's own section on the difficulty-selection-UI though. It's hard to know for the player what mods are mutually exclusive and what mods are not. Oh... And a big problem is that this wouldn't work in TCs anymore this way.

> Since TM3 is "debateable of whether that's a cheat or an emulation of smart player behaviour", not sure removing TM2 altogether is a good idea.
I should probably update the mod-site to reflect that the blind-fire was almost completely removed. If the player knew how it worked, it was kinda exploitable and did more harm to the aliens than it helped. The alternative to not have it do more harm than it helped would be to unmistakeably have it cheat.

> One thing I miss in the whole Brutal-AI targeting mode business is a spotter equivalent. Maybe Sectoid snipers can get targeting data from Celatids, but a gangbanger having his dog spot for him is a bit too much.
One way to do it, would probably be to use a negative flag for that, that could be set on a unit level. Squad-sight more or less is the core-feature of Brutal-AI. But one could make it so that a modder can set a flag for units that should not provide give squad-sight.

> I haven't managed to actually play Brutal-AI much due to the shader thing.
What's "the shader thing?" Something that works normally in OXCE but not in B-OXCE?
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 10, 2023, 10:29:09 pm
You are clearly speaking from a modder's perspective here.

Of course you can disable it by a little modification in the respective file, that for some reason holds a non-zero default-value for that. A player usually would never know that any such limitations exist without either reading through the rul-files or hearing about it online.
More a 'power player', but fair enough.

Since this is original X-Com behaviour, there are quite a few players who are already aware of this and even expect it. Not all players are newcomers.

And my point is that it can be made into a mod, heck, you could prepackage a 'recommended settings' mod with your fork.

It's hard to know for the player what mods are mutually exclusive and what mods are not.
Well, that problem exists independent of Brutal-AI and will not be solved by anything you might do short of a totally independent fork.

For the difficulty mods in particular, you can include 'will override each other' in the description. Since no other default mod touches anything related to Brutal AI, that should cover it. Anything third party will either be not aware of Brutal-AI at all, or should include its own instructions and difficulty settings.

And a big problem is that this wouldn't work in TCs anymore this way.
Big mods will need to do their adaptation themselves anyway, since a lot of them are predicated on non-Brutal AI. Or at least provide compatibility patches, if the author hates Brutal-AI but is willing to let his players try it.

I should probably update the mod-site to reflect that the blind-fire was almost completely removed.
Er, so is there a difference between TM2 and TM3 now?

One way to do it, would probably be to use a negative flag for that, that could be set on a unit level. Squad-sight more or less is the core-feature of Brutal-AI. But one could make it so that a modder can set a flag for units that should not provide give squad-sight.
You could reuse the 'spotter' flag, just like you modified leeroying. Sniper-spotter is dead in Brutal-AI, anyway, right?

What's "the shader thing?" Something that works normally in OXCE but not in B-OXCE?
This (https://openxcom.org/forum/index.php/topic,10967.msg152280.html#msg152280). Possibly caused by your different compilation environment.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Yankes on March 10, 2023, 11:43:49 pm
And my point is that it can be made into a mod, heck, you could prepackage a 'recommended settings' mod with your fork.
And this is from my perspective correct approach, most user do not have skill or knowledge to correctly set combination of settings to have fun and challenging game. I probably need lot of work to balance it (and each mod could have different "sweet" spot).

Not mention that settings per "alien" could even more improve gameplay, like you could have powerful and prideful aliens that simply tank lot of damage without using any complex tactic (same as you did not hide from some rodents),
and another fight when you MiB/SpecialFroces/Specnaz or other humans that are same squishy like you and have similar fire power but are very sneaky and very smart. Similar how HalfLife1 have with marines that where sometime more hard that some boss fights.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: The Reaver of Darkness on March 11, 2023, 01:19:56 pm
I'm seeing some rather contradictory opinions on how configurable a feature should be depending on who you ask.

In the case of my Brutal-AI, I'm seeing modders, who want to have as much control over the feature as they possibly can and seem to not only want to be able to tweak any possible parameter about it but also ask for even more of them.

On the other hand I'm watching players who seem a bit overwhelmed by the options that already exist because it is not clear what kind of experience to expect.

I like having lots of features hidden just out of sight (accessible to those who know how to get to them) which all have defaults based upon the settings which a person is most likely to want when they aren't making considerations for that particular setting.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 14, 2023, 01:17:48 pm
Based on the feedback here I have discarded the idea of turning the current options into more streamlined difficulty-settings.

From other feedback and just looking at what people usually do, I saw that most players disable omniscience. As of version 3.8.1 this is now disabled by default.

With this the default-settings of "AI plays as good as it can without limitations and without cheating" are pretty-much the recommended ones. The option to add either limitations or cheating are then something the player can but shouldn't feel obliged to do.

@Yankes: Settings per alien are possible since Version 1.0 this was basically the step that brought it from Beta-versions to what I considered the first release. It allowed mixing brutal- and non-brutal units on the same team. The BattleUnits have a method called "isBrutal()" and that first checks the global-setting. If the global setting is disabled, it will look whether isBrutal was set for that particular unit-type in the units.rul. I implemented that based on what you told me, you considered necessary for including it in OXCE. So I'm kinda surprised that you apparently weren't aware that I did that.

@Juku121: My new train of thought, as I already hinted, is that if the defaults are generally agreeable to the majority of people, even adding any additional difficulty-settings would be unnecessary overchoice. Marbozir played on his stream the unexpected combination of Brutal-AI and Beginner-level-difficulty. The difference between BAI on SH and BAI on beginner is huge and from what I've seen I'd say it's definitely easy enough that way for anyone who I can imagine wanting a smarter AI but a still winnable game. So no real reason to confuse with additional difficulty-levels. Neither as option nor as Mod.

Yes, there's still a difference between TM2 and TM3. It only impacts one weapon: Blaster-Launchers. I should definitely update the description to reflect that. I think in their case the usefullness of blindshooting them outweighs the exploitability. Due to it's small scope it should probably be an additional option and the amount of TMs be reduced. Would also allow to describe better what it does. Actually when I do that, I could also allow it for other weapons again. Because 1, 2, 3, 4 looks like higher value will always be harder. Having it as a separate option doesn't do such a judgement. Because if you don't know how to exploit the regular blind-shooting it will make it harder and if you know how to exploit it, it will make it easier. It's more of a playstyle-question.

Yes, I could reuse the spotter flag for marking units that shouldn't share their information with the rest of the team. But that would be very counter-intuitive. The reuse of the leeroy-flag is very fitting with the BAI-behaviour it provokes. The units don't hide but instead charge into battle. But since by default each unit should work as a spotter in BAI anyways and the spotter-flag is off by default, checking for the spotter flag to be set to determine the unit is not a spotter seems much weirder. Would almost make more sense to use the Leeroy-flag for that too. It's usually used for "dumb brute"-type enemies. The ones where it's quite plausible are too stupid to inform their team-mates of their intentions.

Yeah, I vaguely remember that. It's just hard to trouble-shoot something that I can't reproduce and besides of you not many others seem to have encountered.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 14, 2023, 02:12:25 pm
My new train of thought, as I already hinted, is that if the defaults are generally agreeable to the majority of people, even adding any additional difficulty-settings would be unnecessary overchoice.
Sounds reasonable enough.

Yes, there's still a difference between TM2 and TM3. It only impacts one weapon: Blaster-Launchers.
What about mod weapons where it's not uncommon to find HE-toting enemies? Or any rocket launchers the aliens pick up on the battlefield?

Yes, I could reuse the spotter flag for marking units that shouldn't share their information with the rest of the team. But that would be very counter-intuitive. ... But since by default each unit should work as a spotter in BAI anyways and the spotter-flag is off by default, checking for the spotter flag to be set to determine the unit is not a spotter seems much weirder. Would almost make more sense to use the Leeroy-flag for that too.
Yeah, making 'spotter' denote non-spotters is not that hot an idea. I was more thinking about using it the usual way, because I was more concerned about existing mods where spotters are spotters and non-spotters are not. Reusing those mods by setting the hardcore enemies to BAI on the unit level, and letting others be spotters only if the flag is set, seems the most natural way to go about it.

Of course, that runs into the problem that then it's not possible to use global 'brutality' and pick out non-spotters at the same time.

Not sure non-spotters and leeroys will match up 100%. Some cowardly alien cultist chaff, for example.

It's just hard to trouble-shoot something that I can't reproduce and besides of you not many others seem to have encountered.
Yeah, that's probably something pretty local to me.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Yankes on March 14, 2023, 02:24:49 pm
@Yankes: Settings per alien are possible since Version 1.0 this was basically the step that brought it from Beta-versions to what I considered the first release. It allowed mixing brutal- and non-brutal units on the same team. The BattleUnits have a method called "isBrutal()" and that first checks the global-setting. If the global setting is disabled, it will look whether isBrutal was set for that particular unit-type in the units.rul. I implemented that based on what you told me, you considered necessary for including it in OXCE. So I'm kinda surprised that you apparently weren't aware that I did that.
Ok, good to know, I simply assumed after our last discussion that you prefer different approach and I probably miss your mentioning of implementing this.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 14, 2023, 03:21:52 pm
@Juku121:
The distinction is not about HE, it is about exposing your own position while likely not doing any damage.

Trauson peaked out of the Triton, did something to catch some attention, hid again and then roughly remembered where he was attacked from to then blind-attack himself.

He made the aliens reveal themselves. Aliens with blaster-launcher usually avoid a direct line of fire at all cases. And while you can still make them waste their ammo when you hide in an indestructible object after revealing yourself termporarily, the information where they are is harder to use against them except with your own blaster-launcher.
Actually I had an idea right now how the ammo-wasting-portion could become less of an issue. Can use my new algorithm that calculates based on last seen location and last seen time whether the enemy could have made it back to the Triton or not for that purpose too.

What I could do is add an extra option: "Respect Sniper-spotter-flags" or so. With a warning hint to only use that with mods that make use of it. And the modder then could force-enable that setting in their mod.

@Yankes:
Well, I wanted a compromise where both the modders and the players can have control. That's why I went for some sort of hybrid-approach, that allows both players to have some control. Of course it still doesn't satisfy everyone. Hellrazor, for example, was very upset about Brutal-AI ignoring certain aspects that are configurable at both unit- and map-level. I also didn't just want to add options to the existing AI. I wanted to make my own an thus it has it's own options and only a small overlap from those that impact the base AI.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 14, 2023, 05:21:00 pm
The distinction is not about HE, it is about exposing your own position while likely not doing any damage.
But doesn't that apply to virtually any kind of ranged weapon? I mean, the problem here is more the indestructible cover rather than the blind-fire.

Hmm, players can blind-fire anything at obstacles; can BAI do that too to digh through walls, fences and multiple targets?

What I could do is add an extra option: "Respect Sniper-spotter-flags" or so. With a warning hint to only use that with mods that make use of it. And the modder then could force-enable that setting in their mod.
Would that mean that 'snipers' use BAI squadsight provided by 'spotters'? Or some sort of interaction with the original sniper-spotter code? The former would be perfect from my POV.

Hellrazor, for example, was very upset about Brutal-AI ignoring certain aspects that are configurable at both unit- and map-level.
Hmm, his hang-up about aggression is weird because I've never seen it make much of a difference in vanilla unit behaviour.

Intelligence aka limited omniscience is no longer part of BAI, then?
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 16, 2023, 01:21:10 pm
The main issue about the whole blind-fire-ordeal is to determine when it is a good idea and when it isn't.

I've recently added an additional tracking of when a life-sign of an enemy-unit was detected, one that is more sensitive than turnlastspotted of the regular AI.

If there's a comeback of blind-fire, this will definitely be used too in combination with the location. With the recent upgrades to my AI in other aspects using blind-fire against it effectively also has become exceedingly difficult.

The AI has gotten better at taking cover and they register your attempts of blind-fire to know where you were when you did that and take that into account for their decision-making too.

If I were good at killing aliens with my blind-firing, I could try and translate my own thought-process of doing that into code. But when I, myself suck at it, I also don't really know what kind of algorithm I could teach the AI to follow for that. The old algorithm only seemed to work so well because it essentially cheated. They knew whether there would something be in the AoE-radius of their grenades. This wasn't intentional.

Currently the AI is mostly about hiding in good cover and peaking out of it to see whether they can reveal your units. Then they will determine everyone who can attack what has been seen and do so. If they eliminated the target, they will go back to hiding. Of course you might get a few kills with blind-fire after such encounter. But once again, the AI then knows where your units, that did the blind-firing are (as you would when you did it) and depending on their location hide better or try to spot you. If somehow they knew you did not move or only moved a very small amount of steps, then blind-firing would be a good idea. But since they cannot know that, it could also be a way to drain their grenades while making them to reveal themselves. If you can tell me how to know whether the blind-firing would hit something without cheating and without being exploitable, I'd happily bring it back.


Now that I think about it, it would be easy to respect the sniper-flags but not so easy to change the spotter-logic. Right now everything that was seen on their turn is considered a valid target. That is stored in the unit that was spotted. This is allows snipers to still snipe if the spotter died to reaction-fire. As I said, it doesn't even need a unit attached to it to register reaction-fire. Restricting what is registered based on some unit flags seems problematic. And to be honest that stuff also has very low priority for me. My goal now is to get the AI to play as good as it can without relying on cheats.


No. Hasn't been a part of BAI since a long time. Without omniscience enabled the AI shouldn't be cheating at all. This includes the tracking of unit-positions that intelligence allows. I put a lot of effort in stuff like storing the last position a unit was seen and algorithms that guess where it could have gone when the tile that it was last seen is revealed but the unit isn't. I even taught the AI to track for every single tile when it was last made visible, so they can systematically search the map without having to cheat.

The whole non-cheating-thing is a lot of additional effort for something that never will be as strong as with cheating. But it's of course way more immersive and what players generally prefer.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 17, 2023, 07:57:57 am
Now that I think about it, it would be easy to respect the sniper-flags but not so easy to change the spotter-logic.
...
Restricting what is registered based on some unit flags seems problematic.
Problematic in what way?

My original thought was that you could check every 'spotter' on the team whether they have LoS to the target upon firing, and impose an accuracy penalty if nobody does. But since you can also target tiles, that may be too computationally demanding? Especially with big maps and lots of units on both sides, as in the big mods.

And to be honest that stuff also has very low priority for me. My goal now is to get the AI to play as good as it can without relying on cheats.
Fair.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Xilmi on March 17, 2023, 11:07:15 am
It would have worked with my old spotter-logic. But my new one doesn't check for whether individuals currently see something. It works. "Has anyone seen something in this move?"

But then again, I could also bring back the previous logic, that just iterates over the units, checks whether they are eligible as spotters and then consider the units as spotted or not. So actually it wouldn't be much of a difficult problem after all.
Title: Re: Modders, Players, Overchoice. How to best deal with it?
Post by: Juku121 on March 17, 2023, 12:16:52 pm
To be completely honest, I'd like this to apply to X-Com as well. The BAI already applies to player units, but there's nothing to designate them as spotters or snipers. Well, most X-Com soldiers should be both, but I could see some excepions like dogs (or rats :D ). Squadsight is about the biggest mechanical advantage the player has, and compounds with pretty much every other advantage.

But that's largely my own selfish desires. If it (or at least the alien part) looks easy enough to include in BAI, I'd appreciate it. If not, well, I still admire what you're doing with the AI.