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)

Pages: 1 ... 16 17 [18] 19 20 21

Author Topic: [0.97a] AI Tweaks  (Read 127408 times)

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #255 on: February 02, 2025, 10:21:37 AM »

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?

Quote
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!
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #256 on: February 02, 2025, 11:47:20 AM »

Here's the build

I the issues you mention should be fixed in the pre-release version. Can you confirm?
Logged

Ioulaum

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #257 on: February 02, 2025, 01:52:38 PM »

Here's the build

I the issues you mention should be fixed in the pre-release version. Can you confirm?

Hi Genir,

Just did a quick test, yes it solved the issue and performs better in simulation than the old version or without custom_AI hullmod.

Thanks for the work!
Logged

cghhj

  • Lieutenant
  • **
  • Posts: 59
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #258 on: February 02, 2025, 03:58:36 PM »

Sometimes I wish my Eagle's Heavy Needler only shooting enemy shields, at the same time, my Brwaler's Heavy Needler will firing at enemy hulls...
May sounds somewhat op, but that's what I want for real, maybe done by a hullmod just like Finisher Beam Protecol?
Anyway, you are the authur, you say the word.
Logged

Ioulaum

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #259 on: February 02, 2025, 07:57:13 PM »

Sometimes I wish my Eagle's Heavy Needler only shooting enemy shields, at the same time, my Brwaler's Heavy Needler will firing at enemy hulls...
May sounds somewhat op, but that's what I want for real, maybe done by a hullmod just like Finisher Beam Protecol?
Anyway, you are the authur, you say the word.

Yeah it's in the mod settings..
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #260 on: February 03, 2025, 12:06:10 PM »

Sometimes I wish my Eagle's Heavy Needler only shooting enemy shields, at the same time, my Brwaler's Heavy Needler will firing at enemy hulls...
May sounds somewhat op, but that's what I want for real, maybe done by a hullmod just like Finisher Beam Protecol?
Anyway, you are the authur, you say the word.

I thought about that. But since I implemented the global setting which Ioulaum pointed out, I'm kind of commited. I could add the hullmod and have two conflicting methods of configuring the needler behavior, but that would be a mess. Alternatively, I could remove the global setting, but people already rely on it.

I can recommend the Advanced Gunnery Control. With that mod you can configure each individual weapon group howeyer you like.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #261 on: February 03, 2025, 12:28:37 PM »

v1.12.1 is out. Download

Changes:
  • Custom AI: Fixed another case of interrupting bursts by venting flux, this time affecting burst beams.
  • Fixed a memory leak which could trigger the Starsector memory leak warning.
  • Fixed an issue where certain ships would "wiggle all over the place" when aiming weapons. Reported by Ioulaum.
  • Refactored direction calculations to use a dedicated modulo arithmetic class, likely fixing unnoticed bugs.
Logged

Ioulaum

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #262 on: February 04, 2025, 12:53:31 AM »

Sometimes I wish my Eagle's Heavy Needler only shooting enemy shields, at the same time, my Brwaler's Heavy Needler will firing at enemy hulls...
May sounds somewhat op, but that's what I want for real, maybe done by a hullmod just like Finisher Beam Protecol?
Anyway, you are the authur, you say the word.

I thought about that. But since I implemented the global setting which Ioulaum pointed out, I'm kind of commited. I could add the hullmod and have two conflicting methods of configuring the needler behavior, but that would be a mess. Alternatively, I could remove the global setting, but people already rely on it.

I can recommend the Advanced Gunnery Control. With that mod you can configure each individual weapon group howeyer you like.

I think hullmod might be better, since you already had some of them.

For example staggered fire, I want it on some of the ship (Legion/XIV - Railgun/HVD) but not all of them (Paragon - Heavy Needler), so implementing it to hullmod might be better.

Or like the advanced gunnery to have a seperate UI, and incorporate all into a single custom AI hullmod? I guess that's a lot of work.
Logged

Malice

  • Ensign
  • *
  • Posts: 49
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #263 on: February 04, 2025, 01:10:38 AM »

 Hey, @Genir!
 About auto omni-shield bug, took some time and I can honestly tell, that I dont know what the issue.
Firstly, I thought there was some incompatibility with Modern Carriers, but with your guidance, this was not it.
With mine walkthroughs I can't tell what's the matter with that, auto shield works "sometimes" but "sometimes" not, but in fleet testing running completely fine.
 I think this issue might be on my end with some mods, but I did testing with all mods and in the end this didn't matter much, so forget it.

 About experimental AI on Plasma burn ships, I didn't played much lately with these ships, might be try later with them.   
