Author Topic: Looking for some advanced strategies and their counters  (Read 8963 times)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Looking for some advanced strategies and their counters
« on: November 09, 2022, 02:17:48 pm »
As you may or may not have heard, I'm trying myself on creating a more hard-core-experience by adapting the AI in a way that is meant to cause as much resistance to the player as it can.

And while I think that progress is coming along nicely, my judgement is limited by my own limited experience.

That's why I'd like to hear more about tricks and/or advanced strategies employed by players that I then could both take into consideration for the AI to employ and for the AI to counter.

Getting myself better as a player will help my understanding of what's a good idea and what isn't. I'd like for some good players to explain their moves and their thought-process behind them.

I guess that many of them are based on exploiting current weaknesses of the AI, so I'm particularly interested on the ones that don't and are more general in nature. But also the ones that do exploit weaknesses can be mentioned so I can tell whether I've already taken it into account or not.

You can, of course, also describe how the AI would have to act in order to give you the most trouble.

My dream-scenario would be to find an expert-player, who's also a content-creator who'd be willing to test my AI while giving feedback and showing how the remaining weaknesses can best be exploited so I can try and find ways to deal with that.

Offline psavola

  • Commander
  • *****
  • Posts: 836
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #1 on: November 09, 2022, 09:49:33 pm »
Over the years there have been quite a few superhuman ironman playthroughs on YouTube or Twitch, which will give very good hints if one has the interest and/or patience to watch them (in full or in parts). I have certainly learned a lot from them. If I would have to pick recent one to recommend, I might suggest The Voice (Echo archives), one playlist is at https://www.youtube.com/playlist?list=PLVLZLHjZpBt-9_OCLY680alIEQncPnOK9 . The player is very knowledgeable about the inner workings of the game and also explains the actions better than most. It might also be interesting that the playlist also includes a recently started new SH/IM challenge without smoke grenades (which requires somewhat different tactics for survival).

Some of the biggest ways to exploit the weaknesses of AI or game design are as follows:
 - hang back in the craft and wait for the aliens to wander in to view before or after turn 20. Do not even exit the craft, especially without smoke, except for a look around (usually with a tank, which can take a few hits). This does not work with UFO Skyranger, but with many other craft it is very effective (called "cheesy strat" by some). Especially Terror for the Deep. Caveat: some aliens with very high TUs might come charging in your craft and cause havok, so you'll need to make sure you shoot out everyone coming closer from inside the craft.
 - do not enter the alien craft at all (especially if it includes deadly chokepoints where the aliens can ambush you), rather wait for the aliens to come out one by one (after turn 20) while you are positioned in a good place and possibly covered by smoke.
 - in certain base defense missions (especially UFO), wait for the aliens to come at you at a rampage and get killed by your well positioned troops or proxy grenades you throw on the corridors for them. However, there is are differences wrt. RNG and base nodes the aliens move between, and in some cases you'll need to go after the aliens and most of them might not come after you.
 - smoke is an extremely effective cover in almost any scenario (OXCE does include the option for the mod authors to make it less so, which calls for different tactics) - by default smoke protects in 2D, but you can enable it to work in 3D (e.g. shooting from above, e.g. UFO floaters or buildings)
 - mind controlled, paniced or berzerked soldiers don't pick up weapons and use them or take new weapons from their backpacks, belt, etc.
« Last Edit: November 10, 2022, 06:48:57 am by psavola »

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #2 on: November 09, 2022, 10:38:33 pm »
IMO, the two biggest omissions from the above list are:
  • Scout-sniper tactics (or squadsight in modern parlance), the practice of shooting from beyond LoS to avoid reaction fire. The number one advantage for either side, IMO. I do hope you plan to make the sniper-spotter feature a part of your AI and not just make everyone a sniper all day, every day.
  • Melee 'milling', the tendency of melee-only enemies to run around like headless chickens and be easy prey. One half of all the reasons OG Reapers were considered a joke. Fortunately, leeroying fixes most of it, and units with high TU are less suspectible (a part of why Chryssalids were still terrifying).

There is also the time-honoured turn-based tactic of peek-and-shoot (move out of and into cover during your turn) which the enemies don't do half as well as the player. A lot of 'camping' tactics are based on some variation of this.

