OpenXcom Forum

Modding => Released Mods => Brutal AI => Topic started by: Xilmi on November 01, 2022, 05:21:16 pm

Title: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 01, 2022, 05:21:16 pm
Roughly a week or so ago I watched a video about the history of X-Com through wich I learned about OpenXcom.

After playing a little bit I got hooked enough to want to work on it's AI. And that's what I've done since then. Meridian helped me to set up a build that I could provide to others. You can download it from here.

https://github.com/Xilmi/OpenXcom/releases

It should be compatible with everything that OXCE is compatible with. So far I've only tested it with vanilla UFO. So tests with mods are also interesting in the sense of whether the AI doesn't know what to do with specific mod-features.

The new AI is enabled under Options=>Advanced=>AI=>Brutal AI

Incase you are in any kind of Ironman-mode-game you intend to have a chance on finishing, I recommend not to just switch it on mid-game.

I don't want to go into too much detail about how it is different from the regular AI and what exactly to expect so there's fewer spoilers. But I'm open to answer any questions that might arise.

My intention is to keep working on this for some time and letting any feedback influence what could be improved. Note that my main goal is to make it harder to beat.

Link last updated: 2022-12-27

New thread about this:

https://openxcom.org/forum/index.php/topic,10967.0.html
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 04, 2022, 01:54:36 am
Made a little video.

It's unfortunately quite terrible quality. But it brings the point across.

https://youtu.be/rAWCGdKvdZo

Note: What's shown in the video is a newer version than the one linked here. I hope Meridian can get to building it soon.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Cooper on November 04, 2022, 11:28:24 am
Made a little video.

It's unfortunately quite terrible quality. But it brings the point across.

https://youtu.be/rAWCGdKvdZo

Note: What's shown in the video is a newer version than the one linked here. I hope Meridian can get to building it soon.

Would be interesting to see a longer mission, and in debug mode so we could se exactly what the aliens are doing.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 04, 2022, 12:01:35 pm
Would be interesting to see a longer mission, and in debug mode so we could se exactly what the aliens are doing.
Yeah, for sure, I'll be releasing more footage. I think that's better than any textual description.
One thing I noticed in a test run is that there is quite an exploitable behavior around choke-points. After I come up with a good solution I'll look into making more and better-quality videos.

Edit: New version is available: https://lxnt.wtf/oxem/builds//ExtendedTests/BrutalAI-7.8.2.1-test-36615bda7-2022-11-04-win64.7z
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: psavola on November 04, 2022, 12:43:56 pm
The only thing from the video I see that differs significantly from vanilla are grenades after mind control (or have I always avoided this by having a pre-primed smoke grenade, which the mind-controlled troops throw first). Though it is possible that lots of firing from every direction is made slightly more efficient in this case due to "information sharing" between the aliens. Obviously the example in the video is somewhat of a corner case, as no experienced player would dare to play in that manner even in the vanilla. So you would have been equally crushed with vanilla as well.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 04, 2022, 01:20:50 pm
The only thing from the video I see that differs significantly from vanilla are grenades after mind control (or have I always avoided this by having a pre-primed smoke grenade, which the mind-controlled troops throw first). Though it is possible that lots of firing from every direction is made slightly more efficient in this case due to "information sharing" between the aliens. Obviously the example in the video is somewhat of a corner case, as no experienced player would dare to play in that manner even in the vanilla. So you would have been equally crushed with vanilla as well.
Yes, the video is way too short to shows a whole lot of things.

Here's some things that happen which can't necessarily be told from the video:

1. Vanilla AI limits itself to 1 psi-attack per unit per turn. This limit was removed so the amount of psi-attacks you have to endure against sectoids are essentially doubled.
2. Aliens that are not involved in the battle head towards it's direction no matter where they are. If any of their friends already has vision on enemy units, they don't head towards the enemy-units themselves but to the closest tile from where they have a line of fire on any of my units. They also will reserve fewer or even no TUs if they are further away from their enemies.

That second part is the key difference. The aliens don't just wait until you find them. They head to where the action is. However, this currently is a bit exploitable. So goal for the next version is to avoid walking into traps and rather wait for the player to walk into theirs. I think I have a pretty good idea of how to accomplish that.

Good hint with the preprimed smoke-grenades. The code that scores the grenade-throwing needs to make sure it's actually something that can deal damage.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: psavola on November 04, 2022, 04:14:41 pm
Here's some things that happen which can't necessarily be told from the video:

1. Vanilla AI limits itself to 1 psi-attack per unit per turn. This limit was removed so the amount of psi-attacks you have to endure against sectoids are essentially doubled.
...

The code appears to have something to this effect (_didPsi flag). But I keep wondering. I think I have seen numerous times missions where there is only one PSI-capable alien do multiple attacks during the turn (multiple "blips" on the same person, maybe even a different one). I would have even have sworn that. But maybe I am still mistaken or something else is going on (e.g., multiple signals are still actually one attack).

Quote
Good hint with the preprimed smoke-grenades. The code that scores the grenade-throwing needs to make sure it's actually something that can deal damage.

With current AI you can eliminate almost all impact of alien mind control by having a primed smoke grenade and dropping your hand-held weapons at the end of the turn (and picking them up again). The only thing you might lose is having your guy wander around (and possibly trigger proximity grenades). The game is going to be extremely brutal if AI under alien MC is made better and more realistic (e.g. throwing grenades, taking weapons out of your belt or backpack, picking up weapons), which might also be rather easy to implement. Some missions or campaigns might even become essentially impossible (with previous battlescape tactics) until you develop protections against MC.

Maybe a more realistic and brutal AI under MC could even be a separate feature with toggle on/off. I wonder if that could more easily be merged to mainstream.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: psavola on November 05, 2022, 07:11:18 am
YouTube suggested the latest vid (attacking a large UFO). You could certainly see a difference there. The aliens seemed to be "sniping"  more, and rushing out of the ufo like a tsunami (in a regular game, you usually would need to wait for around turn 30 or so until every alien is out of the ufo). This is also a downside. As you could see, there might be even 4-5 aliens clustered together, easily killed with a single grenade. You may need to make the rushing out less aggressive and/or ensure that they don't stick around as easily killable clusters (like your soliders were). One criteria might be that they might prefer to move so that they could have enough TUs to end up in a covered spot and at the very least not next to other aliens.

As an improvement of your own battlescape tactics, you should always use smoke grenades if you don't have other cover and especially if you have many people in the same place (= otherwise an alien grenade magnet). The aliens can't get visibility on you while you are in a sufficiently thick smoke. So in that mission, you might have avoided almost all casualties by using a sufficient smoke cover.

Because the aliens don't have smoke grenades, they cannot protect themselves in this manner. But you should certainly try to avoid the aliens imitating the "basic" battlescape tactics where you deploy all your troops in the same place.

A very nasty alien tactic might be throwing grenades at smoke-covering areas, in the hopes that they would hit or wound someone. But this might be too brutal.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 06, 2022, 04:11:04 am
This is also a downside. As you could see, there might be even 4-5 aliens clustered together, easily killed with a single grenade.
Indeed. Due to an unnoticed error they were rushing towards my units. What they actually should have done and now do is to go towards a position from where they can shoot. However, if they all start at a similar place and there's an obstacle along the way, they might still end up quire clustered.

Ideally they'd do some sort of encirclement and then move in at the same time from as many directions as possible. I'm not quite sure yet how to realize that algorithmically. Planning their move over the whole map had the advantage of me being able to send them anywhere. Before they were limited to what they could reach within one turn. With what's reachable in one turn it's easy to make sure some spread. But with when they move bigger distances, this doesn't work like that anymore.

I need more practice with the smoke-grenades. I found them to be quite the double-edged-sword due to also imparing my own vision.

About the prepriming of smoke-grenades. The aliens always paid the price of priming the grenade too and then not even actually priming it. I made it possible for them to just prime and not throw it too. But doing this generally was very counterproductive particularly due to the alien clustering. It allowed me to kill one and that nuked a few others. So they now only do it in very specifiic scenarios. With weapon-pickup enabled and priming having no cost, this should help. Telling that their grenade is a smoke-grenade would also help with that.

