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.Yeah, for sure, I'll be releasing more footage. I think that's better than any textual description.
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.
...
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.
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.
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.
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.
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?
Then pressed End Turn and the AI turn got stuck again during the "hidden movement" that never seemed to resolveWell, the question is: Does it never resolve or is it just really, really slow.
[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
- the game isn't stuck, it in fact just take a long time to process a single AI moveYeah, 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.
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.Wait, does this happen automatically, as soon as they accept the PR?
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.
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 :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.
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
just tried with BrutalAI version 1.10 i still get over 250 seconds for a turn with my stress test save in 40k+Rosigma.Yeah, I wasn't really expecting an improvement in this regard in 1.1.0 over 1.0.1.
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..)
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()?
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:
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.
Does this interact with sneaky AI in any way? Is the sneaky AI used for brutal AI?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.
Do leeroys with ranged weapons still charge into melee? Would make this option kinda useless.
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 :DThanks for the positive feedback! :)
Will have to play without mods next time to enjoy fully how the battles go witha a bit less enemies.
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.Thanks! Let me know how it's going or ideally share some footage! :D
I really enjoyed playing various megamods with the Brutal AI.
Thanks! Let me know how it's going or ideally share some footage! :DSure ill try to whip something up next week.
Btw do you have any plans for different versions of brutal AI for different units?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
Sectoids having different AI from Reapers or Mutons for example?
Sure ill try to whip something up next week.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.
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
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 distanceI 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.
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.