Finally, there are the grenade relay/conga line and 'drop smoke' (to save TU) tactics for grenades.
« Last Edit: November 09, 2022, 10:40:28 pm by Juku121 »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #3 on: November 10, 2022, 01:35:14 am »
Over the years there have been quite a few superhuman ironman playthroughs on YouTube or Twitch, which will give very good hints if one has the interest and/or patience to watch them (in full or in parts). I have certainly learned a lot from them. If I would have to pick recent one to recommend, I might suggest The Voice (Echo archives), one playlist is at https://www.youtube.com/playlist?list=PLVLZLHjZpBt-9_OCLY680alIEQncPnOK9 . The player is very knowledgeable about the inner workings of the game and also explains the actions better than most. It might also be interesting that the playlist also includes a recently started new SH/IM challenge without smoke grenades (which requires somewhat different tactics for survival).
Thanks, I will watch that series to see how much of it is still applicable.

Some of the biggest ways to exploit the weaknesses of AI or game design are as follows:
 - hang back in the craft and wait for the aliens to wander in to view before or after turn 20. Do not even exit the craft, especially without smoke, except for a look around (usually with a tank, which can take a few hits). This does not work with UFO Avenger, but with many other craft it is very effective (called "cheesy strat" by some). Especially Terror for the Deep. Caveat: some aliens with very high TUs might come charging in your craft and cause havok, so you'll need to make sure you shoot out everyone coming closer from inside the craft.
I attached a screenshot of what my AI does in that scenario. They assume positions from where they have a good overview over the map while making sure to keep some distance from one another (in order to avoid AoE). Flying units like these floaters are particularly nasty in that case because they almost always go airborne for that. Turn 20 doesn't mean anything to them. They'd just wait like that forever.
And they "communicate" with one another. So basically when one of them gets a line of sight, the others will also move to a position where they have a line of sight too. And when one of them then actually sees a unit it means that everyone can open fire from whereever they are. Up until today I used a sight-check for that but that meant that after a unit died or hid after shooting it wouldn't work anymore. So now I replaced it with a check for target->getTurnsSinceSpotted() == 0. This added a significant bump in difficulty. Especially for the likes of floaters, who have such an easy time getting a line of fire towards everyone walking out in the open and smoke-grenades don't help because they only protect in 2D, as you say.
I also have added an anti-smoke-grenade behavior for the aliens. Basically when it thinks it should see someone but doesn't it will move closer until it does. And once one of them actually sees you, it allows all the others who just have a line of fire to shoot too. And you don't even see it coming because the smoke also prevents your own vision.

- do not enter the alien craft at all (especially if it includes deadly chokepoints where the aliens can ambush you), rather wait for the aliens to come out one by one (after turn 20) while you are positioned in a good place and possibly covered by smoke.
Due to the getting a good overview-algorithm, it's mostly unnecessary to enter the UFOs against my AI. That is because for the most part they will try to get out rather quickly anyways. One of the few times it went reaonably well for me was when I started right next to the doors of their ship. I've done a few things to make chokepoints harder to camp though. Firstly they don't usually try to get out one by one. Since they all want to leave the UFO, they are lining up and when one poor alien sould opens the door to be greated by your soldiers, then there's others behind him who will shoot out too. Something especially nasty was that when there's few friends around but a lot of X-Com outside was that if it has a grenade, it'll pre-prime it before stepping out. So he basically becomes a suicide-bomber. At first I let them always preprime, if they have nothing better to do. But that was very bad for them, so I had to figure out a better solution to only do it situationally.

- in certain base defense missions (especially UFO), wait for the aliens to come at you at a rampage and get killed by your well positioned troops or proxy grenades you throw on the corridors for them. However, there is are differences wrt. RNG and base nodes the aliens move between, and in some cases you'll need to go after the aliens and most of them might not come after you.
Oh right, proximity-grenades. I have never used them so far. I should definitely try them out. I need to know what proximity will trigger them and then add code for the aliens to avoid them. So currently that would probably be one of my best bets for things that still work against the AI as there is no code to deal with it.

- smoke is an extremely effective cover in almost any scenario (OXCE does include the option for the mod authors to make it less so, which calls for different tactics) - by default smoke protects in 2D, but you can enable it to work in 3D (e.g. shooting from above, e.g. UFO floaters or buildings)
Yeah, I found it still helpful to get into nearby buildings with real cover. But as I mentioned earlier. I have already taken measures against it in my AI. So the protection is temporary and might backfire.

- mind controlled, paniced or berzerked soldiers don't pick up weapons and use them or take new weapons from their backpacks, belt, etc.
You mean AI-alien-soldiers? There already was code to use weapon-pickup. With my AI that also will be enabled or it at least should be enabled in tandem with it. But when you get into a position to Psi them, you have a lot of great opportunities besides of that.