But the Psied-soldier-behavior isn't the biggest priority for me. The general behavior needs to get better. Especially the clustering issue.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 12, 2022, 01:12:30 pm
2. Aliens that are not involved in the battle head towards it's direction no matter where they are. If any of their friends already has vision on enemy units, they don't head towards the enemy-units themselves but to the closest tile from where they have a line of fire on any of my units. They also will reserve fewer or even no TUs if they are further away from their enemies.

That sounds just completely awesome ! Thank you so much for this.
It is to me the biggest flaw of UFO and TFTD : nearly half the aliens aren't actually attacking but roughly waiting around their spawn points, killing a bit the atmosphere as it often transform the last part of the battle into a "look for the aliens that are hiding since the beginning of the battle in a corner of a building" .

In itself it can be fun and tactically interesting, but that hide&seek fun is thrown out of the window when you play long sessions of the game with completing 4 or 5 battles in a row and the repetition of the camping aliens is just becoming annoying instead of "tacticool" , so an option that forces the aliens AI to actively looking for a fight is really something interesting to me.

Is this version of OXCE compatible with mods or is it vanilla UFO only for now ?
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 12, 2022, 02:33:13 pm
New Version available:

https://lxnt.wtf/oxem/builds//ExtendedTests/BrutalAI-7.8.2.2-test-d525b58e6-2022-11-12-win64.7z
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 12, 2022, 02:37:39 pm
Is this version of OXCE compatible with mods or is it vanilla UFO only for now ?
Should be compatible with all mods that OXCE is also compatible with as it's built on OXCE. However, I cannot promise the AI to act correctly in the context of all Mods.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Leflair on November 12, 2022, 04:48:23 pm
How does this affect the melee AI?

Some issues I've noticed in the normal AI:
- Enemies will shy away from fire, even if they can pass safely through
- Melee enemies will stop if they are reaction fired upon, hit or no hit, or even if the attack can't really do damage.
- Very conservative in conserving TU to lower reaction fire risk, regardless of if LeeroyJenkins mode is on or not.
- Will be very caution in moving in if 2+ soldiers have LOS on them (presumably also to not draw reaction fire).

So instead of just moving in and getting their hits in, they'll waddle around back and forth or just plain stop cold well within fire range of the enemy - getting killed when it's the players turn.

I have a few units where just shutting this kinda caution off will significantly increase their lethality and danger.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 12, 2022, 05:06:48 pm
I did some extra-testing for melee-units because especially the bigger ones were quite derpy. So Melee units should be well supported by Brutal-AI.

Regarding to fire: I suppose fire marks a tile as dangerous, which is something that melee-units are coded to avoid. I currently also have them avoid tiles marked as dangerous so in this case they probably also shy away from fire. I shall check that and maybe add different flags for different kinds of danger.

There is a call-back from movement to AI whenever a unit sees more enemies. So your observation is indirectly impacted by reaction-fire. The base-AI uses weight-based randomization to decide which of 4 possible kinds of actions it wants to perform. The more enemies that it sees, the more likely it is to decide to run away. When applied to melee-units this will mess with them big time. I have a completely different logic for fleeing that melee-units generally should ignore. So my AI would definitely not do that and further pursue the target it wants to attack.

Melee units generally don't conserve TUs in my AI. Others till do in the release form today. But I'm currently experimenting with ways where my Units generally don't reserve TUs unless they reached the position where they want to be at. If there goal is to camp, they will reserve everything. But if their goal is to walk somewhere else, they'll try to get there more quickly. But as I said, that's not yet in the release and still being tested for whether it's an improvement or not.

Last question is pretty much the same answer as the second question. It's not directly correlated to reaction-fire but to how many enemies they see.

