Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Pages: 1 [2]

Author Topic: AI controlled ships switch targets too often  (Read 1889 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 25928
    • View Profile
Re: AI controlled ships switch targets too often
« Reply #15 on: April 19, 2024, 10:57:13 AM »

Very nice! I will say that you want to be careful that this type of behavior does not actually impede its performance in normal fights. Not an issue for the Nova, which is reckless anyway and wouldn't try to avoid getting flanked regardless, but for ships with other types of personalities... it really depends on how you're doing this, though. Makes me want to have another look at this at some point :)
Logged

eert5rty7u8i9i7u6yrewqdef

  • Admiral
  • *****
  • Posts: 763
    • View Profile
Re: AI controlled ships switch targets too often
« Reply #16 on: April 19, 2024, 02:10:11 PM »

Very nice! I will say that you want to be careful that this type of behavior does not actually impede its performance in normal fights. Not an issue for the Nova, which is reckless anyway and wouldn't try to avoid getting flanked regardless, but for ships with other types of personalities... it really depends on how you're doing this, though. Makes me want to have another look at this at some point :)
From my time playing From The Depths, and running into this issue while customizing the targeting AI, I will add in that you want to make it weighted but not absolute for which ship it will target.
So, ships that are moving away and are at a greater distance get less priority, but have a priority increase if they are already a target. When choosing a new target, it should be a weighted priority of degrees required to turn and a weighted priority of potential threat of the incoming enemy ship.
So basically, if the AI is targeting a Hound with a thumper, and a Vanguard armed with Reapers comes into range, the AI should swap targets and focus on the Vanguard. Alternatively, if a Wolf with an IR/Pulse Laser comes into range, it shouldn't switch targets as the Wolf isn't that much of an increase in threat.
Logged

Beep Boop

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: AI controlled ships switch targets too often
« Reply #17 on: April 23, 2024, 04:04:19 AM »

The AI should probably have a better understanding of what the axis of advance and the line of battle are. That way it would not constantly try to turn to attack targets far from the axis of advance, which should be SOMEBODY ELSE'S PROBLEM. Trying to "avoid being flanked" by targeting a flanking ship that someone else can deal with tends to actually result in getting flanked.

The AI also likes to flank a little too much, even when this is counterproductive and results in becoming isolated and flanked yourself, or when getting behind the enemy is the wrong course of action, like a pursuit battle, where you don't want to be BEHIND the enemy, you want to cut him off by getting in front of him so he cannot leave, so the desired position should always be between the enemy and where he wants to go.
Logged
Pages: 1 [2]