So far I've usually done AI for 4x-games where you and your opponents start at an even footing and that are about at least somewhat fair competition. In these scenarios having an AI that plays as good as possible was kinda desiarable.
But for X-Com I'm already questioning the sensibleness of what I've done in the past two weeks. So far my own progress as a player couldn't keep pace with my progress on the AI. I think I'll have to step up my game quite a bit in order to get a little further into the game.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #4 on: November 10, 2022, 01:54:13 am »
Scout-sniper tactics (or squadsight in modern parlance), the practice of shooting from beyond LoS to avoid reaction fire. The number one advantage for either side, IMO. I do hope you plan to make the sniper-spotter feature a part of your AI and not just make everyone a sniper all day, every day.
What I did with that was that everyone will be a sniper if there is something to snipe. If there's nothing to snipe they'll advance until someone eventually becomes a spotter coincidentally. Unless when there's no line of fire for any of them. In that case they either become a seeker or a camper depending on the situation. It's a bit difficult to even put it into words. If there is a line of sight to the line of sight, they will camp it. If there isn't, which means the unit is in a room with locked doors, which happens in base-defense, they will basically go there and open the door. (I had to make it possible for the AI to open doors with "rightclick" when the other side is blocked.)

Melee 'milling', the tendency of melee-only enemies to run around like headless chickens and be easy prey. One half of all the reasons OG Reapers were considered a joke. Fortunately, leeroying fixes most of it, and units with high TU are less suspectible (a part of why Chryssalids were still terrifying).
I spent at least two days on melee-code. I couldn't get the reapers walk into the skyranger and also bite. It's still a problem when the first two slots near the door are left free but the 2nd row on the grid isn't. Because the main tile of the unit is the uppermost corner. And it doesn't work if it is on a tile that is on another layer of the level than other parts of the creature.
Crysalids work extremely well though.

There is also the time-honoured turn-based tactic of peek-and-shoot (move out of and into cover during your turn) which the enemies don't do half as well as the player. A lot of 'camping' tactics are based on some variation of this.
That is probably what has quite a bit of potential. Currently my AI only ever hides when it doesn't have enough TU for another shot. It's helpful to vacate a spot at a chokepoint to not block vision for their friends.

Finally, there are the grenade relay/conga line and 'drop smoke' (to save TU) tactics for grenades.
I think that could be elaborated a bit more in detail. Drop smoke refers to not throwing but letting it fall down, I suppose. But what is grenade relay/conga-line supposed to mean? I assume some sort of chain-reaction maybe. But I can't really imagine how that can be used. So could you please elaborate on that?

Offline psavola

  • Commander
  • *****
  • Posts: 836
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #5 on: November 10, 2022, 06:48:20 am »
(grenade relaying)
I think that could be elaborated a bit more in detail. Drop smoke refers to not throwing but letting it fall down, I suppose. But what is grenade relay/conga-line supposed to mean? I assume some sort of chain-reaction maybe. But I can't really imagine how that can be used. So could you please elaborate on that?

By default, primed grenades do not explode immediately if dropped or thrown, rather at the end of the turn. This allows person 1 to prime a grenade, drop it, person 2 pick it up and throw it to person 3, person 3 to throw it to person 4 who is sufficiently near the aliens to have the strength to throw the grenade at them. Obviously this chain can be shorter as well (usually this depends on the weight of the explosive and the strength, i.e. how far you can throw the explosive). If your soldiers have good strength, you usually don't need to do long relays. There is also an option "instant grenades", where grenades (including smoke) explode immediately when thrown. This prevents relaying (but still allows priming, dropping and another person picking it up and throwing it). Instant grenades makes the game more realistic (no relay) but easier. Especially if you play with instant grenades, you might at least in the early game use grenades a lot. Even more realistic "instant grenades" would be that you cannot drop a primed grenade without it exploding.

These are game mechanic issues and I don't see how it could be addressed in AI code.

Wrt. sniper/spotter tactics I think you should be aware that there is an option Extended accuracy, where the accuracy decreases the longer you go from the target (especially snap and auto shot). There are also options which limit the range of weapons. OXCE also includes an option that most mods use, with which you get a penalty (usually 50% loss) in accuracy unless you have personally line of sight. However, this does not apply to certain (sniper) weapons and grenades. So in those options and mods the spottr/sniper tactics can still be employed with sniper weapons and grenades. While none of this affects the original vanilla game, it is worth noting because the AI code would eventually need to also take these variations into account.