I guess you need that for a mod. So I guess that for the next release I will also add the option to control whether to use brutal-AI via modding flags to specific units. (currently it's only all or nothing)
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Leflair on November 12, 2022, 05:11:32 pm
Specific unit flags would be quite handy, that way you can divide it between melee units, normal units and "elite units".

Another interesting way would be to have it flagged for race lists, so any unit within a race list is under say "shock attack" command and will obey brutal AI rules but otherwise not (example, press ganged cultists who are normally derpy/cowardly but in a certain list acts under better command).

One final issue I've encountered is with chryssalid type units, that will waste all their TUs on one target (I believe even if that target is zombified?). There was an attempt at a flag to allow controlling how many attacks a unit will do against a single target before moving on, but I couldn't get that to work.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 12, 2022, 05:31:30 pm
Tested it with my modded 40Kmod+Rosgima (the modded part is the maxviewdistance that i reduced from the default 60 to 30, and adjusted all the visibilityAtDay and visibilityAtDark accordingly for all units , as in default mod and expansion would go up to 120 )

With my Rhino (it's a normal ground transport, i mean it get you to start on turn 1) i got into a fight with an Ork wagon that saw a lot of grenades thrown my way.
Couldn't see the other differences as in that map my Rhino had spawned right next the Ork vehicle, so everyone was nearly already at weapon range of each other.
Seems like BrutalAI ignore the "turnAIUseGrenade" setting (that i had set up high as i wanted to see how the AI navigate with the Brutal AI)

Now on a medium UFO landing, i sent my Drop Pods (it's a transport that only have you landing and starting on turn 2, meaning turn 1 is AI only).
And it seems the BrutalAI gets stuck on that turn 1  "Hidden Movement", the game regularly freeze and unfreeze, sometime i can hear a door, but after near of a dozen of minute the turn 1 is still not resolved.

With the regular OXCE 7.8 , that fight works correctly so it seems the way the Drop Pods transport works put a huge strain on the BrutalAI

EDIT : gave a try with the newer version of BrutalAI (as i noticed there was one newer than the one i downloaded yesterday).
And this time it works.
I reloaded and retried the save i did multiple time and there is no more problem, the AI only turn 1 always complete this time , that's great tough i have no idea what was wrong previously.

EDIT 2 : completed that medium UFO battle and it was quite intense as i didn't had to move all over the map to find enemies (Night Raptors chaos marines), they were flying and running around my troops, attacking when they could (when my troops weren't shooting them down as i was using rather strong units and weaponry) .
There's only the case of the UFO that had 4 enemies in it and that stayed inside for the whole duration of the battle.
(https://i.imgur.com/QiNvWpn.jpg)

It wasn't a problem as it got me into a nice assault , but i wonder if it was normal that some AI were staying in the ship because apparently the doors were on the 2nd floor instead of the 1st one as in most classic ships :
(https://i.imgur.com/qq9QH1Ym.jpg) (https://i.imgur.com/qq9QH1Y.jpg)
I  just made my own entrance by destroying a wall personnally and killed them all.

edit 3 : oh damn after checking the options i noticed BrutalAI was OFF :/ as i was testing with the save on and off and forgot at some point to turn it on again
i guess that intense battle was only played with normal AI then, must have been lucky to have the enemies spawning close to my landing zone then :/
Will have to test further

Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 12, 2022, 06:57:02 pm
And the bug/problem is back, in fact it's because i had turned off the BrutalAI accidentally that the mission worked, as now after turning it back ON and loading my save : the turn1 "hidden movement" never resolve anymore and the game stay stuck.

Attached the save to my post if you want to try (only need the 40k and its Rosigma expansion mods, nothing else), just select the landed UFO that is at some distance above one of my bases and intercept it with the Drop Pods from the list.
After the mission load, your troops are in the drop pods somewhere in the air so press the End of Turn to get the AI play its own turn, it's there that the game will be stuck, sometime you'll hear a door opening or two but it will never end if BrutalAI is on.


Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 12, 2022, 11:03:02 pm
it's there that the game will be stuck, sometime you'll hear a door opening or two but it will never end if BrutalAI is on.
May I ask what the dimensions of these maps are, how many opponents, how many of your own units and if any (or all) of the opponents can fly?

My hypothesis about is that there's an exponential growth in turn-times. It scales with UnitsĀ² * accessible tiles. Accessible tiles usually being much more when the enemy can fly.

Turn-processing is also not so fast for me when there are Floaters for example. It is still kinda bearable but that's on standard 50x50x4 Maps.

I guess I have to make some cuts regarding expensive algorithms. Otherwise I doubt turns will resolve in an acceptable amount of time in mods where the map-size and unit-count is significantly larger than vanilla.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 12, 2022, 11:44:18 pm
To test if it was the too many fliers that was responsible potentially or if it was the special way Drop Pods deploy, i edited the Rhino transport (as it's in term of transport it's a classic -> start mission -> deploy on turn one, unlike the drop pod that keep your troops in the sky on the 1st turn while the AI play its turn and only deploy on turn 2) to have the same speed as the drop pods (so it can reach the landed medium UFO before it takes off.

When the mission started, i deployed a few of my marines to kill the (they were landed, not flying) enemies that were close to the Rhinos.
The Rhinos own guns helped to clean the  insertion zone.

Then pressed End Turn and the AI turn got stuck again during the "hidden movement" that never seemed to resolve, so at least it confirms this problem has nothing to do with the special way Drop Pods make their insertion on turn 2.

For the map it does seem to be standard 50x50 , with BrutalAI enabled after a debug kill on my turn 1, it shows there were 28 enemy units (when i did the mission with BrutalAI turned to OFF there were only 25 but a couple of enemies were taken alive) but 40k/Rosigma has usually more enemies in maps than other mods (but most mods have higher enemy density than default UFO and TFTD)
Nearly all of the enemies featured in that mission are flyiers (Night Raptors and War Talons, along with their officers) , there was a Neverborn but they don't fly.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 13, 2022, 12:17:52 am
Then pressed End Turn and the AI turn got stuck again during the "hidden movement" that never seemed to resolve
Well, the question is: Does it never resolve or is it just really, really slow.
I recommend using debug-mode to figure that out:

In options.cfg find the enty "debug:" and set it to "debug: true".

Then before you hit end-turn press ctrl+d, which gives you map-hack.

Really slow would mean stuff happens but between every unit there's a very significant delay where the camera is centered on that unit.
Completely stuck means that stuff is happening but in the end it keeps trying to order a unit to do an impossible command. If you can scroll normally at some point (in debug mode you still have to end the AI-turn manually) the turn has finished.
If it lags while scrolling while the arrow remains above one unit, it means it's stuck and tries to give a command to that unit.

Ideally you could also enable "traceAI" in the same config I mentioned above. When it's stuck the "openxcom.log" will have repeating entries of always the same unit trying to act.

Then you could copy&paste a block of that repeating cycle for me, which could help me resolve the issue.

Anyways, if it's a speed-issue I have just changed it from unitsĀ²*map-tiles to 2*units*map-tiles, which is way faster than it was before. And on several test-saves the result of the alien-move was almost the same regardless of that change.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 13, 2022, 02:27:44 pm
after debug and trace AI what i could observe :

- the game isn't stuck, it in fact just take a long time to process a single AI move (and repeated with 28 AI that probably is why i thought the turn was never resolving )
- i used the Rhino for the test so the battle start classically with my turn 1
- the game isn't stuck indeed
- the screen move to an AI and  (as i play windowed so it's easy to see the mention of this happening) the game executable stop responding (can't move the arrow, etc...) for +/- 10 seconds (sometime more to near 20 seconds)
- the AI move  then sometime after another +/- 10 seconds of freezing, the screen move to another AI and the game stop responding again for +/- 10 seconds, then that AI move.
- sometime the game does not stop responding directly but there's nothing happening for +/-10 seconds (then it stop responding again for +/-10 seconds before the AI move)

I left the game running and finally the turn ended (i mean there was no more AI to move, so i could finally move the arrow again and end the turn manually).

Here's a sample of the log , interesting that the time stamps shows that there were those +/- 10 seconds freezing , seems to happen after the last "checking LOF" and the "best position to attack" everytime
Quote
[13-11-2022_13-13-03]   [INFO]   Brutal-AI final got-position from (18,26,7) to (18,26,7)
[13-11-2022_13-13-03]   [INFO]   BattlescapeGame::popState() #1 with 43 TU
[13-11-2022_13-13-03]   [INFO]   #1000011--STR_NIGHTLORDS_RAPTOR_SOLDIER
[13-11-2022_13-13-03]   [INFO]   Unit has 0/2 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-13-03]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-03]   [INFO]   Explosion with radius 5 at (45,44,1) affected AoE targets: 1
[13-11-2022_13-13-03]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-03]   [INFO]   Explosion with radius 5 at (43,54,1) affected AoE targets: 1
[13-11-2022_13-13-03]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-13-03]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-19]   [INFO]   best positon to attack from (33,19,8) score: 300 need to flee: 0
[13-11-2022_13-13-19]   [INFO]   Distance to (45,44,1): 158 max distance to run: 192 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-13-19]   [INFO]   Brutal-AI wants to go from (27,17,0) to (33,19,8) travel-target: (33,19,8) Remaining TUs: 125 TU-cost: 106 friendswithLoS: 1
[13-11-2022_13-13-19]   [INFO]   Brutal-AI final got-position from (27,17,0) to (33,19,6)
[13-11-2022_13-13-19]   [INFO]   Walking from: (27,17,0), to (33,19,6)
[13-11-2022_13-13-19]   [WARN]   No free channels available
[13-11-2022_13-13-19]   [INFO]   BattlescapeGame::popState() #0 with 35 TU
[13-11-2022_13-13-19]   [INFO]   #1000011--STR_NIGHTLORDS_RAPTOR_SOLDIER
[13-11-2022_13-13-19]   [INFO]   Unit has 0/2 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-13-19]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS accuracy: -115 numberOfShots: 1 tuCost: 29
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS accuracy: 0 numberOfShots: 1 tuCost: 18
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-20]   [INFO]   STR_PLASMA_CARBINE_CHAOS checking LOF
[13-11-2022_13-13-36]   [INFO]   best positon to attack from (33,19,8) score: 300 need to flee: 0
[13-11-2022_13-13-36]   [INFO]   Distance to (45,44,1): 160 max distance to run: 192 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-13-36]   [INFO]   Brutal-AI wants to go from (33,19,6) to (33,19,8) travel-target: (33,19,8) Remaining TUs: 35 TU-cost: 16 friendswithLoS: 1
[13-11-2022_13-13-36]   [INFO]   Brutal-AI final got-position from (33,19,6) to (33,19,6)
[13-11-2022_13-13-36]   [INFO]   BattlescapeGame::popState() #1 with 35 TU
[13-11-2022_13-13-36]   [INFO]   #1000012--STR_NIGHTLORDS_RAPTOR_SOLDIER
[13-11-2022_13-13-36]   [INFO]   Unit has 0/2 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-13-36]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-13-36]   [INFO]   STR_PLASMA_PISTOL checking LOF
[13-11-2022_13-13-36]   [INFO]   Explosion with radius 5 at (45,44,1) affected AoE targets: 1
[13-11-2022_13-13-36]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-13-36]   [INFO]   STR_PLASMA_PISTOL checking LOF
[13-11-2022_13-13-36]   [INFO]   Explosion with radius 5 at (43,54,1) affected AoE targets: 1
[13-11-2022_13-13-36]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-13-52]   [INFO]   best positon to attack from (25,32,8) score: 300 need to flee: 0
[13-11-2022_13-13-52]   [INFO]   Distance to (45,44,1): 142 max distance to run: 192 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-13-52]   [INFO]   Brutal-AI wants to go from (24,24,3) to (25,32,8) travel-target: (25,32,8) Remaining TUs: 125 TU-cost: 90 friendswithLoS: 1
[13-11-2022_13-13-52]   [INFO]   Brutal-AI final got-position from (24,24,3) to (25,32,7)
[13-11-2022_13-13-52]   [INFO]   Walking from: (24,24,3), to (25,32,7)
[13-11-2022_13-13-53]   [WARN]   No free channels available
[13-11-2022_13-13-53]   [WARN]   No free channels available
[13-11-2022_13-13-53]   [INFO]   BattlescapeGame::popState() #0 with 43 TU
[13-11-2022_13-13-53]   [INFO]   #1000012--STR_NIGHTLORDS_RAPTOR_SOLDIER
[13-11-2022_13-13-53]   [INFO]   Unit has 0/2 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-13-53]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-13-53]   [INFO]   STR_PLASMA_PISTOL checking LOF
[13-11-2022_13-13-53]   [INFO]   STR_PLASMA_PISTOL accuracy: -43 numberOfShots: 1 tuCost: 41
[13-11-2022_13-13-53]   [INFO]   STR_PLASMA_PISTOL checking LOF
[13-11-2022_13-13-53]   [INFO]   STR_PLASMA_PISTOL accuracy: -68 numberOfShots: 1 tuCost: 41
[13-11-2022_13-14-09]   [INFO]   best positon to attack from (26,32,8) score: 300 need to flee: 0
[13-11-2022_13-14-09]   [INFO]   Distance to (45,44,1): 148 max distance to run: 192 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-14-09]   [INFO]   Brutal-AI wants to go from (25,32,7) to (26,32,8) travel-target: (26,32,8) Remaining TUs: 43 TU-cost: 12 friendswithLoS: 1
[13-11-2022_13-14-09]   [INFO]   Brutal-AI final got-position from (25,32,7) to (25,32,7)
[13-11-2022_13-14-09]   [INFO]   BattlescapeGame::popState() #1 with 43 TU
[13-11-2022_13-14-09]   [INFO]   #1000013--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-14-09]   [INFO]   Unit has 0/2 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-14-09]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-14-09]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-09]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-09]   [INFO]   Explosion with radius 5 at (45,44,1) affected AoE targets: 1
[13-11-2022_13-14-09]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-14-09]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-09]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-10]   [INFO]   Explosion with radius 5 at (43,54,1) affected AoE targets: 1
[13-11-2022_13-14-10]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-14-25]   [INFO]   best positon to attack from (26,53,8) score: 300 need to flee: 0
[13-11-2022_13-14-25]   [INFO]   Distance to (45,45,0): 62 max distance to run: 268 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-14-25]   [INFO]   Brutal-AI wants to go from (31,48,1) to (26,53,8) travel-target: (26,53,8) Remaining TUs: 120 TU-cost: 88 friendswithLoS: 1
[13-11-2022_13-14-25]   [INFO]   Brutal-AI final got-position from (31,48,1) to (26,53,7)
[13-11-2022_13-14-25]   [INFO]   Walking from: (31,48,1), to (26,53,7)
[13-11-2022_13-14-27]   [INFO]   BattlescapeGame::popState() #0 with 38 TU
[13-11-2022_13-14-27]   [INFO]   #1000013--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-14-27]   [INFO]   Unit has 0/2 known enemies visible, 1 of whom are spotting him.
[13-11-2022_13-14-27]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-14-27]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-27]   [INFO]   STR_PLASMA_GUN_TWINCORE accuracy: 27 numberOfShots: 1 tuCost: 35
[13-11-2022_13-14-27]   [INFO]   Evaluate option 8 against 1000030 at (45,44,1) with weapon STR_PLASMA_GUN_TWINCORE, score = 92
[13-11-2022_13-14-27]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-27]   [INFO]   STR_PLASMA_GUN_TWINCORE accuracy: 27 numberOfShots: 1 tuCost: 36
[13-11-2022_13-14-27]   [INFO]   Evaluate option 8 against 1000031 at (43,54,1) with weapon STR_PLASMA_GUN_TWINCORE, score = 90
[13-11-2022_13-14-27]   [INFO]   BattlescapeGame::popState() #0 with 38 TU
[13-11-2022_13-14-28]   [INFO]   BattlescapeGame::popState() #0 with 5 TU
[13-11-2022_13-14-29]   [INFO]   BattlescapeGame::popState() #0 with 5 TU
[13-11-2022_13-14-29]   [INFO]   BattlescapeGame::popState() #0 with 5 TU
[13-11-2022_13-14-29]   [INFO]   #1000014--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-14-29]   [INFO]   Unit has 0/1 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-14-29]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-14-29]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-29]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-29]   [INFO]   Explosion with radius 5 at (45,44,1) affected AoE targets: 1
[13-11-2022_13-14-29]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-14-42]   [INFO]   best positon to attack from (19,11,8) score: 300 need to flee: 0
[13-11-2022_13-14-42]   [INFO]   Distance to (45,44,1): 212 max distance to run: 192 allowedToSpendAllTimeUnits: 1
[13-11-2022_13-14-42]   [INFO]   Brutal-AI wants to go from (23,3,2) to (19,11,8) travel-target: (19,11,8) Remaining TUs: 120 TU-cost: 88 friendswithLoS: 1
[13-11-2022_13-14-42]   [INFO]   Brutal-AI final got-position from (23,3,2) to (19,11,7)
[13-11-2022_13-14-42]   [INFO]   Walking from: (23,3,2), to (19,11,7)
[13-11-2022_13-14-43]   [INFO]   BattlescapeGame::popState() #0 with 40 TU
[13-11-2022_13-14-43]   [INFO]   #1000014--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-14-43]   [INFO]   Unit has 0/1 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-14-43]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-14-43]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-14-56]   [INFO]   best positon to attack from (19,10,8) score: 300 need to flee: 0
[13-11-2022_13-14-56]   [INFO]   Distance to (45,44,1): 228 max distance to run: 192 allowedToSpendAllTimeUnits: 1
[13-11-2022_13-14-56]   [INFO]   Brutal-AI wants to go from (19,11,7) to (19,10,8) travel-target: (19,10,8) Remaining TUs: 40 TU-cost: 12 friendswithLoS: 1
[13-11-2022_13-14-56]   [INFO]   Brutal-AI final got-position from (19,11,7) to (19,10,7)
[13-11-2022_13-14-56]   [INFO]   Walking from: (19,11,7), to (19,10,7)
[13-11-2022_13-14-57]   [INFO]   BattlescapeGame::popState() #0 with 36 TU
[13-11-2022_13-14-57]   [INFO]   #1000014--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-14-57]   [INFO]   Unit has 0/1 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-14-57]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-14-57]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-15-11]   [INFO]   best positon to attack from (20,10,8) score: 300 need to flee: 0
[13-11-2022_13-15-11]   [INFO]   Distance to (45,44,1): 228 max distance to run: 192 allowedToSpendAllTimeUnits: 1
[13-11-2022_13-15-11]   [INFO]   Brutal-AI wants to go from (19,10,7) to (20,10,8) travel-target: (20,10,8) Remaining TUs: 36 TU-cost: 12 friendswithLoS: 1
[13-11-2022_13-15-11]   [INFO]   Brutal-AI final got-position from (19,10,7) to (19,10,7)
[13-11-2022_13-15-11]   [INFO]   BattlescapeGame::popState() #1 with 36 TU
[13-11-2022_13-15-11]   [INFO]   #1000015--STR_NIGHTLORDS_RAPTOR_NAVIGATOR
[13-11-2022_13-15-11]   [INFO]   Unit has 0/1 known enemies visible, 0 of whom are spotting him.
[13-11-2022_13-15-11]   [INFO]   Currently using Patrol behaviour
[13-11-2022_13-15-11]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-15-11]   [INFO]   STR_PLASMA_GUN_TWINCORE checking LOF
[13-11-2022_13-15-11]   [INFO]   Explosion with radius 5 at (45,44,1) affected AoE targets: 1
[13-11-2022_13-15-11]   [INFO]   STR_SCARE_GRENADE checking LOF
[13-11-2022_13-15-25]   [INFO]   best positon to attack from (28,50,8) score: 300 need to flee: 0
[13-11-2022_13-15-25]   [INFO]   Distance to (43,54,0): 124 max distance to run: 264 allowedToSpendAllTimeUnits: 0
[13-11-2022_13-15-25]   [INFO]   Brutal-AI wants to go from (35,49,0) to (28,50,8) travel-target: (28,50,8) Remaining TUs: 120 TU-cost: 136 friendswithLoS: 1
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 13, 2022, 05:40:03 pm
- the game isn't stuck, it in fact just take a long time to process a single AI move
Yeah, that's kinda what I suspected. So having done something about that was a good idea and speed optimization needs to be taken into account for decisions I make in the future.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 14, 2022, 10:29:21 pm
Here's a video of me doing a mission with the latest in-development-version:

Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 18, 2022, 12:49:46 am
I uploaded a new version of this on github:

