aliens

Author Topic: [SOURCEMOD] Brutal-OXCE 7.12.1  (Read 119001 times)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.0.0
« Reply #150 on: May 30, 2023, 03:23:35 pm »
I seem to have missed the description of update 6.1.0)) :o
I conducted several test battles and yes, it really works, but only on sectoids (they don't have close combat).
All the rest still think that they will deal more damage in melee and spend all their TUs on futile attempts to penetrate the armor vest.
Can you provide a save or describe how to reproduce it? There may be other leftover factors playing into this.

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.0.0
« Reply #151 on: May 30, 2023, 06:21:12 pm »
save or describe
Load the save and make a move. You will see that aliens prefer close combat (without effect), although their plasma can penetrate these armor vests. mod "The X-Com Files".
« Last Edit: May 30, 2023, 06:24:13 pm by panzer »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.2.2
« Reply #152 on: May 31, 2023, 03:52:45 pm »
Okay, the issue is that the AI correctly identifies not to use the Plasma-weapon because of CQC. But because it has an alternative to attacking with the plasma, it doesn't reach the movement-part of the code which would tell it to go to a tile further away.

I guess the Sectoids don't have a melee attack and that's why it works for them.

Normally the damage, even if it can't penetrate armor, is assumed to be at least one, so that units don't skip attacking completely. But in the case that:
We are checking the damage for melee, the enemy has CQC and we also have a ranged weapon, we should consider our damage to be 0 when the damage formula says it is.

Edit: Something else is wrong there. It thinks it would do 5 damage on average with it's melee-attacks. The base-damage is 30. So it should be able to roll up to 60, which is higher than the 44 armor.
« Last Edit: May 31, 2023, 04:13:40 pm by Xilmi »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11672
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SOURCEMOD] Brutal-OXCE 6.2.2
« Reply #153 on: May 31, 2023, 04:20:42 pm »
Indeed Sectoids don't have a melee attack in the X-Com Files, as a rare exception.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.0.0
« Reply #154 on: June 01, 2023, 01:43:36 am »
Load the save and make a move. You will see that aliens prefer close combat (without effect), although their plasma can penetrate these armor vests. mod "The X-Com Files".
Okay, not only have I found a good solution to deal with this issue, the AI now also takes into consideration which direction units are facing and from what side their armor is the weakest. :)

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.0.0
« Reply #155 on: June 03, 2023, 03:32:48 pm »
Okay, not only have I found a good solution to deal with this issue
Wow, it's working great now. Thank you very much! 8)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #156 on: June 07, 2023, 12:38:16 pm »
Just wanted to say that I'm quite happy with the current version and thus don't have any immediate plans for further improvements.

I struggle a lot against the current version. The balance between aggressiveness and concealment also seems to work really well. When watching streams against Brutal-AI, I see the players also having a hard time and see very little questionable behavior from the aliens.

So basically I'm now waiting for someone to show me any remaining exploitable weaknesses.

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #157 on: June 08, 2023, 04:10:43 pm »
Yes, the current version works great. However, I do have a suggestion. Make it so that enemies reserve TUs if they can't find cover and know where soldier X-com is located.
 I was able to recreate this behavior in the saved game. Here, three aliens, knowing that my soldiers are behind the ship, try to run towards them, being completely defenseless as they use up all their TUs.To test this, simply hide the soldier who can see the aliens behind the ship, take a turn, and then check the enemy with a mental scan. They will approach closer and be without TUs. This occurs on open maps or locations without cover, and I believe that if enemies saved action points for a the return shot, they would be more dangerous in these situations.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #158 on: June 09, 2023, 11:26:00 am »
Thanks for the save. I'll look at it once I'm back home.
I think I can explain the reason why this happens without looking at it. Maybe while explaining I can come up with a solution.

When the AI has not spotted anyone of your team, they basically have two steps. The first step is the peaking step. Which has several priorities:
If they think they will end up in smoke, they can spend up to 50% of their TUs to move forward.
If they think they can establish visual contact, thy can also spend up to 50% of their TUs to look for your units.
If neither of this is true, they will spend as little TUs as required to establish a line of sight to the first tile towards your unit that they currently can't see. Also up to 50% of TUs but usually less.

That phase works fine and isn't the one concerned here.

The second phase is the one that is supposed to "improve the position". For that there's 2 important parameters: Closeness to the suspected position enemy and safety from being discovered by the enemy. If there's a lot of cover around this works really good. If there's no or only very bad cover around, then the "safety"-part falls short to contribute much and closeness to the enemy becomes very predominant.
What's lacking completely in these considerations is "preserving TUs".

I guess they still hid behind the ship in the scenario you described, so it's cover also contributed to improving their position.

If your soldiers were doing something else and weren't aware of their presence, that could even be considered a smart move. Taking a little risk to be in striking-distance for the next turn.

But since you knew they were there, you obviously would look for them on the next turn and catch them with their pants (TUs) down.

So here's my idea:

The location where and when a unit was last spotted is tracked for each of the three teams. The AI uses this information about your units to have an idea where they could be without having to cheat and just "know". Their own information like that also exists so it can be used in autoplay. I as a player, have a good idea when my units were spotted by the AI and can take it into account in my decision-making. For example when I peak around a corner and look in the face of an alien and only have very little TUs to hide again, I know the alien knows that my unit must be close and likely will look for it right where I hid it. So I deliberately try to avoid doing things that would reveal my units position in order to sneak up on the AI.

This means the aliens could also "look up themselves" for whether they were recently spotted by me and take that into account for their decision-making.

