Fractal Softworks Forum

Starsector => General Discussion => Topic started by: Kossilar on June 10, 2021, 08:05:11 PM

Title: Frustrated with AI ignoring my orders in battle.
Post by: Kossilar on June 10, 2021, 08:05:11 PM
I'm really frustrated with the battle system. Its so annoying to have ships randomly decide to leave the battle to defend a command point on the far side of the map where there are no enemy ships when I've already told them I need them in a specific place. The command point limitation means that autonomous choices by the fleet AI lead to a shortage of command points when I need to give orders at critical moments which leads to lost ships and lost battles.

Frankly, its really dumb that I can't order a ship to defend a point and expect them to stay there until I give them new orders. It doesn't make sense that when I order individual frigates to capture control points at the start of a battle, every other ship in the fleet automatically assigns itself an objective, forcing me to give them a new order to correct them. In a real fleet it would be an unacceptable dereliction of duty for a commander to ignore orders given by a superior, so why is this a constant scourge of every battle in this game? Ships shouldn't be allowed to make autonomous choices and assign themselves objectives, it defeats the entire purpose of commanding a fleet and the real-time-with-pause model of the battle system.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Modo44 on June 11, 2021, 02:44:04 AM
Only unassigned ships will attach themselves to existing orders, and only to some extent (until that order is considered filled, so to speak). You are free to delete orders (no command points cost). You can add as many orders as you wish during the cooldown when using one command point. You can assign ships to specific orders, and that counts towards the "filled" parameter of that order. You can set the "Search and Destroy" order to make a ship hunt on its own ignoring other orders.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Kossilar on June 11, 2021, 05:54:41 AM
Ships I've given explicit orders to change commands autonomously. Ships that haven't been given explicit orders still shouldn't assume that I want them to fly off across the map by themselves, especially during battle. In huge fights with a lot of ships it's easy to miss when one or more ships has abandoned its post, necessitating more CP use to correct the problem.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Generalstabdick on June 11, 2021, 06:12:15 AM
Please show us an example of this behaviour, present a save game so we cant test it.

It's enterly possible that it's a bug, but we can't know for sure.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Kossilar on June 11, 2021, 09:20:02 AM
Starting fleet: https://imgur.com/LjKtWtj

Commanded two frigates on the right flank to capture Sensor Jammer Gamma, but every single ship on the map decided that means they should all go to Gamma. https://imgur.com/kmWGzeS

I've proved that ships are giving themselves orders, which IMO they should never, ever do. But they do it every time, sometimes leaving points they're defending or an active engagement.

Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Hiruma Kai on June 11, 2021, 09:49:11 AM
Orders fall into two rough categories, fleet wide orders and specific ship orders.

Orders which you can give without selecting a specific allied ship are by definition, fleet wide.  Capture, Defend, Avoid for example.

If you hover over the Capture tool tip, it says "Order your fleet to capture this objective.  Enough ships will be assigned to match enemy forces in the vicinity.  Once the objective is secure, it will change to control".

You can order specific ships to capture, but that doesn't override the fact you've issued a fleet wide capture order.  You can actually see this if you issue a capture order without selecting a ship, your entire fleet assigns itself, issue another capture order to a 2nd objective, see 1 ship assign itself, then reassign that specific ship to something else (such as capturing the 1st objective), and another ship will change it orders to capture the 2nd objective.  So individual ships will follow individual orders, and ships with no specific orders will respond to fleet wide orders.

If you only have 1 fleet wide order, and no other specific orders, it seems reasonable to me the fleet will go do that.  As noted above, if you want a ship to ignore fleet wide orders, search and destroy is the order you want.

It's meant to allow people who want to be hands off and not pay attention throughout the battle to do so.  If the ships following a capture order are destroyed, ships without orders and that are not currently engaging will switch over to fleet wide orders, which makes some sense.