https://github.com/Xilmi/OpenXcom/releases/tag/v_1_0_0
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 18, 2022, 02:47:24 am
Here's an "advertisment" for it.
I thought this was pretty hilarious:

https://youtu.be/yim1kG_ddpQ
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: psavola on November 18, 2022, 07:08:03 am
I uploaded a new version of this on github:

https://github.com/Xilmi/OpenXcom/releases/tag/v_1_0_0

It would be nice to have it pushed to the new-ai branch, in particular so that versions for various platforms would be built on the build farm.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 18, 2022, 11:28:23 am
It would be nice to have it pushed to the new-ai branch, in particular so that versions for various platforms would be built on the build farm.
Wait, does this happen automatically, as soon as they accept the PR?
I was looking for a way of distributing my Mod without having to bother Meridian and battle with my misconceptions about how GitHub is supposed to be used.
I felt bad for bothering them. That's why I looked into how I need to structure the package and created the zip-file to upload manually. :o
Of course with the massive caveat that it would only run on the OS that I'm using myself.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 19, 2022, 11:49:23 am
This fixes two issues that came up during testing:

https://github.com/Xilmi/OpenXcom/releases

1. Non-moving-units are now supported and no longer cause an endless loop.
2. Arcing-shot-validation is now in line with what the engine-does. This both fixes a rare but possible endless-loop but also also makes units with arcing-shots much more likely to actually shoot at all.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 19, 2022, 03:17:11 pm
Used the new version from github, i noticed there are a bunch of dll in there, while for my test i moved them into my openxcom folder just in case they're required, are they really needed (i ask because by default there's no dll in Meridian's OXCE directory usually) ?