I'd guess that some active SH/IM streamer might be interested in testing and eventually streaming a "brutal AI" challenge when the code gets to a point where it is mature enough.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #6 on: November 10, 2022, 11:37:38 am »
Interesting. I didn't consider that possibility at all. So I guess I can definitely add this to tricks I've learned. Also interesting that using instant-grenades isn't a good solution because it makes it easier due to not allowing for reaction-fire of the naded alien.

Yes, I have seen that option and have a vague idea what it does. In general I must say that having a lot of options to customize game-rules does not exactly make it easier to develop AI.
Especially in this case this can have massive implications on how you should play. Range being completely limited is the easier part to deal with. The evaluation method for the respective fire-mode will just return 0 accuracy and thus you know you need to walk closer. This is similar to how my AI handles smoke. I'll have to look whether it should already work or needs a small tweak. Just looked. Should already work. If the code that shoots doesn't shoot and the code that should move the Alien thinks the aliens doesn't need to move because it's already in position, it assumes it's vision is blocked by smoke and walks closer. Doesn't matter if it's smoke or other reasons. But having gradual drop-off or sudden drop-off of 50% means you have a lot of cases where you'd have to compare getting closer vs. shooting from where you are. Currently I just assumed: If you actually can shoot, then shooting is always the best option. But I guess when range has massive impact on accuracy this isn't the case anymore. And coming up with a good solution for that is not exactly trivial. You'd kinda need to simulate the outcome of different options maybe even several turns in advance when the distance is too big. As in: I have a line of fire but my chance to hit is only 1%. If I spent 2 turns on moving closer, I could bring it to 45%. But at the same time I might be killed by an enemy sniper who operates without these restrictions.

Eventually my entire: "Go out in the open where you have a good overview" idea might simply be undesirable if weapon-accuracy-behavior is modded in a direction that's vastly different from default-behavior.

So far all of this is only taken into account in the accuracy formula. But that is only used to compare different options of shooting, not shooting vs. moving.

When it comes to "mature enough", I'd like to know what the expectation for that would be. So far I haven't requested a new build from Meridian since quite some time. I also don't really like having to depend on someone else in that regard and am still quite interested in help when it comes to making my own install-ready-builds.

