Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Anubis-class Cruiser (12/20/24)

Author Topic: Make Eliminate Actually Eliminate  (Read 1532 times)

Vanshilar

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Make Eliminate Actually Eliminate
« on: March 31, 2024, 12:53:28 AM »

The "Eliminate" command is supposed to tell the ship to put all their effort into eliminating a target.

1. A ship when ordered to "Eliminate" will often instead back off, sometimes over 3000 su away, to safely vent flux, before reengaging. I can understand if this is because the ship is at high flux, say >80% flux. But I see this happening even to ships at low flux, say <30% or so (hard to tell but thereabouts), and even with no other enemy ships around (i.e. there is no risk to them dropping shields and gaining some flux while they move toward the target). Aggressive officer so it'd not a timidity issue. This is bad AI behavior, since it's not in any danger and yet is still backing away from the front lines, and backing so far away that it will take a while to get back to the front lines.

Worse still, the "Eliminate" command is often used to strike at a vulnerable and important target during a window of opportunity, or to plug a breach in the battle lines, or to rescue another ship under attack. The last thing the player wants the ship to do in any of these situations is to back off and disengage from combat, and yet that is exactly what the ship often ends up doing with the "Eliminate" command. A ship should virtually never back off under the "Eliminate" command short of high flux or under heavy attack. Instead, the ship should move forward immediately, and drop shields if needed if it's not under any pressure and flux is a concern.

2. If a ship is ordered to "Eliminate" a target, and that target is in range, the ship should be firing its weapons on the target. Not on any frigates or fighters or any other ships in the vicinity, no matter what the ship's AI thinks in terms of priority. The whole purpose of the command is to tell the ship's AI that the target is the most important one to focus on. I've seen ships, when ordered to "Eliminate" a Nova for example, fire on and chase down all the ships in the vicinity except the Nova, eventually ending up behind (i.e. above) the Nova without ever firing a shot at it and being in range the whole time. As a corollary, this also seems to happen with missiles a lot, where it'll fire its ballistic/energy weapons at a target, but send its long-range missiles toward a farther away, more "attractive" target (usually some frigate that can easily dodge those missiles). It should concentrate its fire on the ship it's ordered to target if that target is in range.

3. Related to the above, it seems like when a ship is ordered to "Eliminate" a target, it'll ignore other enemy ships in terms of preventing it from being flanked (i.e. in terms of its personal danger), and yet still consider other enemy ships in terms of whether or not to fire on them. This is backward. It should maneuver to not put itself in undue danger, and focus its firepower on the target. I don't mean a situation where the "Eliminate" target is behind other enemy ships, forcing the ship to wade into other enemy ships. I mean when there's an enemy ship on one side, and nothing on the other, it should not strafe itself into the enemy ship nor get between the other enemy ship and its target (exposing its vulnerable engines), when it can safely hit at its target by staying put or by strafing in the other direction. It seems like in sim the ship AI understands to do this, so there seems to be something that happens in fleet combat that overrides it. (Maybe it's trying to stay a certain distance away from friendly ships?)
Logged

Vanshilar

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #1 on: May 10, 2024, 03:11:57 AM »

Here's an example of "Eliminate" not working as advertised. Attached are a couple of screenshots of Conquest 4 given an Eliminate order on a Nova. That order has been active for around 10-15 seconds or so before the screenshots. Despite the Nova being the closest target, one of the Mjolnirs is hitting the Brilliant, another Mjolnir is hitting the Fulgent, and the IR Autolance is going for a Scintilla. So even though the Nova is the closest target, and even though the Conquest has an Eliminate order on it, the Conquest is busy firing at all the smaller ships around the Nova instead (nor is the Conquest trying to concentrate its fire on one target). This was in version 0.97a-RC10 but I don't think there were any AI changes between RC10 and RC11.

At this point I wonder if I should post this in the Bug forum instead. The description for "Eliminate" says "Ships given this assignment will try to attack the targeted ship regardless of the tactical situation". Backing away from combat when given the order or firing at other ships when the targeted ship is in range both go completely against the description.
Logged

Genir

  • Captain
  • ****
  • Posts: 276
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #2 on: May 10, 2024, 07:54:41 AM »

Here's an example of "Eliminate" not working as advertised. Attached are a couple of screenshots of Conquest 4 given an Eliminate order on a Nova. That order has been active for around 10-15 seconds or so before the screenshots. Despite the Nova being the closest target, one of the Mjolnirs is hitting the Brilliant, another Mjolnir is hitting the Fulgent, and the IR Autolance is going for a Scintilla. So even though the Nova is the closest target, and even though the Conquest has an Eliminate order on it, the Conquest is busy firing at all the smaller ships around the Nova instead (nor is the Conquest trying to concentrate its fire on one target). This was in version 0.97a-RC10 but I don't think there were any AI changes between RC10 and RC11.