Logged

Reshy

  • Admiral
  • *****
  • Posts: 1214
  • White
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #264 on: February 05, 2025, 06:17:26 PM »

A request if possible, but if the current target is heavily fluxed out and can't really raise their shield then wouldn't it make sense to have the AI no longer fire kinetic weapons as to not over flux yourself dealing the kinetic chip damage on armor?  There'd need to be caveats but I feel like that'd make low tech ships marginally better since their big problem is lack of flux dissipation so firing all their weapons all the time isn't feasible.
Logged

ShadowRhino

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #265 on: February 06, 2025, 07:54:22 AM »

One thing i've noticed, on a station defence mission, the allied ships outnumbered the enemy hostiles. One onslaught was left and started to retreat from the station out of the area (understandable) however the allied fleet which outnumbered it 30 ships to one choose to pull back around the station and other locations instead of finishing it off which was a bit weird as i've seen them go all out to eliminate enemies that attack their stations?
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #266 on: February 06, 2025, 12:29:48 PM »

I think hullmod might be better, since you already had some of them.

For example staggered fire, I want it on some of the ship (Legion/XIV - Railgun/HVD) but not all of them (Paragon - Heavy Needler), so implementing it to hullmod might be better.

Or like the advanced gunnery to have a seperate UI, and incorporate all into a single custom AI hullmod? I guess that's a lot of work.

Hullmod certainly has more utility. But in the case of needlers at least, I made the global setting to maintain compatibility with a Chinese mod that adds polygonal shields. The usual method of detecting shield hits doesn't work with those modded shields, so there needs to be a way to disable the needler AI for both sides, not just for the player.

TBH I'm tempted to remove the global setting, and indeed go with a hullmod or similar. But that would mean removing a feature people alredy rely upon  :-\

As for UI and configurability, yes, it's a lot of work. I don't want to duplicate AGC functionality too much, but instead focus on adding new stuff.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #267 on: February 06, 2025, 12:33:52 PM »

Hey, @Genir!
 About auto omni-shield bug, took some time and I can honestly tell, that I dont know what the issue.
Firstly, I thought there was some incompatibility with Modern Carriers, but with your guidance, this was not it.
With mine walkthroughs I can't tell what's the matter with that, auto shield works "sometimes" but "sometimes" not, but in fleet testing running completely fine.
 I think this issue might be on my end with some mods, but I did testing with all mods and in the end this didn't matter much, so forget it.

 About experimental AI on Plasma burn ships, I didn't played much lately with these ships, might be try later with them.

Thanks for the follow up! I'll be extending the shield assist in future releases. Please, let me know if you manage to narrow down the incompatible mod.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #268 on: February 06, 2025, 12:40:16 PM »

A request if possible, but if the current target is heavily fluxed out and can't really raise their shield then wouldn't it make sense to have the AI no longer fire kinetic weapons as to not over flux yourself dealing the kinetic chip damage on armor?  There'd need to be caveats but I feel like that'd make low tech ships marginally better since their big problem is lack of flux dissipation so firing all their weapons all the time isn't feasible.

Indeed, the feature is definitely in the backlog!

I think it's really complicated to do well - as you said, there are caveats. The basic idea is not just sort weapons into kinetic/HE, but calculate the actual hit strength taking into account target armor. That way you can still effectively use weapons like the High Velocity Driver to destory unarmored hull. But I don't have any code for calulating armor effects yet. There's will be many special cases to take into account.

To sum it up: yes, but not soon.
Logged

Genir

  • Captain
  • ****
  • Posts: 323
    • View Profile
Re: [0.97a] AI Tweaks
« Reply #269 on: February 06, 2025, 12:49:45 PM »

One thing i've noticed, on a station defence mission, the allied ships outnumbered the enemy hostiles. One onslaught was left and started to retreat from the station out of the area (understandable) however the allied fleet which outnumbered it 30 ships to one choose to pull back around the station and other locations instead of finishing it off which was a bit weird as i've seen them go all out to eliminate enemies that attack their stations?

That's not something I modified. Allies and most of the enemies are controlled by vanilla AI, with only slight changes, like weapon usage and aiming.
Logged
Pages: 1 ... 16 17 [18] 19 20 21