Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  


Starsector 0.97a is out! (02/02/24); New blog post: New music for Galatia Academy (06/12/24)

Author Topic: A.I. piloting issues and potential fixes.  (Read 430 times)


  • Captain
  • ****
  • Posts: 428
    • View Profile
A.I. piloting issues and potential fixes.
« on: October 20, 2022, 11:00:20 PM »

I'll start off by saying, this is not a bug report topic, as most of these issues are the result of intended features under unfavorable circumstances.

The first, and most annoying A.I. behavior that I've come across, is that the A.I. is extremely scared of missiles. This is most noticeable with fast highly maneuverable ships.
This issue comes in two flavors.

The A.I. tries to dodge all missiles, including missiles with tracking. While this sounds desirable, the player can't dodge most tracking missiles, which means the A.I. definitely can't. This results in the missiles "pushing" faster ships back, as they are trying to dodge those missiles. The A.I. will try to dodge missiles regardless of current flux levels.
For testing purposes take an SO Aurora, any loadout, and pit it against the long-range support Dominator. The Aurora will struggle to close the distance due to trying to dodge the incoming pilums.
This issue is also very noticeable pitting the Aurora against three Condors. The conjunction of trying to dodge the Condor's pilums, along with trying to dodge an incoming volley of Comp-X bombs, means the Aurora will struggle to engage, and frequently will lose.
An interesting note is that the dodging algorithm bugs out when saturated with targets, such as when trying to dodge a piranhas' payload, and will slow down enough that some of the bombs will hit.

This issue is also why long-range weaponry in conjunction with squall or mirvs are "meta" in the campaign. The enemy will never get in range due to being pushed back by missiles that aren't a threat but remain in range of your long-range weaponry which results in an indecisive flux lock.

The fix for this issue is to disable dodging for tracking missiles, because they're rarely possible to dodge anyways, and lower the threat assessment of none tracking missiles. The A.I. should not treat a couple piranha bombs as if they're a reaper. Likewise, squall aren't an issue until armor has been compromised, as such dropping shields against a ship using them should be the A.I. response.

The second issue is that ships with frontal shields, shield conversion front included, always try to face missiles if they can. This behavior makes sense if a ship has a low shield arc. It does not make sense if the ship has 360-degree shields, and they are fully raised.
The biggest test case is against a star fortress. Fast ships, high tech, and SO all struggle against star fortresses as they waste firing time turning towards mines that couldn't hit them in the first place.

A simple check to see if the ship has 360 shields, they are fully raised, and then disabling the behavior should be enough for most cases.

The two issues mentioned above are partly why SO builds, fast low weapon range ships, and high-tech struggle so much in the A.I. hands, but are great in the player's.

For the next annoying A.I, behavior, the A.I. becomes more aggressive when it starts to lose CR. This includes ships within the player's fleet. If I want a reckless officer, I will assign a reckless officer. There is no circumstance I want my steady or aggressive officer becoming reckless due to lowering CR. If I need them to kill something in a risky fashion, I can always order them to do it.
I presume this was added to prevent the A.I. from CR stalling, or to make an already won fight faster. I would appreciate it if it was removed at bare minimum from the player's fleet.

Second to last A.I. behavior is indecisive flux locking.
This happens for two reasons. First the A.I. is getting pushed back by missiles so it can't engage its weapons, but it's not disengaging meaning it remains within enemy weapon range. The Apogee and Conquest videos by Big Brain Energy are a good example of this.
The other reason is that the A.I. disengages but re-engages before fully venting its flux. This is mostly an issue with, you guessed it, faster shorter-range ships. The fix for this is simple, do not re-engage until the ship is at 0 hard flux. It is almost always better and safer to re-engage too late, rather than re-engage too early.

The last A.I. behavior I'll touch on is flux management with heavy burst weapons such as the Tachyon Lance. Even if the A.I. has more than enough dissipation, and capacity, it will still frequently disable auto-fire due to the sudden increase in flux. This of course disables the weapon's tracking, which can be the difference between a dead frigate and a badly damaged frigate. The current workaround is to put Tachyons in the same weapon group as PD as the A.I. will almost never turn the PD group off. However, the A.I. should get a proper adjustment as there are cases near max flux where the Tachs need to stop firing.


  • Captain
  • ****
  • Posts: 428
    • View Profile
Re: A.I. piloting issues and potential fixes.
« Reply #1 on: October 21, 2022, 09:11:14 AM »

I forgot to mention, the reason I use shield conversion front is due to the A.I. "flickering"(turning off and on) omni shields between incoming threats. If the A.I. would just let the omni shields fully open, it wouldn't need to flicker the shields. The best example of this is a Paragon that is surrounded, but not overwhelmed.