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); In-development patch notes for Starsector 0.98a (2/8/25)

Author Topic: What's going on here (AI combat tactics)  (Read 665 times)

vorpal+5

  • Captain
  • ****
  • Posts: 286
    • View Profile
What's going on here (AI combat tactics)
« on: February 10, 2024, 11:11:23 PM »

I don't understand how the combat AI is supposed to work. I'm in a difficult spot with my Scythe here; for the third time in a row, I'm left alone in this combat, fending for myself, while my AI-piloted ships are basically doing nothing, keeping their distance. Their vectors indicate either nothing or maintaining distance from the enemy remnant ship. They are both piloted by aggressive commanders, and I manually asked them to engage the Remnant ship, yet they don't lend a hand and do nothing. Something is wrong. I guess that switching them to "Eliminate" will do the trick, but there is room for improvement here, unless there is a basic aspect I'm missing.

More generally, it feels like AIs don't factor in helping other ships in difficult spots.

« Last Edit: February 10, 2024, 11:12:58 PM by vorpal+5 »
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7787
  • Harpoon Affectionado
    • View Profile
Re: What's going on here (AI combat tactics)
« Reply #1 on: February 10, 2024, 11:58:22 PM »

It's hard to tell what's going on from this picture tbh. I can see your ally on the right is swinging around to the right - possibly trying to flank? No idea. I don't know what the bottom left ship is doing from the engine trail.

In this case either an eliminate, escort, or rally/defend command behind the enemy would get them moving in the right direction. "Engage" is a very very soft command unfortunately - it's essentially "Hey fight in this general area if you have absolutely nothing else going on".

The AI often won't close in if it thinks its outmatched, but I would expect flux free ships to engage. Are there other remnants behind the two you have pictured? Or elsewhere around? I don't know either of your mod ships, but it kind of looks like both are outranged by the remnants, possibly outsped (I don't know), and I also don't know how nasty that modded remnant is.
Logged

vorpal+5

  • Captain
  • ****
  • Posts: 286
    • View Profile
Re: What's going on here (AI combat tactics)
« Reply #2 on: February 11, 2024, 12:36:08 AM »

I thought that Engage (is it not in the tooltip?) was as in "Engage with purpose and force" and not too soft. i.e. the step before eliminate.

You are right on some suppositions though. Although these remnants are not too dangerous, they have good range on beam and move fast, but the Marauder you see on the right can handle 1 without issue and almost 2. There is also another Remnant not displayed, up north, so perhaps it explains the shyness.

I did not even think to use Escort on my ship, so they came to my rescue, given how Escort behave, and the general (poor) appreciation of the order from many players. A pity.
« Last Edit: February 11, 2024, 12:40:59 AM by vorpal+5 »
Logged

Vanshilar

  • Admiral
  • *****
  • Posts: 766
    • View Profile
Re: What's going on here (AI combat tactics)
« Reply #3 on: February 11, 2024, 05:38:46 AM »

I don't understand how the combat AI is supposed to work.

Welcome to the club.

More generally, it feels like AIs don't factor in helping other ships in difficult spots.

As far as I'm aware, each ship AI explicitly only considers themselves and have no sense of what other friendly ships are doing from a strategic or tactical level. They don't even really have a sense of how to move around each other (you will often see a frontline ship at full flux trying to back off, while a backline ship behind it trying to move forward, and so the two of them will just kind of stay there, unable to move around each other). So yes, even if you the player knows that the ship can safely move forward because there's another ship that's in front of it under attack, the ship will happily stay back at zero flux until it feels like "the time is right" to move in. That's true even under aggressive personality.

Moreover, there seems to be some sort of "tipping point" where a ship decides it's time to go all-in and commit to the fight. So you'll often have some ships running in and trying to fight, despite being at high flux, while other ships nearby will stay back at zero flux and unsure of what to do.

I tend to use large, long range ships because it's easier to set them in a line (i.e. with fewer ships, it's less likely for them to block each other) and since they're killing ships at longer ranges, they're less likely to get fluxed up and lead to these AI issues. This leads to more consistent outcomes. The other option is to lean in on mass zerglings, i.e. LP Brawler spam, since the LP Brawler is so fast that it can quickly move away and it's so small and maneuverable that they don't really block each other much. But other than the LP Brawler, few SO ships are good enough to do that since SO severely cripples their offensive potential against difficult enemies.

In this case either an eliminate, escort, or rally/defend command behind the enemy would get them moving in the right direction.

Yeah unfortunately even "eliminate" does not mean that the ship will move forward. Attached is a screenshot of a Sunder (Sunder 10) where, after being given an eliminate command, and starting off near Sunder 7, it decides to back off to over 3000 su away from the closest threat (notice that it's over 2000 su away from me, and the closest enemy ship is the Radiant which is around 1000 su away). It may be due to flux levels but ships, under eliminate order or not, will happily move in at over 80% flux, so this is inconsistent behavior. Nor are there missiles or fighters nearby that would cause it to back off. This is under 0.97a-RC6.

As far as I'm aware, this is not new behavior introduced by the update, the AI has had this behavior in past versions as well (staying back at zero flux while other ships are under attack in front, unable to move around each other, sometimes backing off when given eliminate command, etc.). There's no feedback from the AI as to why it engages in this behavior, so the root cause is always difficult to figure out.

What's known is that the AI is usually overly afraid of and overly prioritizes missiles and fighters, so on ships that lack PD, it'll tend to stay away (and that may be a reason for the "tipping point" -- farther ships decide there's too much stuff to go in, while closer ships see a juicy enemy target and decide to go in despite all the stuff). But putting PD on your ship leads to another problem, namely that the AI under aggressive personality sets its positioning range based on the weapon with the shortest range, and PD weapons often have short ranges. So if you put PD on a ship, it'll decide to close in to melee range, even if its main weapons are all long-range weapons, and even if the PD is there just to make it not be scared of missiles/fighters. There's not a good way around this AI issue; but the reason why I put LR PD Lasers on my Conquests (in addition to forcing autofire on) is that it's a PD that has a relatively long range, to discourage closing in too much.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7787
  • Harpoon Affectionado
    • View Profile
Re: What's going on here (AI combat tactics)
« Reply #4 on: February 12, 2024, 07:06:35 PM »

Blech, gross. Yeah I've seen the same backing off behavior every once in a while too, but I've never been able to reproduce it well enough for a bug report.

I thought that Engage (is it not in the tooltip?) was as in "Engage with purpose and force" and not too soft. i.e. the step before eliminate.

...

That was my initial expectation as well, but in practice it isn't. There's no real way for a player to know that though...
Logged