Not focusing fire on current target is one of the known vanilla AI problems, not necessarily related to eliminate order. There was a feature-bug that allowed to force focus fire on the target: https://fractalsoftworks.com/forum/index.php?topic=28093.0 but it has been removed since.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24950
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #3 on: May 10, 2024, 09:03:01 AM »

What it's shooting at - presumably while on autofire - is a separate issue. Eliminate actually has no direct effect on autofire target selection.

As far as the backing off - if you have a reproducible scenario, most ideally a 1vs1 in the simulator - I'd love to take a look! The AI generally tries not to back off more than it needs to to vent, so if it's backing off more than what "looks" safe then one of the possibilities is an enemy ship in range having missiles that it considers threatening during a vent. The AI is capable of staying close to enemy weapon range while venting, without backing off further (at least, I tested that a while back) so if it's backing off more than that, it's seeing some reason for it. Or there's a bug; that's always an option too.

Also, it may very well back off while at 30% flux if enemy flux is lower; engaging under those circumstances can be a problem and lead to a loss, though I can also see the argument that with Eliminate on it should do so anyway, hmm.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7573
  • Harpoon Affectionado
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #4 on: May 10, 2024, 09:18:06 AM »

Could eliminate set that target as the "R" target for the ship? That would make weapons fire at it if within arc, right?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24950
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #5 on: May 10, 2024, 10:03:09 AM »

That would do it, yeah. It might also have some other consequences - which might be desirable given an Eliminate order - but I'd have to dig into it some. For example, a case like "you issue an eliminate from far away, the ship targets the Eliminate target, and now can't effectively use missiles against something that's actively engaging it and needs to be fought" - you'd have to handle this with some amount of care. Made a note to have a closer look at all this.
Logged

yajusenpai

  • Commander
  • ***
  • Posts: 120
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #6 on: May 11, 2024, 07:47:40 AM »

Make "Eliminate" increase the commanded ship aggression by at least two stage, drop everything they are doing and drop their shield ignore any other enemies and chase and focus fire on and only on the "Eliminate" target.

I had given you an order. DO it.

I think manually given order should override ship AI to make it actually useful.
you will have only yourself to blame if you issue stupid order.
Which is as it should be.
« Last Edit: May 11, 2024, 07:57:06 AM by yajusenpai »
Logged
Please do not mention High Scatter Amplifier.

Beep Boop

  • Commander
  • ***
  • Posts: 229
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #7 on: May 12, 2024, 02:22:55 AM »

I'd also settle for the GO HERE order actually GOING. Failure to actually obey GO HERE NOW orders (even the suggested "Rally Civilian" order doesn't actually work). If I order GO HERE NOW, I expect to see either that the thrust and velocity vectors immediately begin aligning with the direction I just ordered, or that somebody gets shot for not following orders.
Logged

Vanshilar

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #8 on: November 28, 2024, 05:26:10 PM »

As far as the backing off - if you have a reproducible scenario, most ideally a 1vs1 in the simulator - I'd love to take a look! The AI generally tries not to back off more than it needs to to vent, so if it's backing off more than what "looks" safe then one of the possibilities is an enemy ship in range having missiles that it considers threatening during a vent. The AI is capable of staying close to enemy weapon range while venting, without backing off further (at least, I tested that a while back) so if it's backing off more than that, it's seeing some reason for it. Or there's a bug; that's always an option too.

Sorry for the necro, it took a while for me to look at what's happening (multiple times!) to get a sense of under what conditions will this happen.

It happens even when the ship is at zero flux. I don't know how the AI works that well, but it seems like it switches from "move toward target" when it's really far away to "maneuver around target" at around 2000-2500 su away from the target. At this time, sometimes it'll decide to flank the target instead of heading straight in, and sometimes it'll decide to back off. The problem is that the AI will do this even if it's supposed to "Eliminate" the target, even if it's at zero flux, even if the target only has short-ranged weapons, even if there are no other enemy ships/missiles/fighters nearby, even if there's already a friendly ship in front engaging the target, and even if the target is moving away. So the effect is that the ship is advancing toward the target, then suddenly back off at around 2000 su away, then head back toward the target once it's around 3000 su or so away. If the target was moving away, then this means that it'll take a *really* long time for the ship to eventually catch up to the target, especially if the target was a frigate.

It's not all the time so it's hard to set up a reproducible scenario, but it happens fairly frequently when I set a frigate to chase another frigate, such as when trying to capture objectives, or when an enemy ship is heading toward an objective and I then send a frigate after it.

