Fractal Softworks Forum

Starsector => Suggestions => Topic started by: huggs on November 25, 2022, 12:14:40 PM

Title: AI Frigates happily blocking friendly fire
Post by: huggs on November 25, 2022, 12:14:40 PM
While constantly firing 2x tachyons and 2x high intensity lasers and some other stuff from a paragon, my own frigates quite frequently

Also, they do this even when

There is no actual reason I can see why they would choose to position themselves the way they do.

In the example screenshot there is only a single frigate blocking the paragon fire, and the frigate is actually in range to shoot the target in this particular case.
(https://drive.google.com/file/d/1CZHElIJEkFgyKi0Xb47ehpojh4eu4_iY/view?usp=sharing)

No mods.
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 25, 2022, 12:17:14 PM
I can see the image url while editing the post, but the image does not show up when viewing the post. The image is on google drive with public access.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Alex on November 25, 2022, 12:25:03 PM
Hmm, the AI generally tries to avoid doing this, but it's not guaranteed to do so. If there's an easy simulator scenario to see this in, that would help - it's pretty hard to tell what's going on from a screenshot, unfortunately.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Gaaius on November 26, 2022, 12:56:32 AM
Get yourself an odyssey with one HIL on auto
Fight against Dominator (short range variant) so you can keep HIL on it without doing anything
Get frigattes as allies and wait
I just had the random battle mission with Odyssey and 3 lashers, ran sim against Dominator and hat it happen twice that a lasher flies into my HIL LOF
Since the HIL was auto, i didnt kill my own lasher, maybe thats why the AI thinks its okay to fly infront, if the HIL automatically turns of?
I tried to keep the HIL on the Doms shields to not kill it accidentally, but generally left enough space for the lashers
But even on a moving battlefield, the lashers should be agile enough to not get in my LOF
Title: Re: AI Frigates happily blocking friendly fire
Post by: Big Bee on November 26, 2022, 04:53:40 AM
Oh yeah I always have my destroyers get in front of my cruisers. Like noo, I don't want your 2 medium anti-shield balistics attacking the overloaded battlecruiser I want the 2 large anti-armour ballistics!!
Title: Re: AI Frigates happily blocking friendly fire
Post by: Alex on November 26, 2022, 03:44:44 PM
Hmm. It may have a harder time with broadside ships - it's not avoiding weapons so much as the overall facing of the ship - but for an Odyssey with a HIL + 3 Lashers, I'm not seeing it at all vs a sim Dominator (neither the first nor the second one).
Title: Re: AI Frigates happily blocking friendly fire
Post by: intrinsic_parity on November 26, 2022, 05:48:32 PM
I would guess it happens more in real combat than in a 1v1. When 'battle lines' form, there's not really any way for frigates to get into range in the middle of the battle line without getting in front of bigger ships with longer range, so unless they end up on the fringes/flanks of the fight, they are mostly just getting in the way.
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 27, 2022, 01:48:09 PM
Often when I see this, I have 2 LP Brawlers with 450m weapons where they hang at maybe 800-1000 meters, kind of dancing around (semi-circular movement from left to right and then back again) between my Paragon and whatever enemy I'm shooting at. Sometimes they just briefly block my fire, then circle back out (and then possibly back in again, back out, back in). Sometimes they move over to the other side of my beams. Sometimes they decide to stay right where the beams would go.

This happens when the brawlers are not dodging incoming fire. If they wanted to move into weapons range, they could go in a straight line without blocking anyone.

This happens when there are no other ships around. E.g. the space around these brawlers is not restricted by other ships. So if it's really important for them to dance around, they could easily do so just slightly to the left or right (depending on what side they're on) without blocking any fire at all.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Alex on November 27, 2022, 02:58:02 PM
Hmm, something seems off here - do you have any idea why the Brawlers wouldn't be engaging the enemy? Are they perhaps assigned to a different task, or is there an "avoid" on the enemy, or do they have timid officers in them, or ... something?
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 29, 2022, 09:55:15 PM
This should be with the Full Assault option, if that's the right name. The global assault for your entire fleet.

I have not had any timid officers, so at least I know that's not an issue. However, I am not certain if this has happened to LP Brawlers with officers only, without officers only or a mix.

I'll load up that game again and see if I can get me some fights. If I can find a fight to reproduce this, would a save game file be helpful?
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 29, 2022, 10:57:11 PM
Hi Alex,

I know you said a screenshot isn't helpful, but perhaps it says more with a whole series of screenshots. These are all from the same fight. Some images form a series of screenshots of the same brawler blocking in different positions and continually being in the way over extended duration of time. There are brawlers both with and without officers, both engaged and not engaged.

Initial orders: 2 brawlers to closest capture point, 8 brawlers to second closest. Paragon flanked by Legion on each side.
After fleets have finished approaching one another, full assault is on.
All Brawlers are LP Brawlers with the same fit.
Brawler officers are: steady, steady, aggressive, reckless.