My approach was more like: I wait until someone shows interest (e.g. tells me they'd like to start streaming it) and then release the newest I have up until that point.

I currently have a situation that I don't quite like. It is about what constitutes as "spotted".
Up until yesterday I checked for actual visual contact of at least one friend to consider a foe attackable. However, that meant that if the spotter died or moved into cover after shooting, the visual contact was broken and others wouldn't snipe anymore.

So I used turnsSinceLastSpotted() == 0 instead, thinking it would be the same that I get as a player with the little green boxes. However, it's not only visual contact that makes a unit spotted. Taking damage and/or dying from fire of a unit also makes it considered spotted.
This basically means that my snipers get revealed to the enemy for the turn after doing their sniping. In some way this is comprehensible. But I must say that it felt unfair to me as it seems to cross the line between "cheating for simulating experience" and "cheating for an unfair advantage". I mean I could try to guess where a shot from outside vision-range came from and shoot there too. But it's a different thing to know exactly where it came from and just having a general idea.

I guess I need something that works similar to turnsSinceLastSpotted but without the part where shooting at someone makes a unit spotted by default.

Offline Vakrug

  • Colonel
  • ****
  • Posts: 320
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #7 on: November 10, 2022, 11:50:41 am »
I guess that many of them are based on exploiting current weaknesses of the AI, so I'm particularly interested on the ones that don't and are more general in nature. But also the ones that do exploit weaknesses can be mentioned so I can tell whether I've already taken it into account or not.
I will repeat what I said in "For AI-improvements" thread: AI should not act like lemmings, it should act like soldiers defending a castle. Aliens should run inside UFO, not outside. Abolish entirely your idea of "Go out in the open where you have a good overview" (except if it is X-COM base attack). In most cases it is not aliens who attack, so they should not hunt for player's units at all.

If you will not address this issue, any other improvements to AI will be cosmetic and useless.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #8 on: November 10, 2022, 01:20:18 pm »
I will repeat what I said in "For AI-improvements" thread: AI should not act like lemmings, it should act like soldiers defending a castle. Aliens should run inside UFO, not outside. Abolish entirely your idea of "Go out in the open where you have a good overview" (except if it is X-COM base attack). In most cases it is not aliens who attack, so they should not hunt for player's units at all.

If you will not address this issue, any other improvements to AI will be cosmetic and useless.
I agree with the "not act like lemmings" sentiment. That's why I'm not letting them give up a good position just to get a line of sight if there's not already combat happening or it is considered safe to do so.

But I really disagree about your assessment that any pro-active behavior should be avoided and is "cosmetic and useless".

While camping choke-points does have some merit, there's usually ways for the acting side around this. If you all gather in the same room, you are subject to stuff like grenades. If you spread out within the UFO, bigger numbers and careful advancement can overwhelm your position. Also you never have the advantage of being able to flank.

And most importantly, it would be predictable and boring, if the aliens act completely defensively and "don't hunt for player's units at all". You'll not have to worry about ever losing a Skyranger because if you run out of steam to make further progress, you just retreat and they'll let you. A soldier panics and runs off? Can just wait for him to calm down and bring him to the Ranger too. Can even collect the items and artifacts of dead soldiers and aliens and carry them in.

I don't see how the kind of behavior you suggest can be brought in line of what I envision as "brutal". The way my AI currently works, where aliens seek having a great line-of-sight- and movement-potential-coverage while also making sure to spread out, actually does make it feel pretty brutal. They can react quickly and punish you for leaving cover while at the same time limiting how many you can kill at once and having you guess where they actually might be until you are eating their plasma-blasts. I'd even make a comparison to chess. In chess you also usually seek to increase piece-activity by bringing your pieces to positions where have many options to move to. Putting yourself in a narrow corridor inside an UFO that has a dead-end in one direction and a choke-point where the enemy is coming from in the other leaves you with very little options. I mean it is important that when the aliens get into this situation that they make the right calls too. But I really don't think that they should bring themselves into that situation and never deviate from it.

I think from a tactical consideration the ideal scenario is the one where you maximize the ratio of your gun-barrels pointed at the enemy vs. gun-barrels of the enemy pointed at you while making sure you are the one who opens fire first and the one who has more different attacking-angles to avoid AoE.

Encircling a choke-point X-Com must come through and then striking once they do. That's what I consider a sound tactical approach from the perspective of the aliens.

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #9 on: November 10, 2022, 05:01:11 pm »
So far I've usually done AI for 4x-games where you and your opponents start at an even footing and that are about at least somewhat fair competition. In these scenarios having an AI that plays as good as possible was kinda desiarable.

But for X-Com I'm already questioning the sensibleness of what I've done in the past two weeks.
I'm a big fan of your work on Pandora: First Contact. :)

But it's indeed a thorny path, since current AI means a lot of mods are overtuned against the player and would be pretty near genuinely impossible if the playing field was relatively level. You might easily get a repeat of TDTD 'fixing' the difficulty. :P

Extended accuracy
penalty (usually 50% loss) in accuracy unless you have personally line of sight.
Yeah, these seem to be pretty much standard in most mods now.

getTurnsSinceSpotted()
You might also want to check 'turnsLeftSpottedForSnipers'. I mean, you're basically writing an AI for an all-sniper, all-spotter team, which is fine and desirable for the base game or mods that don't deviate much from it. But sometimes a modder wants some weaker enemies, or enemies the player can combat by killing their spotters or avoiding their snipers. Llike brainwashed policemen, or farmers with dogs, or gangbangers and their leader, or Meridian a Predator with spotting drones, etc.

What I did with that was that everyone will be a sniper if there is something to snipe.
What I meant is that I (and I imagine a whole bunch of modders) would prefer if only units with the 'sniper' tag did that. And only 'spotter'-tagged enemies comminicate their vision back to others. I imagine every alien in OG UFO can be considered both a sniper and a spotter, but not every modded enemy is the same.

Taking damage and/or dying from fire of a unit also makes it considered spotted.
Yeah, that's the biggest 'problem' with the current sniper/spotter mechanic. You can't have a marksman who shoots at what their spotter points out, it's either alien death snipers who know exactly where you are if you ever hit someone on their team, possibly for quite a while afterwards, or no snipers at all. Reasonable enough for OG-style aliens who might have psychic sensors in their UFO they can sic on spotted enemies, or something like a giant turret with a crazy auspex. Not so much for when a mod pits the player against a bunch of football hooligans with baseball bats and handguns.

I guess I need something that works similar to turnsSinceLastSpotted but without the part where shooting at someone makes a unit spotted by default.
Well, couldn't you just disable the 'spot offender when hit/killed' part? At worst, make some sort of phantom 'soldier' in the rough direction of where the shot came from?

...smoke-grenades don't help because they only protect in 2D, as you say.
Smoke grenades can also be made 3D with an option, like any other grenade. They do thin out towards the top, but you can always throw some more.

I also have added an anti-smoke-grenade behavior for the aliens. Basically when it thinks it should see someone but doesn't it will move closer until it does.
There are also built-in modding tools to help: heatvision and psi-vision.

Oh right, proximity-grenades. ... I need to know what proximity will trigger them and then add code for the aliens to avoid them.
Being right next to them, i.e. in one of the eight adjacent tiles or the tile it's located in. Right above/below seem fine.

Make sure not to completely invalidate them, or smokes for that matter. Players will not be happy if you make their toys totally useless.

However, this does not apply to certain (sniper) weapons and grenades.
But it does? I recall Starving Poet being extra salty when this was implemented in the middle of his XCF stream, and he ended up modding this back to a much lighter penalty than the default 50%.

Of course a modder can make their grenades no-LoS, but that's a deliberate choice.

Also interesting that using instant-grenades isn't a good solution because it makes it easier due to not allowing for reaction-fire of the naded alien.
An insta-naded alien can definitely return fire. A smoked alien might not, and there are also mods that use TU-sapping weapons like flashbangs that might also rob them of the ability without removing LoS.

I always play with instant grenades, but ones with limited range (12 for ones with weight 3, something like 4 for demo packs that aren't really all that throwable IRL). 12 might even be too generous. I also tend to make them less accurate and explode in inventory when the time is up. Grenade range is one of my biggest pet peeves with the game. One that virtually no-one else seems to share, though. :-\

These are game mechanic issues and I don't see how it could be addressed in AI code.
The 'brutal' AI can (try) to learn to use them?



Finally, while Vakrug's point about UFOs being fortified castles is rather hyperbolic (and you might not have a UFO at all, nor a player craft for that matter), one of the things I very much liked about Xenonauts was how their AI camped the hell out of UFOs. They were a bit cheaty, as in knew exactly when your troopers had run out of TU for reactions and opened doors (and fire) just at that moment, then gladly waited until you tried opening the door yourself and blasted you at point-blank range when you did. Not to mention UFO bridges full of valuable equipment (which tended to suffer in the firefight) and the deadliest aliens on the map, lurking behind consoles and along the walls, catching you in an almost unavoidable crossfire. I killed many a UFO door to kill/suppress the ETs lurking just behind.

Well, that and their Reapers' habit of sneaking up behind soldiers and giving you heart attacks. ;D

My approach was more like: I wait until someone shows interest (e.g. tells me they'd like to start streaming it) and then release the newest I have up until that point.
That might be a long wait. :-\

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #10 on: November 11, 2022, 01:04:01 pm »
@Juku121 Let me try and answer somehow without having to do a post-disection-again. :D

Someone who replied to me via PN told me they wanted my AI to work like a flag for mods that can be set on an alien to alien basis.
So my idea is to eventually provide two methods to use it. One as a general option in the advanced-options-menu that flips it on for everything but also as a flag that can be set by modders for some specific aliens.
So both players and modders can have control over whether they want to use the new AI or not.

Maybe even Yankes would be fine with this kind of compromise.

Also for the quick-battle game-mode it's completely fine. Because unlike to a lengthy campaign you aren't really attached to the soldiers and the outcome doesn't matter much. Beating a quick-battle with one soldier suriving is a relief, whereas in the campaign that would be considered horrible (unless it's the final mission). So the exact same battle can either feel exciting or frustrating depending on the context in which it took place.

I found a different solution for my sniper-issue. I introduced a new property to BattleUnit that is similar to lastSpotted but only gets reset by visual contact. But that alone wasn't enough. I also needed to increment the counter at every half-turn, not just every turn. That is because otherwise the aliens would still know where people are that they briefly saw on my turn but that I retreat. But now it works like I intended it to work.
Note that I'm still cheatily looking at positions of player-units for general tactical decision-making as a means to emulate experience and memory. But I really felt that needed to be strictly separated from what they can choose as targets for their actions.

I think you may have misunderstood my intentions about how the AI should deal with smoke-grenades. I don't want to let the AI cheat to make them useless. I want them to employ some counterplay. And I think that simply walking further into the smoke until you actually see someone is the right answer. So smoke still has the intended effect and can be very useful in certain situations but doesn't just mean you can use it as if it was real cover.

I think I won't do anything against proximity-grenades for now. What I'd have in mind as a solution would turn them pretty-much useless. The general behavior of the aliens should make it more difficult to predict where they will go and use these grenades in an exploitative manner.

I think that my first concern is to make it all work with the vanilla-mechanics and rulesets. As you already said the probably massive difficulty-spike will most likely make it not balanced for the already existing mods that seek to increase difficulty in other ways. By making it also available via a modding-flag modders can then take control on how to use it. And fully supporting all possible rulesets that modders might have come up with, seems very hard. I mean someone could walk me through some possible scenarios and how their existence alters play from how it would be good in vanilla. So then maybe I can integrate at least some support.

About the insta-nades. I actually found a bug yesterday that prevented the AI from realizing the explosion-radius of their own grenades, which meant they were wasting TUs on units or further grenades on units that would die anyways. It was obviously intended that they realize it but it simply didn't work because of an incorrect parameter in the line-tracing-call of the explosion. So insta-nades would actually help them too now as it allows to immediately reaccess the situation and know when someone survives a grenade. Especially since I coded something really nasty for their grenade-usage: They now consider indirect fire of them too. So if they've spotted (as per the new method) you behind a corner and another alien has no line of sight, it can now throw the grenade next to the corner to still hit anyone hiding behind it. Not limited to nodes that is. Every tile in the explosion-radius from the targetted unit is considered a possibility.

I always play with instant grenades, but ones with limited range (12 for ones with weight 3, something like 4 for demo packs that aren't really all that throwable IRL). 12 might even be too generous. I also tend to make them less accurate and explode in inventory when the time is up. Grenade range is one of my biggest pet peeves with the game. One that virtually no-one else seems to share, though. :-\
The 'brutal' AI can (try) to learn to use them?

I'll actually see if I can get a new version out today. Since yesterday I've reworked basically every single part of the AI. Then I also found and fixed some bugs. So I'd say the current version on my Repo would make for a decent milestone in the development and something I'd like people to be able to try out for themselves.

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #11 on: November 11, 2022, 01:54:06 pm »
The 'brutal' flag and option, as well as a new flag for direct actions as opposed to general decision-making all sound good.

I did not really want dispute any specific plans regarding smoke grenades, just put out a general warning against going in too hard to mitigate them. Although walking into smoke isn't all that universal a solution. A lot of the time, enemies are pretty damn far from any smoke of mine that's just chilling somewhere between me and them.

I do tend to play mods with excessive vision range (40 instead of 20 by default, though I personally tend to pull it back to 30 again). I imagine 'maxViewDistance' is another modding option that has massive implications for AI and balance, especially since increasing this makes all sight calculations a lot more expensive. And you can't really walk into a smoke cloud 25 tiles away unless you're a Chryssalid.


And, yeah, making a proof of concept with the vanilla ruleset first is very much recommended.

AI using indirect grenades sounds cool, too. Though bear in mind that there are also grenade launchers that do similar things (is the Small Launcher the only one in vanilla, I forget?).

Although another lesson from Xenonauts is that players can be quick to get their pitchforks if their opponents are supernaturally good at using grenades. Make of that what you will. :)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #12 on: November 11, 2022, 08:18:16 pm »
Maybe even Yankes would be fine with this kind of compromise.
Yes, if new AI is fully configurable (aka I could be more in some cases more dumb or deadly if modder want) then I would not be against inclusion.
If I recall correctly, Meridian was weakly against your current approach, this means that if you AI will have enough community support then there is chance that Meridian could be convinced to include your changes to OXCE.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #13 on: November 13, 2022, 11:57:01 am »
TACTIC:
When coming around a corner, always face toward where aliens are likely to hide so as to activate mutual surprise and suppress reaction fire.

COUNTER TO TACTIC:
Always have multiple units facing where X-Com can approach, facing in from multiple angles so that they cannot activate mutual surprise on all of them at once.

COUNTER TO COUNTER:
Move in with a durable/armored unit, tank, or expendable unit; throw grenades/proximity mines into where aliens are likely to be camping; barge through the walls; use motion scanner to determine positions; destroy all walls with explosives.

- - -

TACTIC:
Hide your soldiers in smoke.

COUNTER TO TACTIC:
Throw grenades into smoke clouds; fire blindly to where soldiers are likely to be positioned.

COUNTER TO COUNTER:
Put smoke everywhere and use motion scanners; put decoy smoke clouds to waste enemy grenades.

- - -

TACTIC:
Move durable and/or expendable units forward to scout, and keep snipers in the rear with good field of view to attack from outside of vision range.

COUNTER TO TACTIC:
Do the same; or if good sniper positions are limited, fire blindly into them, or stay away from positions which have a line of fire from good sniper nests (such as rooftops).

COUNTER TO COUNTER:
Find more specialized and less predictable sniper positions; use smoke, explosives, and/or terrain destruction to "construct" new sniper nests; use psi wizards instead of snipers who don't need line of fire.

- - -

TACTIC:
Blaster bomb the command/navigation room on the first turn in order to destabilize alien morale.

COUNTER TO TACTIC:
Bury command center in center of ship; use redundant armored walls to make it harder to blast through; have separate command and navigation rooms; distribute command ranks throughout ship; bring units with high bravery.
LOGISTICAL IMPACTS, RESPECTIVELY:
Less efficient ship interior design for normal functions; ship is heavier and more expensive; command delays reduce force responsiveness; lack of dedicated command center reduces control; high bravery units are less intelligent and thus less suitable for many operational tasks.

COUNTER TO COUNTER:
Carefully raid their less efficient ship design; bring more blasters; use a composition which does not rely on blasters; hide and camp the aliens.

ALTERNATIVE COUNTER TO TACTIC:
Take advantage of all of the soldiers who spent their whole turn inside the ship, and bomb the X-Com craft to kill them all.

COUNTER TO ALTERNATIVE COUNTER:
Spread your units out and don't ever leave a ball of them in a predictable location. Best to leave nobody at all inside the craft because it might get bombed first alien turn.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Looking for some advanced strategies and their counters
« Reply #14 on: November 14, 2022, 12:13:02 pm »
I did not really want dispute any specific plans regarding smoke grenades, just put out a general warning against going in too hard to mitigate them. Although walking into smoke isn't all that universal a solution. A lot of the time, enemies are pretty damn far from any smoke of mine that's just chilling somewhere between me and them.
Using smoke-grenades is a game-changer especially against the more current yet unreleased changes in my AI about the turn-order-manipulation, which allows the AI to really play like a human player when it comes to sniper/spotter-coordination. As in: The spotter moves in until he sees something but then the snipers take their shots first and the spotter then either moves in further, shoots himself or moves out a little again.
They almost feel like a hard necessity now on the more open maps. They force the spotter to come much closer and make it more likely to discover him first. But on the other hand they also make it so you don't really know where to look until it's too late.
As I said, the anti-smoke-logic doesn't even know about smoke. So they don't just "walk into smoke". The logic is more like: The shooting logic didn't shoot and the walking logic think it shouldn't have needed to walk as it should already have been able to attack from where the alien is. If both these conditions are true it'll just walk further towards where it thinks enemy units should be. The same should also help them with range-limited weapons and mods that impair their vision at night.

I do tend to play mods with excessive vision range (40 instead of 20 by default, though I personally tend to pull it back to 30 again). I imagine 'maxViewDistance' is another modding option that has massive implications for AI and balance, especially since increasing this makes all sight calculations a lot more expensive. And you can't really walk into a smoke cloud 25 tiles away unless you're a Chryssalid.
I've already taken that into account in every range-based-decision in my AI, of which there actually aren't that many left, now that I think of it. Sight-calculations are only done after moving. The by far most taxing in my AI is the line-of-fire-calculations which are independent from sight. I got reports of massive slow-downs from the one user who actually tested what I put out. SO I had to intervene and massively change how excessively I use them. My tests showed that the loss in playing-strength is minimal but the gain in performance is massive. (compared to the version that is put out for testing) It even forced me to come up with a new and much better algorithm to detect encircle-points. I might even use that new algorithm to detect choke-points and treat them in a different way.

AI using indirect grenades sounds cool, too. Though bear in mind that there are also grenade launchers that do similar things (is the Small Launcher the only one in vanilla, I forget?).
Yes, right now the small-blaster is still used like a direct-fire-weapon, which is not ideal but also not overly problematic. But I can totally see that in Mods where the enemies get stuff like rocket-launchers, you'd want to treat all that differently too. Shouldn't be that hard to adapt. I've seen the property of explosion-radius can be derived from the ammunition as that is already done with the blaster-launcher.

Although another lesson from Xenonauts is that players can be quick to get their pitchforks if their opponents are supernaturally good at using grenades. Make of that what you will. :)
Well, I think it's not just grenades, it's the entire AI, that I have some doubts about the actual usability for regular play-throughs.
It's definitely way more fun in the quick-battles where the outcome of a mission doesn't matter.
I've done three playthroughs alongside of development and especially the last one was quite frustrating while playing self-enforced (due to Meridian's warnings and also not robbing myself of potential material for debugging) ironman. But it also meant I had to grow as a player and this thread has helped quite a bit with that. So far smokes had to become a staple.

But since it's all optional and can be switched off at any time, that should prevent the pitchfork-thing. It's the player's decision of whether they want the aliens to be unleashed or not.