This also happens with the "Capture" command, where if you send your ship to capture an objective, but an enemy ship is also heading there, sometimes your ship might back off even if it's able to overpower the enemy ship, letting the enemy ship capture it. That sort of defeats the purpose of the "Capture" command if the AI is going to yield to an enemy ship that it can easily defeat.

Here is an example where both ships are ordered to "Eliminate" an enemy frigate but decide to back off at first instead before engaging. The Scarab has an Aggressive officer and the LP Brawler doesn't have an officer but the fleet doctrine is set to Aggressive (level 3 out of 5 on the Aggression setting). At the end of the video, just before the Scarab kills the enemy Glimmer, you can see the LP Brawler backing off a second time:



In the sim, I can get this to happen in several ways. For example, take a bunch (say, 5-10) LP Brawlers and spread them out in a line. Have them start moving, say to the left (so that they're at different distances; this seems to happen at that particular distance). Then spawn in an enemy frigate, and order them to "Eliminate" the frigate. Quite often, at least one of them will decide to flank (move perpendicular to) or back away from the enemy frigate, despite being at zero flux and being far away.

That would do it, yeah. It might also have some other consequences - which might be desirable given an Eliminate order - but I'd have to dig into it some. For example, a case like "you issue an eliminate from far away, the ship targets the Eliminate target, and now can't effectively use missiles against something that's actively engaging it and needs to be fought" - you'd have to handle this with some amount of care. Made a note to have a closer look at all this.

Making the ship select the target (i.e. "R") seems like it should work out, at least at first glance. If the target is out of range, autofire will automatically fire at any other ships in range. If the target is in range, then the player is wanting the ship to fire at the target ship regardless of if other enemy ships are in range; it's up to the player to use the "Eliminate" command correctly, otherwise there's still the "Engage" command if the player just wants the ship to "sort of" go after the target.

I'd also settle for the GO HERE order actually GOING. Failure to actually obey GO HERE NOW orders (even the suggested "Rally Civilian" order doesn't actually work). If I order GO HERE NOW, I expect to see either that the thrust and velocity vectors immediately begin aligning with the direction I just ordered, or that somebody gets shot for not following orders.

Yeah I would offhandedly say around 2/3 of the AI issues revolve around moving to the right place. It's something that humans are good at intuiting, but machines are bad at. I remember reading somewhere along the line that around 1/3 of the development issues with Starcraft had to do with the pathing algorithm. So I know it's a hard problem. Even so, it would be nice if there were a command that's simply "go here and I mean it". "Rally Civilian" sort of works, but I've sees plenty of examples where (like above) the ship will sometimes back away even at low flux instead of advancing toward the point.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24950
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #9 on: November 28, 2024, 06:58:06 PM »

It happens even when the ship is at zero flux. I don't know how the AI works that well, but it seems like it switches from "move toward target" when it's really far away to "maneuver around target" at around 2000-2500 su away from the target. At this time, sometimes it'll decide to flank the target instead of heading straight in, and sometimes it'll decide to back off.

Just a real quick response - I'm not seeing it in my patch notes, but I want to say that I fixed a similar issue a few months ago in-dev. At least, I remember seeing it and digging into it; I don't remember exactly what the cause was, though.
Logged

BigBrainEnergy

  • Admiral
  • *****
  • Posts: 763
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #10 on: November 29, 2024, 02:47:18 AM »

Does the AI behave differently near capture points? I see this a lot more often around capture points, but that could just be because I'm paying more attention when a point is contested.
Logged
TL;DR deez nuts

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24950
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #11 on: November 29, 2024, 09:40:09 AM »

Hmm, not unless it's a ship that's trying to actually capture it, so it's probably due to paying more attention? But maybe there was a bug related to that; I really just don't remember *what* exactly I fixed, just remember fixing something related.
Logged

eert5rty7u8i9i7u6yrewqdef

  • Admiral
  • *****
  • Posts: 547
    • View Profile
Re: Make Eliminate Actually Eliminate
« Reply #12 on: December 03, 2024, 01:12:58 PM »

It happens even when the ship is at zero flux. I don't know how the AI works that well, but it seems like it switches from "move toward target" when it's really far away to "maneuver around target" at around 2000-2500 su away from the target. At this time, sometimes it'll decide to flank the target instead of heading straight in, and sometimes it'll decide to back off.

Just a real quick response - I'm not seeing it in my patch notes, but I want to say that I fixed a similar issue a few months ago in-dev. At least, I remember seeing it and digging into it; I don't remember exactly what the cause was, though.
Using capture or waypoint orders causes ships to try to avoid and go around enemy ships that are along the way, which tends to be an issue when the enemy ship is on top of the point in question. Is it the case where eliminate is setting a temporary movement waypoint and the ship is trying to "go around" the enemy ship that is the waypoint in question?
Logged