This folder shows a series of images. The file names add some description to what's going on.
https://drive.google.com/drive/folders/1AzDNWYNvGGG80R2mvP5w68IYY71-EeFu?usp=sharing

All images of blocking Brawlers are from my first attempt.
One of the images showing initial orders is from a later attempt. I was hoping to be able to provide this as a reproducer, but unfortunately it is not that reliable. I have tried another 4 battles with only a single brawler-block happening.
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 29, 2022, 11:03:57 PM
6th attempt and I manged to get another couple of Brawler blocks. This time I selected a bunch of Brawlers and set them to attack one of the conquests closest to my Paragon to make sure I got some brawlers close by.

Possibly the repro is to make sure that some Brawlers are close enough to the Paragon line of fire to make it happen. It should be noted that during the 5 failed attempts, I didn't really have any Brawlers that close to my Paragon most of the time.
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 29, 2022, 11:08:45 PM
7th attempt - successful repro again. After initially capturing the two closest cap points, I set Brawlers to defend Paragon just to get them a bit closer. Once the two fleets have closed, I turned on Full Assault, then started to approach closest Conquest with Paragon, and then also set 6-7 Brawlers to attack the same Conquest. Sure enough, some of them would move in front of me. Sometimes while engaging it. Sometimes just moving in front of me while trying to close with it.

This attempt had fewer blocks than the first attempt. But this time the Brawlers also spent a lot of time not engaging, even with just full assault or with full assault and also having an engage order on a conquest, and still they would spend a lot of time just hanging behind my Paragon.

Save game folder: https://drive.google.com/drive/folders/1QUk0rFxJ5jChBma_byjKVNAGbTBl83ZQ?usp=sharing
The save has a pirate fleet right next to mine. This is where I did all my attempts, and also took the screenshots.
Title: Re: AI Frigates happily blocking friendly fire
Post by: SafariJohn on November 30, 2022, 06:14:59 AM
Get some free recording software like Bandicam and do videos. Videos are worth a thousand pictures or something like that.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Vanshilar on November 30, 2022, 10:42:34 AM
7th attempt - successful repro again. After initially capturing the two closest cap points, I set Brawlers to defend Paragon just to get them a bit closer. Once the two fleets have closed, I turned on Full Assault, then started to approach closest Conquest with Paragon, and then also set 6-7 Brawlers to attack the same Conquest. Sure enough, some of them would move in front of me. Sometimes while engaging it. Sometimes just moving in front of me while trying to close with it.

A swarm of LP Brawlers around a target may not be the best test case for frigates avoiding line of fire from larger ships behind them. They all have Safety Overrides which means they have to get close to the target, and with so many of them maneuvering and trying to stay close to the target yet avoiding hitting each other, they're bound to get in front of other ships from time to time. There's simply only a limited amount of space for them to move around.

Not saying that the maneuvering logic can't be improved, but this is kind of an edge case here when the frigates' available options are limited by other frigates in close proximity and constrained by the short weapon range.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Alex on November 30, 2022, 02:49:08 PM
Thank you for the savefile, I really appreciate it! It's really about the only way to be able to have a good look at an AI issue - video is better than screenshots, but very often still not enough to get a good idea.

Haven't seen the "crossing line of fire" issue yet, but I'm definitely seeing the "hanging back seemingly without a good reason" behavior - investigating!
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 30, 2022, 03:44:00 PM
Quote
Not saying that the maneuvering logic can't be improved, but this is kind of an edge case here when the frigates' available options are limited by other frigates in close proximity and constrained by the short weapon range.
No, that's really not the case. Well, it will definitely happen sometime, but it is not the issue I am talking about.

There are plenty of cases where there are no ships next to the ship that starts blocking. E.g. it may be moving to avoid incoming fire, but it could have done so away from line of fire instead of into line of fire.

I'm also taking about the case where the blocking ship is not actually firing on anything.

I'm also talking about the case where the blocking ship is blocking, and moving parallel to your line of fire, when it could instead have been off to either side by one ship width and then move parallel to your line of fire towards or away from the target.

I'm talking about the case where 1-2 ships are engaging  the same capital ship, but they place themselves to block your line of fire instead of being off to either side or behind the target.