I used the same save i posted there previously :
https://openxcom.org/forum/index.php/topic,10854.msg150565.html#msg150565
(using the 40K mod + its Rosigma Expansion) standard 50x50 , there were 28 enemy units that all have flying ability and a medium sized UFO of 3 levels high

Intercepted the landed UFO in the north with my Drop Pods
Pressed End Turn once the battle truly start (as my troops are stuck in altitude in drop pods so nothing to do in turn 1 for me)

Test with OXCE 7.7.3 : 1st turn "hidden movements" takes 18 seconds before it's my turn to play
Test with Brutal AI OXCE 7.8.4, but Brutal AI turned off : 1st turn "hidden movements" takes 20 seconds before it's my turn to play
Test with Brutal AI OXCE 7.8.4, but Brutal AI turned on :  1st turn "hidden movements" takes 258 seconds before it's my turn to play.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 20, 2022, 01:17:54 pm
New version available:

https://github.com/Xilmi/OpenXcom/releases

Changelog:

Modders can now set "isBrutal: true" for separate units in units.rul. This allows using Brutal-AI for specific units in addition to the still existing option of enforcing it for everyone.
If both "isBrutal" and "isLeeroyJenkins" are set, "isBrutal" will take priority.

New end of turn and unit-is-ready-mechanism that works the same for brutal- and vanilla AI and was necessary to allow brutal and non-brutal-units in the same mission while keeping brutal-AI's capability to manipulate move-order.
This should also put an end towards all potential issues of the AI getting stuck in an endless-loop of trying and failing to do the same action over and over. Instead of the game freezing there will now simply be a message in openxcom.log if _traceAI is enabled and the unit will end their turn.

AI will no longer try to move units that have no energy.
Energy is now considered by AI for determining how far we can walk.
Fixed an issue in AI that caused melee-attacks not being considered when the unit didn't look into the right direction.

Brutal-AI-version is now mentioned on the Menu-screen.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 20, 2022, 01:18:58 pm
Test with Brutal AI OXCE 7.8.4, but Brutal AI turned on :  1st turn "hidden movements" takes 258 seconds before it's my turn to play.
I'll get this Mod and your savegame and test for myself what makes it take so long.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 20, 2022, 02:15:46 pm
Used the new version from github, i noticed there are a bunch of dll in there, while for my test i moved them into my openxcom folder just in case they're required, are they really needed (i ask because by default there's no dll in Meridian's OXCE directory usually) ?
Yes, they are needed. Meridian uses some other way to compile in which the dll's are put into the exe-file. That also explains the difference in the size of the exe-files.

I used the same save i posted there previously :
https://openxcom.org/forum/index.php/topic,10854.msg150565.html#msg150565
(using the 40K mod + its Rosigma Expansion) standard 50x50 , there were 28 enemy units that all have flying ability and a medium sized UFO of 3 levels high
For me the map was 60x60x9 compared to the standard 50x50x4, so that's a total of 32,400 tiles instead of the standard 10,000. The height of the UFO itself isn't important, the height of the entire map is. But the catch really is that all of the enemies can fly. With walking units, the amount of potential tiles to analyze is much lower. Usually between 1 and 2 times of what the result of multiplying the x and y dimensions are.

For me it took roughly 60 seconds to resolve the 1st turn. But I have a pretty new computer, so I can see it taking 4 times longer on weaker hardware. Maybe some changes between 1.0.1 and 1.1.0 also helped speeding it up a little.

But yes, it is too slow to be bearable, even with the improvements I have made. I have to think about what else I can do to make it faster without compromising the AI too much.

Btw.: This Mod looks really impressive art-wise! Big props to it's authors.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 20, 2022, 05:11:35 pm
just tried with BrutalAI version 1.10 i still get over 250 seconds for a turn with my stress test save in 40k+Rosigma.
Though there may be difference with how the terrain is generated, as on some test it was jungle-like  that seems be be more busy with obstacles than other terrain types.
Will have to save exactly before pressing the End Turn so those tests always happen in the exact same condition (AI default spawn location, same terrain, etc..)
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Yankes on November 20, 2022, 06:42:06 pm
Why game need to check whole map? Could be better filter tiles that have no impact on final result? Some times making more operation make code lot faster if it permitting skipping other operations.
I had performance problem with light propagation, on some very big maps you can notice 1s lag when you open doors, solution was:
https://github.com/Yankes/OpenXcom/commit/e6dcfc177222517cecb89d780dc2cb78fff27699
Loot of new complex code and lot more at first glace work done, but with this code lag is barley noticeable.

This mean one solution could be process only xcom units and mark every place where any xcom units are visible, then when your process aliens you consider only places where have any visibility or at list visibility is possible. It do not matter even if half of tiles will be wrongly recognized as "have visible xcom unit" if you process only 10% of current tiles. This is still 10x speed up.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 20, 2022, 08:10:08 pm
just tried with BrutalAI version 1.10 i still get over 250 seconds for a turn with my stress test save in 40k+Rosigma.
Though there may be difference with how the terrain is generated, as on some test it was jungle-like  that seems be be more busy with obstacles than other terrain types.
Will have to save exactly before pressing the End Turn so those tests always happen in the exact same condition (AI default spawn location, same terrain, etc..)
Yeah, I wasn't really expecting an improvement in this regard in 1.1.0 over 1.0.1.

I've now looked into some pruning and in my test-save got from 58 seconds to 24. Not an order of magnitude but about 60% reducting isn't bad either.
The units in the mod also have a lot of TUs. So they can still reach almost 7000 different tiles. I also figured out what takes how long.

Trying to attack stuff and the calculations for move-order-manipulation: 5 seconds (total for all units)
Pathfinding: 3 seconds (total for all units)
The remaining 50 seconds was analysis of the tiles where to go to. So we are actually looking of an improvement of 50 to 16 seconds for that part.

Behavior is impacted minimally as many of the options looked at before would get a bad score anyways. I have seen a few scenarios though where it does act differently from before.

I'll look at Yankes' example of whether there is some inspiration for what I can use. Theorethically what I need could even be similar to what he did.

Edit: I actually tried to play this mission. It is insanely hard. The enemies only die with 3 or 4 of my people focus firing them for several turns. I killed 2 opponents in total during my attempt. :o
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 20, 2022, 08:37:09 pm
This mean one solution could be process only xcom units and mark every place where any xcom units are visible, then when your process aliens you consider only places where have any visibility or at list visibility is possible.
Is the "visibility is possible" check faster than _save->getTileEngine()->calculateLineVoxel()?
I want to find Positions from where I could attack a target, regardless of my own vision-range.
_save->getTileEngine()->canTargetUnit() was too slow for me since it tries all sorts of voxels within the target-tile. For simplification I only looked form tile-center to tile-center, which already was a great improvement.