Now you and others may prefer a more hands on approach and want to indicate which ships go where all the time, which is a reasonable desire, but it does change the nature of the game, bringing it closer to a command all units individually RTS style, like Starcraft, as opposed to a looser command style which is meant to emphasize the player's flagship piloting.

So, it's possible to get the fleet to do what you want to do by issue more orders while the command frequency is open.  In general though, I find I can get away with issuing far fewer orders than I would need to do for a similar number of units in an actual RTS like Starcraft.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Nick XR on June 11, 2021, 11:17:28 AM
It is very frustrating mid battle to realize you haven't cleared a capture order and some valuable ship(s) have decided now is a great time to try and get a now-that-combat-has-started meaningless bonus (basically once the capital engage each other a 5% range bonus isn't nearly as useful as having your ships in position).

Maybe I'm deeply unimaginative, but I've personally found the best way to win battles is basically:


I've found the capturing AI frustrating, when I want something captured, I want a ship to park on it and die if it has to.  Most of the time what seems to happen is my frigates I send to capture a point end up chasing some low-value ship across the map and not achieving anything but either wasting time or getting picked off because they're without support.

I get the idea is these orders are more like strong suggestions, by design, but that doesn't make it less frustrating when you just need simple things done (like capture and hold a point vs inferior or equal forces).
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: DuckFlux on June 11, 2021, 12:03:07 PM
I've found the capturing AI frustrating, when I want something captured, I want a ship to park on it and die if it has to.  Most of the time what seems to happen is my frigates I send to capture a point end up chasing some low-value ship across the map and not achieving anything but either wasting time or getting picked off because they're without support.

I get the idea is these orders are more like strong suggestions, by design, but that doesn't make it less frustrating when you just need simple things done (like capture and hold a point vs inferior or equal forces).

I rely on the strong suggestion style of the capture objectives to spread the opposing fleet out as much as possible without exposing my own ships to too much risk. I think in this form it better fits battles where you always need a high DP value to bring on reinforcements during the battle.

I wonder if there is room to add some sort of commitment modifier to an order. Where by default they are 'do your best', but then you could switch the tone of the order to 'if you can't do it I'll find a officer who can!'
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Kossilar on June 11, 2021, 05:49:56 PM
To me it defeats the purpose of having fleet combat and being a fleet commander if I can't reliably command my forces in battle. I mean the command points are annoying enough, but watching my ships change orders on their own is just really frustrating. I'll order a ship to defend a point and then a different ship will order itself to defend a new point, I'll change that ship back to it's original orders and then a different ship will change orders and the process repeats.

Maybe folk around here have gotten used to it but any gameplay mechanic that exists solely to waste my time is bad game design, period.

If I give no orders, my ships will move forward until they contact the enemy. If I select just two ships and order them to do something specific you can't argue that I've given an order to the entire fleet. I selected two ships and my orders were just for them. Having all the other ships autonomously give themselves their own orders, forcing me to put them back on task when I wouldn't otherwise have to is objectively bad game design.

If that isn't how the game works, then I shouldn't be allowed to select individual ships in the first place. I should give the order and the fleet should independently figure out how to best accomplish that. But why the hell would I want to rely on a computer to do what I can unequivocally do better? Unless the dev's intention is to create a Deep Blue style fleet command AI, I'm always going to make better choices than the computer. Frankly, I don't want the computer to make those choices. I want to make them myself, that's why I'm playing a game about being a fleet commander in the first place.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: robepriority on June 11, 2021, 06:32:25 PM
I think the intent is to pause, give orders to every ship, and then start again.
That's one command point for the entire fleet.

Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: SCC on June 11, 2021, 09:57:48 PM
You can also unpause in the tactical screen, the open comms bar takes a while to run out.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Nick XR on June 11, 2021, 11:45:21 PM
Maybe part of the issues is the usage of orders is a bit viral, in that once you start, you have to do it for all ships, all battle.  And if you do stop mid battle because you run out of CP, you'll likely get a behavior you really didn't want.  For example if you order multiple groups of ships different kill targets, when one of the targets is eliminated the newly unordered ships will try to attack the other targets (rather than ones nearby), unless of course you have command point to burn to fix this issue, at which point the process continues until you run out of command points.  The result of all of this is you can't really "play the game with this system" unless you're very careful or have some skills. Or what I do most of the time is just order all ships to follow me and cannonball into the enemy lines.