And yes, I am also talking about the case where 6 Brawlers are actually engaging your target, and are filling up all the space around the target. So there's nowhere else for the Brawlers to go you might claim. My point is that for the 1-2 ships that are in your line of fire, never engaging in the first place, and/or disengaging and going anywhere else on the entire battle area would be an improvement, because replacing 2 Brawlers shooting at the target with 1 Paragon shooting at the target is a big improvement.
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on November 30, 2022, 03:46:25 PM
Haven't seen the "crossing line of fire" issue yet, but I'm definitely seeing the "hanging back seemingly without a good reason" behavior - investigating!
By the way, I frequently lower Paragon shields and hit X to stop shooting in order to get double ship speed until I get a bit closer than maximum range. I am not saying that the Brawlers move into position to block only when my weapons are on hold. I just mention this because perhaps the AI are sampling such information infrequently or that toggling weapon hold from time to time will mask their understanding that I am actually firing at other times.
Title: Re: AI Frigates happily blocking friendly fire
Post by: NikoTheGuyDude on December 01, 2022, 06:05:07 AM
Haven't seen the "crossing line of fire" issue yet, but I'm definitely seeing the "hanging back seemingly without a good reason" behavior - investigating!
By the way, I frequently lower Paragon shields and hit X to stop shooting in order to get double ship speed until I get a bit closer than maximum range. I am not saying that the Brawlers move into position to block only when my weapons are on hold. I just mention this because perhaps the AI are sampling such information infrequently or that toggling weapon hold from time to time will mask their understanding that I am actually firing at other times.

As a side note, the AI should really learn when to drop shields and get the 0-flux boost to get closer one of these days. I get it's probably hard as hell to hit the fine balance where they're not suicidally greedy but also not too timid, but it'd be really nice.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Alex on December 05, 2022, 11:05:46 AM
Took me a while to figure out what was happening here, but: finally did. The issue was - in broad strokes - that among other things, the AI wants to meet certain criteria in terms of how many friendly/enemy ships are in front of or behind it. In practical terms, this helps with the formation of something resembling battle lines - a sort of equilibrium where the AI on at least one side feels like it's not a great idea to get out in front of its allies.

This is what was happening here; thank you again for uploading the savefile, by the way - extremely useful! The fix is to make ships with an eliminate order - or a reckless personality - disregard this particular consideration, the same way they disregard concerns about being flanked, since it's just a different expression of the same concern. In general, it's not necessarily a bad decision to keep these ships back - even these short-range LP Brawlers; they suffer a lot of attrition if they *do* rush forward - so it feels like giving the decision to the player (via the eliminate command, and "full assault") is the right call.

(... and, still not seeing the "crossing in front of line of fire" issue. Possibly some other in-dev AI changes factoring in?)
Title: Re: AI Frigates happily blocking friendly fire
Post by: huggs on December 07, 2022, 08:04:41 AM
You're welcome. I'm glad I could help. And thank you for looking into the issue!
Title: Re: AI Frigates happily blocking friendly fire
Post by: vok3 on December 18, 2022, 10:40:09 AM
(... and, still not seeing the "crossing in front of line of fire" issue. Possibly some other in-dev AI changes factoring in?)

I don't understand how this is possible.  I see it in at least half of all the battles I fight, with pretty much the whole possible spread of tactics and officer personalities / fleet doctrines.  I've seen it with frigates assigned to escort cruisers, with frigates / destroyers set to have specific kill orders, with frigates / destroyers responding to engage or concentrate fire orders, with frigates / destroyers just flying on their own, frigates with officers, frigates without officers, frigates under full assault, frigates under no orders at all, default fleet doctrine, fleet doctrine shifted towards "aggressive", with my flagship being anything and everything from a Hammerhead to laser cruiser to a modded broadsider battleship to an Onslaught, whether I'm using ballistics or pulse energy or rocket volleys or lasers - I've seen friendly frigates fly deliberately into my lasers that I was manually firing at a target and sit there, blocking the beam, taking the damage (no I did NOT stop firing), until they blew up. 

Ok, one correction, I haven't seen it with Timid or Cautious doctrine or officers.  Because I don't use those. 

I just really wonder how you go about playing this game that results in not producing this behavior.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Helldiver on December 20, 2022, 02:46:48 AM
Same here. Any battle that involves more than half a dozen ships and ships of different sizes ends up as a circus of smaller ships blocking larger ships from firing guns, even when trying to use orders to move them aside and regardless of officers. When controlling a capital ship I spend more time waiting for my own ships to move out of the way to shoot at targets or having to try to "snipe" through gaps between them than actually doing damage. AI in control of larger ships or ballistic close support ships deals no damage for most of a battle because it just waits unable to shoot due to friendly fire risk.
Title: Re: AI Frigates happily blocking friendly fire
Post by: Not a Pirate on January 17, 2023, 12:24:53 AM
It is for this reason that I almost never buy frigates, and salvage them instead.   I find a couple of them, with near suicidal officers, set to escort my larger ship will have them realizing their expendability if they do "cross the streams" so to speak.

A strangely enjoyable part of the game...

A quick shot of Tequila and a good laugh later and the officer and I are back in the salvage rig selecting what new or different ship he or she wants and joking about launch tubes, exhausts, and things going right up 'em.

Arrrhhhhh.....Friendly fire....not just a terrestrial thing then.