If I could get a similar result to what calculateLineVoxel does faster, that would be very helpful.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Yankes on November 21, 2022, 02:15:15 am
Check if tile is visible first, is not exactly same but lot of cheaper to do. There is multiple places where you could cut corners in algorithm to skip majority of tiles in check (like check tiles that have closet path to your alien, have max range cut off from human, etc).
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 21, 2022, 02:16:56 pm
Check if tile is visible first, is not exactly same but lot of cheaper to do. There is multiple places where you could cut corners in algorithm to skip majority of tiles in check (like check tiles that have closet path to your alien, have max range cut off from human, etc).
Isn't the visible-check only for what X-Com currently sees? I thought about that but there's two issues:
I wouldn't be able to find tiles that have Line-of-sight but are outside of visible range and I wouldn't be able to find tiles that they are not looking at. (Have turned their back to)
I'd need something like: "What would they see if they had infinite vision range and would look at all directions?" But something like that should be possible to create and then put into a buffer. It would then be the same for every alien. And I could exclude all tiles that are not in that from checking. But I guess on maps with very little obstacles it wouldn't make much of a difference. Maybe if I don't just use it as a filter but instead of what I use now. I'd just need to figure out a way to avoid aliens to place themselves in ways that increases the chance of shooting into each other's back.

The change I made to get from 50 to 16 seconds was to only consider what is in range to walk to, which is kinda similar to what vanilla-AI does in findFirePoint. The difference is only that if I can't find a fire-point I now simply walk closer instead and hope I'll find one in the next turn. This of course means It'll never walk into a building from where it would have a line of fire too, if it is the other way. But it likely wouldn't have done so anyways because that would have gotten a lower score unless in very specific constructed scenarios.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 24, 2022, 12:31:09 am
Here's a new version:

https://github.com/Xilmi/OpenXcom/releases/tag/v_1_1_1

Not much has changed actually. But turn times should be better. (Roughly 40% of before)
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 24, 2022, 05:40:28 pm
1.1.2 is availble:

https://github.com/Xilmi/OpenXcom/releases

It fixes an endless loop when playing with regular-AI without traceAI enabled. (Incorrect nesting of conditions)

Also as a reminder:

Please make sure to actually enable it to avoid disappointment for not making any difference! :D

It will now be also enabled by default if you don't have an options.cfg where it is disabled already.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 24, 2022, 08:24:14 pm
I think my previous save was bad in fact, because i did it before reaching the landed UFO, meaning the map would never be generated the same once you intercepted the UFO, and maps can get generated more or less complicated and so influencing the AI turn time.

So this time , always using the same landed UFO, i made the save from BEFORE you click on next turn, so with a same basis it makes it easier to check the difference of impact between Brutal AI versions.

I attached the 2 saves (each save use a different map but still the same landed UFO)

SAVE : testBrutalAIv6
BrutalAI 1.1.2 disabled : 20 seconds (tested with traceAI on true)
BrutalAI 1.1.2 enabled : 53 seconds (tested with traceAI on true)

SAVE : testBrutalAIv7
BrutalAI 1.1.2 disabled : 23 seconds (tested with traceAI on true)
BrutalAI 1.1.2 enabled : 59 seconds (tested with traceAI on true)

That's quite an impressive improvement in comparison to my previous tests (that was at +/- 250 seconds !) , congratulation on that great optimisation !
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 24, 2022, 09:55:19 pm
Would you say it is playable like that?

Another question: As I said, I tried and failed to beat this mission. Is this mission supposed to be winnable with your squad or is it something you normally wouldn't have done either?

I got other missions from your original save-game that were way, way easier. With enemies that would die in one hit and only a handful of them. Not almost 30 super-tanky enemies.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 25, 2022, 01:31:05 am
If it can still go down in time, the better but it is playable that way.
The 1st turn is always the longest, as from the 2nd turn there are some units that have been killed already, lowering the turn time.

This is a very difficult mission in normal condition : you're outnumbered and outgunned and enemies are flyiers so they can see your troops mostly everywhere and flyiers usually have higher dodge capacity so you will mostly miss a lot of your shots while they will not. Some enemies have also access to some shielding that your units don't.
But the feeling of enemies being near bullet proof while your troops die super fast comes from the level of difficulty:

Something to note is that 40K (and Rosigma) replace the original game difficulty selection by factions (so you can play with Space Marines, Sister of Battle, Inquisition, Imperial Guards, Arbites, etc... that have their own troops, facilities, weapons and vehicles, it's a very cool way to add a lot to the replay value)
And then the mod will assign a level of difficulty to your current game somewhere in the ruleset.
By example i am playing with the Space Marine faction, and in the ruleset it is forced to use the difficulty that is equal to Veteran in the normal game (that's the 3rd difficulty level, so if you're not an expert in the game mechanics, that's indeed very hard)

Additionally there's a sniper/spotter functionality that is described there and is running in 40k+Rosigma :
https://openxcom.org/forum/index.php/topic,5679.0.html
that basically make sure the AI has some kind of maphack so it can shoot at you from beyond your view (this functionality is not used in default OXCE UFO and TFTD, it's for modder and nearly every mod use it and i guess with BrutalAI enabled it must probably make it hell for the player).

But for that 40k+Rosigma mod, there's a way to lessen the difficulty by using a minimod so you can lower or increase (there are some masochists i guess :D) the difficulty if it's too hard or too easy for you:
https://openxcom.org/forum/index.php/topic,10802.0.html

On lower difficulty you'll notice the enemy is much less bullet proof and will die as much as your units die, it actually feel more balanced.
To me it's much more enjoyable by slightly lowering the difficulty that way, but to each their own. By example that hard mission is winnable on a lower difficulty (i did) .

There are some more minimods i posted in the 40K board to remove some features (the removal of that RNG dodging, the removal of those enemy transforming into new enemies on death that transform again into another enemy on death...) and can help to bring down the difficulty of the mod if it's still too hard.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on November 25, 2022, 02:08:17 am
"But the feeling of enemies being near bullet proof while your troops die super fast"
I didn't have the impression that my troops die super fast. Infact they also seemed quite tanky. But the sheer numerical advantage of the enemy eventually overpowered them.

"Additionally there's a sniper/spotter functionality that is described there and is running in 40k+Rosigma :
https://openxcom.org/forum/index.php/topic,5679.0.html
that basically make sure the AI has some kind of maphack so it can shoot at you from beyond your view (this functionality is not used in default OXCE UFO and TFTD, it's for modder and nearly every mod use it and i guess with BrutalAI enabled it must probably make it hell for the player)."
That part actually doesn't work like that with BrutalAI enabled. Or let me put it that way: Brutal AI has it's own sniper/spotter-mechanic that is actually more fair.

Normal Sniper-Spotter mechanic uses a flag called "TurnsLeftSpottedForSnipers" tied to the unit. The unit can get revealed like that by attacking itself or being spotted. The problem with that is that it will stick to the unit for several turns, regardless of where it goes in the meantime.
I introduced a new flag that only gets triggered by actual visual contact and only remains for the rest of the turn.
However, every unit can now target the revealed unit for the remainder of the turn.

With high sight-radius, high TUs, few obstacles on the map and sniper/spotter enabled the behavior of the normal AI actually will not differ that much from that of Brutal-AI.
The main difference is that they are pathfinding over several turns and can walk all the way from the command room of a battleship to a position from where they can camp the skyranger-exit.
Also if there is a line of fire within their within their movement-radius towards a unit that is currently spotted, they will find it and go there, regardless of how far the unit is. So they will not only snipe well if they are already in position but also if they have to move to get to position. And that's actually the part that makes it slow. That they analyze every reachable tile for whether they can get a line of fire (before it was every tile).
The third big difference is that they can issue a wait-command to wait for other units to act first. This makes sniper+spotter way more efficient because the Spotter doesn't wase their time-units on killing the target he just spotted. He leaves that to the snipers in the background and will only attack himself if all snipers failed (or there are none). This means he can move in further and reveal even more targets.
That's basically how my AI counters smoke grenades. The Spotter doesn't get "depleted" by my own spotter for killing him and then being stranded. He spots, has someone else kill my spotter and then continues to walk forward and reveal more targets. This required a rewrite of big parts of the AI-turn-processing logic as "waiting and then continuing" wasn't supported at all.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on November 25, 2022, 02:17:59 am
in that mission your troops have terminator armor, that's  very strong as an armor. But before reaching that point (a soldier needs to get 30kills to be able to wear such armor, and then you need to manufacture the armor as it can't be purchased) your troops die very fast in the normal conditions (Rosigma lessened that fortunately by improving the armor system, but in base 40K i got lots of armored units one shotted by anything).

Great news that BrutalAI is replacing the sniper/spotter system by its own, i was a bit worried it would get things simply impossible if both were running at the same time.

Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Legacy on November 26, 2022, 01:44:20 am
I think it would be neat to have a random chance that the AI uses new tactics, old tactics, sneaky tactics, etc. just to mix up battle even more
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 01, 2022, 10:08:15 pm
There's now a new version that also adds an option to make UFOs in air-to-air-combat more intelligent.
Given how one-dimensional the air-to-air-combat is, having the UFOs make the best possible decision there is probably not really a desirable feature so it's not enabled by default.
https://github.com/Xilmi/OpenXcom/releases
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 02, 2022, 11:37:31 pm
https://github.com/Xilmi/OpenXcom/releases

There's now an option to play without AI-cheating and another parameter to modify their targeting-behavior.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on December 03, 2022, 02:30:55 pm
Being able to adjust the AI to your needs is truly great ! Thank you for implementing those options.
A question : OXCE features a quick battle mode to quickly setup a battle, as i don't know how the AI is coded, will the brutal AI works on this game mode or is it only for the campaign battlescape ?
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 04, 2022, 08:05:17 pm
Yes, it does work in the quick-battles. That's how I primarily test it.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 06, 2022, 09:21:07 pm
1.4.0 available:

https://github.com/Xilmi/OpenXcom/releases

In Non-omniscient-mode visiting or seeing a tile that an enemy unit was suspected to be at will now make the AI realize that the enemy is not there and it will keep searching.

Lowered the prerequisite of pre-priming grenades. That will happen much more frequently now.

Completely new hide&peak default-behaviour that is much more about safety and getting the first-strike. AI will avoid open territory but still seek for spots to perform this behaviour on.
However, there is a morale-based "flipswitch" that turns the AI back into sweeping-mode, where it chase down enemy-units.

This sweeping-mode can be enforced by mods to always be active by enabling the unit's Leeroy-flag.

The AI switching between two modes of operation based on morale creates more dynamic and immersive gameplay than sticking to one behaviour would have.

Fixed that clearsight and quicklineoffire-functions did not consider terrain-elavation which could cause units falsely thinking they are hidden when standing on a hill, as they are common on desert and forrest maps.

Fixed a crash that could happen at the end of a mission and was introduced by one of the previous versions.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Juku121 on December 06, 2022, 10:07:11 pm
Completely new hide&peak default-behaviour...
Does this interact with sneaky AI in any way? Is the sneaky AI used for brutal AI?

This sweeping-mode can be enforced by mods to always be active by enabling the unit's Leeroy-flag.
Do leeroys with ranged weapons still charge into melee? Would make this option kinda useless.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Rangerh on December 07, 2022, 01:04:12 am
Gave a test with the v7 of my save (https://openxcom.org/forum/index.php/topic,10854.msg150919.html#msg150919) from the previous page of this thread and noticed it the loading time for the 1st AI turn is roughly the same as on that previous Brutal AI .
I decided to play out this battle to the end this time to see the AI behaviour and grouping attack
First as expected the turn time go lower as AI enemies are dying.

But in term of strategy while with the default AI the mission is still winnable, with BrutalAI that mission is pure impossible to win hell :D

I liked a lot the AI deciding to attack in group (and that's also make it insanely hard in this mission considering the very high number of AI troops) :D with them outnumbered me by far it was really good strategy for the enemy to attack in group like that, as there's nowhere near the firepower to contain such a full scale assault before the enemies weapon tear your troops down .

(https://i.imgur.com/ehhOvSv.jpg)

I observed some of those flying enemies really liked to fly very high (i don't think the default AI fly that high) and drop the various type of grenades they were carrying. It's a funny equivalent to a bombing run with airplanes , though not much funny for my poor troops, fortunately with their good armor they managed to survive for a while that insanity.

(https://i.imgur.com/tIfiULI.jpg)

I wish i had the better troops and weaponry from my current run with that mod, but even with those older weaponry it was very fun to fight what went from a hard battle in default AI into an impossible one with Brutal AI.

So as a conclusion, it's frankly great and defintively give the feeling the AI is actually attacking and move in squad now, but i guess it also mean some mods will have to tone down on the enemy number now (as those mods increased enemy numbers were to increase difficulty) but now it's unchained defeat masochism and pain :D
Will have to play without mods next time to enjoy fully how the battles go witha a bit less enemies.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 08, 2022, 08:03:59 pm
https://github.com/Xilmi/OpenXcom/releases

Fixed some issues with regards to fleeing and non-cheating AI not working properly.

Being aware of a valid target will now also trigger switching into the sweeping-mode.

Renamed and changed the "Dogfight AI" to "Enhanced dogfight behaviour".
It no longer impacts UFOs retreat-behaviour and makes your buttons disappear. It only makes sure that faster UFOs get into firing-range once they are being fired at.

With brutal AI enabled successfully concluding a mission against a landed UFO will now have the same chance to trigger retaliation as shooting down an UFO.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 08, 2022, 08:11:32 pm
Does this interact with sneaky AI in any way? Is the sneaky AI used for brutal AI?
Do leeroys with ranged weapons still charge into melee? Would make this option kinda useless.
Sneaky-AI impacts path-finding but not decision-making itself. Sneaky-AI might actually harm the intended behaviour of brutal-AI in cases where brutal AI determined it can go somewhere and then shoot. And sneaky-AI taking a longer path leading that plan to fail. So I recommend against combining them. Theorethically there could also be scenarios where it's the better choice. Overall it won't matter too much.

No, the leeroy is interpreted differently with enabled Brutal-AI. It just switches them into the mode where they will expend all their TUs to get closer to a target they can't already attack. There's still an interrupt when they get vision of something and they would then try target-selection again. So no melee-range for ranged-units with it.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 08, 2022, 08:25:18 pm
So as a conclusion, it's frankly great and defintively give the feeling the AI is actually attacking and move in squad now, but i guess it also mean some mods will have to tone down on the enemy number now (as those mods increased enemy numbers were to increase difficulty) but now it's unchained defeat masochism and pain :D
Will have to play without mods next time to enjoy fully how the battles go witha a bit less enemies.
Thanks for the positive feedback! :)
Yes, I have made pretty much the same observation with several mods I tried. Mods compensate inaptitude of base-AI with greater numbers/better stats. So having both at once will very often be overkill.

Note there's now some ways to customize the Brutal-AI:

You can make it stop cheating completely. Without cheating you can at least sneak up on them and they have to find you first. Of course it won't make a difference on extremely open maps with many enemies.

Then there's also 4 different 4 modes. Mode 1 means they can't attack things they don't see themselves. Mode 2 means they can't retaliate against units they can't see but know are there. Mode 3 is the default, which I think is reasonably smart. Mode 4, is even harder. They don't need to scout at all and can shoot all over the map. :D

"YES/NO/1" would maybe be a compromise that's much closer to base-behaviour but still smarter.
"YES/NO/3" is the best that I still consider fair. Unless people are save-scumming. Then "YES/YES/3" is more fair, as it kinda emulates save-scumming from the enemies.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 14, 2022, 02:17:58 pm
https://github.com/Xilmi/OpenXcom/releases

This version changes how "Aggressive retaliation" works:

With aggressive-retaliation enabled UFOs searching for a base will now search around the base in a radius of roughly 2670 km from it's actual location. This means you can't hide the base in locations like crete or turkey where there's either no mission-zones at all or the mission-zone there doesn't belong to the right region.

Fixed broken movement-logic that occured when using Targeting-Mode 1 or 4. (It was broken in different ways)
It now takes a bigger morale-advantage before the AI will go into sweeping mode, making it slightly less aggressive and more campy.
Fixed an issue where camping aliens wouldn't look towards the intended direction under certain circumstances.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Anon011 on December 15, 2022, 08:30:38 pm
Wow great work, this is probably the most revolutionary mod ive seen for OXCE in a long long time.
I really enjoyed playing various megamods with the Brutal AI.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: CaptainVietnam on December 15, 2022, 11:54:26 pm
would this overwrite mods that have sniper spotter? Example If I play a mod that uses sniper/spotter along with this mod will the still be snipers follow these new rules of this mod or would they stick to their original roles.

Love the fact that you made this optional so we can tweak it the way we like.

 
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 19, 2022, 01:17:57 am
would this overwrite mods that have sniper spotter?
Yes. With Brutal-AI every unit can be both a sniper and a spotter. I didn't like the cheaty-nature of how the normal sniper-spotter logic worked where the AI-units can still shoot you intelligence turns after your unit was spotted. So I wrote my own tracking that runs in parallel and needs current information.

Wow great work, this is probably the most revolutionary mod ive seen for OXCE in a long long time.
I really enjoyed playing various megamods with the Brutal AI.
Thanks! Let me know how it's going or ideally share some footage! :D
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Anon011 on December 19, 2022, 11:30:10 pm
Thanks! Let me know how it's going or ideally share some footage! :D
Sure ill try to whip something up next week.
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
I dont know if thats even possible, just asking out of curiosity.

Btw its seriously astonishing how you made this within a month of learning about openxcom  ;D
Thats some real talent
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: anonynamja on December 22, 2022, 08:54:45 am
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
This is a great idea. Maybe something like a berserker type profile for reapers and zombies that leeroy charge towards enemies without regard for danger, versus an assassin type profile for lids and other close combat fighters that take cover while closing the distance
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 22, 2022, 10:14:29 pm
https://github.com/Xilmi/OpenXcom/releases This took a while. I rewrote almost all of the movement-logic and then spend some days on making it not only more readable but also actually perform at least as good as before.
I think the playing-strength is better in most scenarios now or I need to adapt better to their playstyle. They are now particularly good at punishing indecisiveness.

Please report if you see the AI make big tactical blunders. Especially ones that it didn't make before.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 22, 2022, 10:51:29 pm
Sure ill try to whip something up next week.
Btw do you have any plans for different versions of brutal AI for different units?
Sectoids having different AI from Reapers or Mutons for example?
I dont know if thats even possible, just asking out of curiosity.

Btw its seriously astonishing how you made this within a month of learning about openxcom  ;D
Thats some real talent
While different units don't have different AI, the AI will treat different units differently. Granted their differences warrant a noticable difference in potential play-style.

I can tell what the differences are:

The "standard"-behaviour is for aliens that can move by walking and that have a ranged-attack. Since there's no noticable difference between a sectoid and a muton here, they basically behave the same.

Then there's the melee-case. This is obviously used by aliens that only have melee attacks but also by Cyberdisks and aliens that at some point primed their grenade before having an opportunity to throw it. Once they have thrown it, they will go back to the standard-behaviour. Melee units are more reckless and try to get in your face instead of hiding. The reason is that they need to be decisive in order to achieve something. Cyberdisks obviously will still use their ranged-attack whenever they have the opportunity. The difference in behaviour is when they can't.

Flying units, while using the standard-behaviour for the most part, are very well aware of the utility of being able to fly, especially that this means they can not become target of grenades and attack from unusual angles. So they behave noticably different.

Aliens with a blaster-launcher also have a different behaviour. Unlike the standard-aliens they will generally not try to get too close. I think their behaviour is the most likely to have more room for improvement. But since they are bot rare and devastating it's hard to experiment with them in normal settings. I'd have to make a mod or so to see how they act in isolation. A potential way to improve them is to probably treat them more like mind-controlled units in the sense that they rather blow themselves up with the enemy instead of doing nothing. Doing nothing while cornered as a blaster-user usually means you'll die anyways or worse get captured and interrogated. So they probably should be more trigger-happy.

Well, thanks again for the compliment. I've picked up the hobby of writing AI for games in 2014 or so. I'd say the practice and experience gained in that time helped a lot in getting more confident and skilled in doing so for new games. I've usually done it for 4x-games. So compared to those X-Com is a project of smaller scope. But then again it's tactical layer has a lot more depth than that of games where you fight on a 2-dimensional 9x9 grid. In small-scale tactical-scenarios it's much easier to simulate the outcome of different actions. In X-Com-battlescape that would be way too computation-heavy so I had to find some work-arounds to do things that I otherwise would want to simulate. AI work is also very 80:20-rule heavy. Usually you can do a lot of significant improvement in very little time but then there's a lot of diminishing returns in the time-invested:observable-difference-ratio.

The effort for 2.0 in hindsight feels barely worth it.

What people call "talent" usually comes down to someone having become passionate about what they are doing. Being passionate about something is what leads to intrinsic motivation and with intrinsic motivation everyone can grow beyond themselves.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 22, 2022, 11:13:28 pm
This is a great idea. Maybe something like a berserker type profile for reapers and zombies that leeroy charge towards enemies without regard for danger, versus an assassin type profile for lids and other close combat fighters that take cover while closing the distance
I temporarily was at a point where melees would also take cover unless they were sure to get to their target. And while it worked well for Crysalids due to their massive amount of time-units, it usually was not working too well for reapers. I didn't really think about making a distinction here. The other point is that crysalids just have such awesome stats that they are absolutely terrifying with either behaviour.
Also note that my AI is about cooperation between units and units can wait for other units to act. That makes melee-units behaving differently than ranged-units really potent. The melee-units scout and the ranged-units can then snipe away at what was scouted.

I'd rather have a trait based on which I could determine which behaviour to employ under what circumstance. Reapers are just horrible. Their 2x2 size makes them easier targets and prevents them from accessing many hiding spots in the first place. So they don't really have a choice than playing scouts and distractions for the floaters. Crysalids could very well be more sneaky and be even more terrifying that way. For zombies it's hard to say. They could hide well but lack the speed to pounce. Beelining for the enemy seems reasonable for them.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 23, 2022, 07:12:40 pm
2.0.1 available with a bunch of smaller fixes mostly to melee-units.

https://github.com/Xilmi/OpenXcom/releases

Fixed melee units looking in the wrong direction after moving.
Blaster-users are more likely to use their weapon even if it might mean to kill themselves.
Only units on the same level are taken into account for making sure units keep their distance from each other to avoid inviting AoE-attacks. This leads to faster initial deployment for aliens to get where they want to be on the map.
Fixed an issue with melee-units not attacking in some circumstances.
The geoscape-option "enhanced dogfighting-behaviour" is now enabled by default.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 27, 2022, 10:44:11 pm
Note that I have now created a new thread here:

https://openxcom.org/forum/index.php/topic,10967.0.html

As I consider the bulk of the work on this done.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: psavola on November 28, 2023, 01:53:36 pm
To make the BAI more accessible and easily usable in various environments without a need to compile it yourself, I wonder if it would be possible to build the binaries on a regular basis on some build farm (Like Win32, Win64, and Bionic like with OXCE at https://lxnt.wtf/oxem/#/Extended - initially there were, but they have since then been abandoned at https://lxnt.wtf/oxem/#/ExtendedTests). Or have I missed anything and is it already available somewhere (I'm interested in binaries usable in Linux in particular.)
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Xilmi on December 17, 2023, 01:57:30 pm
To make the BAI more accessible and easily usable in various environments without a need to compile it yourself, I wonder if it would be possible to build the binaries on a regular basis on some build farm (Like Win32, Win64, and Bionic like with OXCE at https://lxnt.wtf/oxem/#/Extended - initially there were, but they have since then been abandoned at https://lxnt.wtf/oxem/#/ExtendedTests). Or have I missed anything and is it already available somewhere (I'm interested in binaries usable in Linux in particular.)
Yes, this is something I'd very much like to have. I would really appreciate if someone could help me get this working.
I vaguely remember that back then there was an issue with how I used GitHub. Like it would work once and then whatever I did messed it up and building again required me a lot of manual work. So it's only been built twice or so.

For my other project someone made me this:

https://github.com/Xilmi/Rotp-Fusion/actions/workflows/release.yml

Here I can just click on "Run Workflow" and it compiles directly on the GitHub-Server.
Title: Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
Post by: Juku121 on December 17, 2023, 02:39:13 pm
Congrats on the new subforum!

You might want to make a locked+stickied thread for one or more of: general information, download/installation instructions, changelogs.

Also, the readme at Github doesn't seem to mention the AI :o, while the feature list here (in addition to being in two separate threads now, which makes it ???) does not mention the 'rejected features' nor Realistic Accuracy.



Edit: Oh, yeah, and the invasion of the bear-creatures from Alpha Centauri has also been dealt with. ;D