Maybe I'm doing this all wrong, I would love to know how to deal with the above scenario.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Hiruma Kai on June 12, 2021, 07:39:01 AM
Maybe part of the issues is the usage of orders is a bit viral, in that once you start, you have to do it for all ships, all battle.  And if you do stop mid battle because you run out of CP, you'll likely get a behavior you really didn't want.  For example if you order multiple groups of ships different kill targets, when one of the targets is eliminated the newly unordered ships will try to attack the other targets (rather than ones nearby), unless of course you have command point to burn to fix this issue, at which point the process continues until you run out of command points.  The result of all of this is you can't really "play the game with this system" unless you're very careful or have some skills. Or what I do most of the time is just order all ships to follow me and cannonball into the enemy lines.

Maybe I'm doing this all wrong, I would love to know how to deal with the above scenario.

Viral is in an interesting way of putting it, and I can see that.  Starsector has a fairly unique (as far as games I've played) command system.  Most "command" type games, say an RTS like Starcraft or something out of the total war franchise, will tend lose every time if you don't issue any orders, and in fact other than shooting at things in range, your units will sit there until destruction.  Issuing orders is the only thing you do and units tend to perform those order to a mindless degree (baring morale type mechanics).  You also have to issue far more orders during a typical fight in those types of games than you do in Starsector to have similar levels of success.

I guess one question is, are you trying to always have engage orders up?  I don't generally feel a need for those to get the AI to engage.  Say you have an initial set of orders to get your fleet arrayed like you want, and assault some objectives.  That's 1 CP at the beginning.  Now you've spotted the enemy.  Cancel waypoint/defend orders (free), and issue 2 priority engage orders on two capitals on opposite sides, and the rest of your fleet on search and destroy (the ones you don't want focusing on the engage targets).  That's 2 CP total so far.  Then when one capital goes boom, you issue another set of search and destroy to the successful ships, and that's 3 and your done.  Unless you're issuing like 5 engage orders, you should have sufficient CP from the beginning of the game to do that each time.  The game is trying to make it so you don't need to tell every ship every time exactly who to engage.

If you're trying to use waypoints and engage orders to get ships to engage exactly how you want every time your ships are near enemies, then I can see running out of CP.  But that apparently is a design decision for the game.  To force the player to be somewhat hands off.  I can't see any other reason for command points other than to encourage you to close the map screen and to pilot your ship rather than playing fleet admiral 100% of the time.

If you prefer a more RTS and micromanaging style, which is a perfectly reasonable game preference, I'd suggest modding the game to give yourself more commands points and a shorter regeneration time for them.

You can easily modify the starsector-core/data/config/settings.json file, specifically these two lines:

   "startingCommandPoints":5,
   "baseSecondsPerCommandPoint":120,