In this example they'd know they were seen by you and instead of valuing "getting closer" could value "preserving TUs" or even "getting further away".

Now I'm really eager to experiment in this direction. :D

So again, many thanks for your feedback. Feedback like this is the lifeblood for ongoing AI-improvement!

Edit: The approach kinda works. But considering themselves as spotted after opening a door is a bit problematic in that regard. :D

Edit2: While I agree that in this particular situation holding the position would be better than trying to get closer, my attempts of realizing it lead to regression in my benchmark-scenarios.
« Last Edit: June 09, 2023, 06:46:08 pm by Xilmi »

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #159 on: June 11, 2023, 06:51:37 pm »


But since you knew they were there, you obviously would look for them on the next turn and catch them with their pants (TUs) down.

Perhaps a saved game is not the best example, but overall it is true. By taking cover behind X-com transport, smoke, or any other shelter, you can safely shoot down the enemy.

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #160 on: June 11, 2023, 06:56:43 pm »

So again, many thanks for your feedback.
Thanks for the great mod :) :)
By the way playing brutal-oxce, I started to shoot through obstacles more often, without having a clear line of fire (because aliens have become smarter and use cover). Do you have any plans to give similar abilities to the AI in the future?
 On the other hand, even if it is technically possible, it may actually harm the AI. For example, it may futilely try to break through a wall with inappropriate weapons or become too cheaty due to the Psi-vision parameter and so on.
« Last Edit: June 11, 2023, 06:58:16 pm by panzer »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #161 on: June 12, 2023, 11:21:07 am »
Perhaps a saved game is not the best example, but overall it is true. By taking cover behind X-com transport, smoke, or any other shelter, you can safely shoot down the enemy.
Perhaps instead of looking at it from the perspective of "What should the AI do in this situation?" a better approach is "What would I do in this situation?"
And I can say that I would likely neither run forwards, nor just stand there. I would try to make a big evasive circle around the edge of the map to join up with the other aliens that are in a much better location.

But figuring out when this situation applies and actually executing it are both things that I currently don't have an algorithm for. My current cover-algorithm can give me a value for each tile in range of how good the cover there is and compare that to other tiles in range. But unlike my earlier algorithms, there is no distinctive binary result for something like: "They are all bad." I could use the old algorithm for that.

Actually I have an idea for the current algorithm. There is a "unit" in which the "badness" of the cover of a tile is quantified. That unit is "TUs the enemy will have at the tile from where they can see me. This is accumulative for all units that could get vision to my tile. In your save the surroundings of your units all had a "badness"-value of  220-255 TUs. And since this is measured in TUs, we can compare it to our own TUs. If the badness of the cover is worse than our TUs we have left when we reach that tile, we could consider it as inadequate. And if all tiles in range are inadequate, we could then use an alternative behavior. So this is something I could experiment with next.
« Last Edit: June 12, 2023, 11:47:05 am by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #162 on: June 12, 2023, 12:02:54 pm »
Thanks for the great mod :) :)
By the way playing brutal-oxce, I started to shoot through obstacles more often, without having a clear line of fire (because aliens have become smarter and use cover). Do you have any plans to give similar abilities to the AI in the future?
 On the other hand, even if it is technically possible, it may actually harm the AI. For example, it may futilely try to break through a wall with inappropriate weapons or become too cheaty due to the Psi-vision parameter and so on.
I thought about whether and how to do that before. It knows what the obstacle would be and whether its weapon would destroy it or not. (Each obstacle has an armor-value and it gets destroyed if the damge-roll is higher than that value. Hedges have like 12 armor, stone-walls 70 and UFO-walls 200.)
So in theory, if a units location is know because one alien has spotted it, other aliens, that can't get a clear firing-line could theoretically consider trying to blast away at the cover.
It's not easy to code and also has disadvantages. Like giving away their own position and wasting their TUs and ammunition. It could use the TUs to move a position from where it can do something much better next turn while remaining hidden. Worst case is that it clears the line of sight and then doesn't have further shots but the enemy then can use the clear line of sight to attack it.

These tactics are usually good when you have a lot of units close to each other. So if one or two of them sacrifice their TUs to clear a wall and there's still others that then can use the newly created free firing line, it's good.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.3
« Reply #163 on: June 12, 2023, 05:40:35 pm »
Actually I have an idea for the current algorithm.
It is a bit frustrating. I have an idea. I implement it. It's even working as intended and looks interesting.

But when I then do my benchmark-tests it always leads to a regression. That is because every change in the algorithm even if it looks promising and logical has unforeseable consequences in other scenarios.

Edit: Oh, wait. I was comparing to pre-blind-grenade-results. These impact X-Com-autoplay too and are the main reason for losing a lot more units. Turns out 6.3.3 loses 7 aliens anyways in the benchmark-mission. Almost all due to retaliatory blind-grenading from x-com. So I actually wasn't doing worse afterall with these eperimental changes. :o

Edit2: Okay, I tried several approaches. One was clearly worse, one was about the same and one is slightly better.
« Last Edit: June 12, 2023, 09:12:18 pm by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 641
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 6.3.8
« Reply #164 on: June 14, 2023, 11:48:32 pm »
I just went back to the 6.3.3 behaviour with 6.3.8.
Every action has consequences. And while in certain situations that new style was better, it just made the AI too passive overall.

High risk-high-reward playstyle may backfire but overall, at least against actual players seemed to be better.

The aliens often missed the opportunity to position themselves in striking distance for the player and eventually got discovered anyways. Relying on reaction-fire simply isn't a viable strategy against all the tools in the player's arsenal. Spotter&Sniper and especially smoke-usage makes this approach almost useless.