Tried the custom AI and it still does this sometimes:
There's likely some other factors involved like the high flux level, but the ship turned to prioritize the heavily damaged frigate and let it's engines get shot out by the much larger ship as well as not using it's maneuvering thrusters to get away but to get closer to try and confirm a kill on a frigate that's already super low and likely to die to incidental weapons fire. It may also be partially caused by the AI getting confused with frontal shields, instead trying to turn the ship away from danger only to pivot to a direction where the shields won't cover.
There's a lot to unpack here, but the main issue is the ship exposing its unshielded side to enemy fire, correct? To be honest, I don't have a good answer right now. Custom AI doesn't take its own shield arc into account
at all. That's mainly the artifact of me using longer range ships, where rotating to face a different target doesn't make such a big difference due to the distance. Right now, I'm doing test with short range Novas, and yes, they do expose themselves. My strategy is putting expanded shields on ships with Custom AI, but I'm aware it's not the answer you're looking for. I don't know how to solve the issue in a good way. I plan to work on it later, after finalizing other issues where I know the solution.
The second thing is diving to confirm the kill. That's very much intentional. I implemented the behavior after being frustrated by the vanilla AI letting almost dead enemy ships retreat only to return with fully recharged flux bars. I see it that way: vanilla AI is focused on fighting and survival, my AI is focused on killing and concluding the battle. You think I overdid it?
Finally, maneuvering thrusters. They have vanilla AI, so I can't fine tune their behavior. Maybe in the future?
Something to look into might be modulating when a ship starts backing off if they have a speed advantage over the enemy. What usually gets the AI killed is moving too close past the ideal stand off distance for weapons and then only backing off at like 90% flux when it's far too late rather than 50-70%.
That's a bit easier. The actual threshold is 75% right now. But I plan to remove the hardcoded threshold and instead observer the rate at which the flux changes. That way the AI will know how much time it has left before is runs out of flux. Smaller ships will retreat much faster than bigger ones with larger flux pools or more efficient shields. There's ofc a lot of details that need to be accounted for, like burst weapons that can spike the flux bar, etc.
Developing AI does indeed take years! The progress may look slow, because well, it is slow. But reports like yours really do help!