It will change the nature of the game, but if you're not enjoying the fact you have limited orders, it's one way to change it more to your liking.  It allows you to play the game much more like Starcraft, where each unit can, and always needs to be issued specific orders (to compensate for the changing situation and the fact you're giving very specific orders in the first place).  If you do this, I highly recommend using the ctrl groups for faster selection of your ships.  If you tend to command your frigates to do captures, setting them to say group 1, and other ships to 2 and 3, lets you hit 2, search and destroy (S key), 3 S, then 1, right click on capture point.  Since the game remembers ctrl groupings from fight to fight, it can be a very quick way of setting up rather than individually hunting and clicking on the ships you want.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Kohlenstoff on June 12, 2021, 08:28:44 AM
Just because this thread is open. I encounter often the problem, that AI-Ships dont move away from enemies if ordered to do so. This can be devastating, if i try to get a ship into safety to vent while it is surrounded. The AI does just sit there and waits until it is done.

I found out. When the AI does not go on distance with move order, i use direct retreat order on this ship instead. The AI will follow this order way more often and reliable, then the move order. The AI goes on distance and can vent. Then i cancel the direct retreat order. The AI will re-engage automatically.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: DatonKallandor on June 12, 2021, 10:27:03 AM
That's because telling a ship to move back to vent is way too fiddly and there's a reason there's no command for it. You're not supposed to do that. You are not supposed to micro your ships - they are not braindead starcraft units that follow your every command and nothing else.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Kohlenstoff on June 12, 2021, 01:19:11 PM
And i still want sometimes to get ships out of surrounding situations. Especially since i tend to use only one other ship besides of my flagship. I actually don't even do nor like micromanagement and i like even, that the AI thinks for itself so good. I rarely use more than 2 of my command points during large battles. But sometimes i see, that my Radiant is in a possibly dangerous situation and i want to have it out of there.

Here at 13:35 i have to use this trick because the small remnant ships in masses tend to ablate too much hull.
https://www.youtube.com/watch?v=32NeliLSGYU&t=810s
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: torbes on June 12, 2021, 04:04:56 PM
Just to point out the OP gave an assault order on the point. That is essentially all free ships attack said point. You can even see in his SS that 2 of the bars from the ships are yellow, the rest are green. As in the 2 he commanded and the rest followed. OP just needs to either.... use capture instead of assault OR give other orders to ships he doesn't want attacking that spot. Assault is the more extreme order...ala exterminate and engage.

Also to note, assault turns to defend after the point is captured, so that the ships will stay in that general vicinity short of suiciding on it. Capture turns to a more loose hold order where if there aren't any enemies or less enemies some or all player ships will move farther out to help in battle and only return when enemy threat to capture point is increased.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: DatonKallandor on June 13, 2021, 05:48:41 AM
And i still want sometimes to get ships out of surrounding situations. Especially since i tend to use only one other ship besides of my flagship. I actually don't even do nor like micromanagement and i like even, that the AI thinks for itself so good. I rarely use more than 2 of my command points during large battles. But sometimes i see, that my Radiant is in a possibly dangerous situation and i want to have it out of there.

Here at 13:35 i have to use this trick because the small remnant ships in masses tend to ablate too much hull.
https://www.youtube.com/watch?v=32NeliLSGYU&t=810s

All this shows is that direct retreat probably shouldn't be cancellable because you can abuse it to micro ships in ways you are not supposed to. The reason your ship is getting swarmed is because it has no escorts - the solution is adding escorts, not letting the player micro more.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Megas on June 13, 2021, 10:19:09 AM
Just to point out the OP gave an assault order on the point. That is essentially all free ships attack said point. You can even see in his SS that 2 of the bars from the ships are yellow, the rest are green. As in the 2 he commanded and the rest followed. OP just needs to either.... use capture instead of assault OR give other orders to ships he doesn't want attacking that spot. Assault is the more extreme order...ala exterminate and engage.

Also to note, assault turns to defend after the point is captured, so that the ships will stay in that general vicinity short of suiciding on it. Capture turns to a more loose hold order where if there aren't any enemies or less enemies some or all player ships will move farther out to help in battle and only return when enemy threat to capture point is increased.
This is not what I expect from those orders.  I expect those ships to dogpile at that point or hold it with their life, but they do not do that.  Instead, they let the enemy steal it!  Classic case of "frustrated with AI ignoring my orders in battle."

All this shows is that direct retreat probably shouldn't be cancellable because you can abuse it to micro ships in ways you are not supposed to.
I have cancelled retreat occasionally before because an unfavorable situation suddenly turned (critical enemy ship just died) or the ship I want to retreat was slow and suddenly the enemy decided to retreat and it is time to full assault.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Vanshilar on June 14, 2021, 02:00:09 PM
Yes, I agree the single most lacking aspect of Starsector right now is the lack of a competent AI. The game revolves around fleet combat. That's where the game should really shine, but it doesn't, and the single biggest reason is how the AI works. Let's start with the gameplay design.

By design, the AI does *not* carry out your commands directly, as it would in a traditional RTS. You tell it to "go here" or "attack this" and it may or may not do that. The stated reason is that the ships are themselves acting like people would, i.e. they're not going to just march in to their death or whatever the same way you can command zerglings to run in to their death. You also have a limited number of command points, the purpose of which is to limit your control over the other ships in your fleet. So the whole point is to give it more of a "you're leading a fleet as a ship captain" rather than "as a fleet admiral" feel. In other words the other ships, by design, have a lot of autonomy, and the player is more "just one ship within the fleet".

That autonomy would be great if the ships were good at "reading" the battle and understanding the role of their ship within the context of a battle, the same way a human player can. Unfortunately the AI is pretty poor at doing this. Also, what the AI is doing is pretty opaque; it's difficult for the player to figure out *why* a ship is backing off, or why it's continuing to advance into multiple Brilliants when it's at 90% hard flux, etc. There are many other factors that the AI is trying to account for that the player may not readily notice. So overall what the player sees is an AI that doesn't listen to the player, and that alternately seems to either stay away from battle, or rush headlong in and suicide, without apparent rhyme or reason. You get ships which you tell to defend a location, only for them to run off chasing some frigate and then get surrounded and die to enemy ships halfway across the map. Or you see ships at low flux staying away from battle, while the ships with high flux committed to staying on the front lines, I think because the AI has some sense of "once another ship gets close enough then it's time to commit your weapons and fight" as part of its "fight or flight" response. Thus, paradoxically, the ships that are the most vulnerable (high flux) stay in and fight, while the ships that are the strongest (low flux) tend to stay away. This is obviously the opposite of how the player wants the ships to behave.

What would help are the following:
1. "Command points" should be renamed. Maybe "objective" or "goal" whatever. If the AI does not directly follow the player's directions, but instead tries to do its own interpretation of the directions, then it really shouldn't be called a "command". The word choice itself implies AI properties to the player that the AI doesn't actually possess.
2. The AI should apply the player's directions more "unquestioningly". If the player is giving an order to the AI, this inherently means that the player is overriding the AI's autonomy. From a gameplay design perspective, what the player is really saying is "whatever you've autonomously decided is incorrect, I want to supersede what you're trying to do". For example, if the AI is commanded to go somewhere, that really means it should try to go there, not continue chasing whatever frigate it happened to be fighting at the time. In this case the player may be trying to tell the AI "you're getting too far away from the fleet, go back to the fleet". Currently the only way I've found to "force" a ship to disengage is by using the "avoid" command. However, that's very unwieldy, since it's a blanket order and *all* ships start moving away. Many times, it's that I want a *certain* ship to move away (for example, I see that a ship is at high flux and/or it's about to get flanked, but it is continuing to charge in), not the entire fleet.
3. More transparency as to what the AI is doing. I think a lot of the player frustration is simply that the player has no clue *why* the AI is behaving the way it is. For example, in this current release it seems like the AI is overly shy when there are enemy missiles, so many times even when the player orders the AI to charge in, it'll continue to stay back. (I suspect many of the complaints about the AI not being aggressive enough are due to enemy missiles.) There is very little documentation about how the AI functions, nor about how to use the tactical map effectively. This game does not have a "replay" feature and battles are randomized, so AI issues are difficult to reproduce. So if the game at least displays more info about how the AI is thinking, then it would go a long way toward figuring out issues with the AI.
4. Ideally the AI should somewhat prioritize not getting too far away from the main fleet unless commanded to. The fleet tends to spread out, which usually means one of them gets surrounded and then dies. Certain commands (like "defend") do help somewhat with leashing ("defend" is nice because after an "eliminate" command, once the target is dead, the ships will go back to the defend command); however, ships still get pulled out of position pretty easily.

I know fixing the AI is a "hard" problem. It's very easy to point out flaws in the AI. It's very easy to load up any battle and point out how the AI is misreading the battle and how the ships are doing the wrong things. But whether or not the game is fun ultimately boils down to how well fleet combat works, and having a good AI is a very big part of that.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Yunru on June 14, 2021, 02:09:41 PM
What I'd give for a tool tip that said both what a ship is doing and why the AI is doing that (e.g. "Backing off: Flux too high)...
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Lucky33 on June 14, 2021, 10:17:48 PM
I think game already has nice placeholder to fix most of its AI problems.

Doctrine screen should be expanded to include things like target prioritization and formation cohesiveness.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: SCC on June 15, 2021, 07:44:19 AM
I think the best suggestion to come out of this thread is that AI ships should be more transparent as to what and why they do things.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Lucky33 on June 15, 2021, 09:06:57 AM
It was possible to show the AI flags in the 0.91. Didn't help much really. AI is unable to tell as to why it doesn't execute the order in the manner what is expected by the player.
Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Cik on June 15, 2021, 05:32:38 PM
Personally I think the game would likely choke and die if you tried to extend the AI's decision making much beyond the purely personal. As it is it does a relatively~ OK job of considering it's own circumstances and it can at least mostly hold a steady state and threat-estimate to keep itself alive. The problem is the "mount and blade problem" in that it gets hung up in a purely personal consideration of firepower levels. It will refuse to engage a target it could easily take as long as it engages with friendlies that are nearby and ready to hand.

I always thought a good way to fix this would be a way to organize your ships into squadrons, which would automatically escort each other at the start of the battle (or something similar) and would calculate their firepower and tankiness as a sort of group if they were inside a certain radius and unengaged with other targets. That way at least if a couple ships operating together encountered a foe they could work out if they could take that foe or not keeping in mind the fact that there is more ships than just themselves and it on the field.

I hoped a long while back that a more detailed deployment / engagement metagame might eventually arrive where the game would become strategically more detailed than just burning on to the table in a big deathball and shooing it out with the enemy deathball. I mean, the game is fun don't get me wrong but there's not really any strrategy to it; if you have a superior fleet you'll win, and if you have an evenly matched fleet you'll win with maybe a couple losses caused by the AI on your team miscalculating and getting overwhelmed or surrounded in a way you can't really prevent.

I actually liked "old" fighters more than the current "personal" way they work. At least you could form them up into a big package and push them at enemies in a way that was kind of interesting and involved some skill. The game, imo, retrograded when they were changed and has stayed in pretty much the same place (strategically / tactically obviously, the actual game has gotten much better in most other ways)

anyway this post sounds grumpy. I wish serious attention would be paid to what I addressed above but I think I'm in the vanishingly small minority that doesn't just want to fly a 2d spaceship and blast people with some friendly/enemy ships around to fill up the table with fireballs during the battle.

Title: Re: Frustrated with AI ignoring my orders in battle.
Post by: Generalstabdick on June 17, 2021, 03:54:41 AM
I don't undestand why the AI is shy when in comes to missiles, considering that my ships are always gimped with enough flak to sred even the largest missile barrages / fighter swarms.

There was a time in the game's life where only small ( and only small weapons Flagged as PD ) would shoot at missiles and fighters, It might be off-topic but I don't understand what changed throughout the patches that now justifies the AI's Gunning crews insistent need to put a Hellbore round between the eyes of an enemy talon pilot.

It's little things like this that make the game frustrating to deal with and it gets worse with mods because of the extra added weapons ( Ofc this is not the fault of Alex that modded weapons can break the game ).