Fractal Softworks Forum

Starsector => Suggestions => Topic started by: TaLaR on April 21, 2018, 03:47:07 AM

Title: Basic AI flux management error
Post by: TaLaR on April 21, 2018, 03:47:07 AM
Let's take 2 almost same variants:

Whichever I pilot wins easily 1v1, without even doing anything complex (skimming out of shots, skim-venting, etc).

This tactics could be countered (in case of PL vs HB) or drawn (PL vs PL) by simple intermittent hold-fire. Basically, avoid excessive soft flux buildup by own inefficient weapons (relative to target defenses) during routine flux war with equal/superior opponent. Going all out with inefficient weapons should not be the default behavior, it's something to do only once situation becomes favorable enough due to enemy being near-overloaded / much weaker to begin with / surrounded by your allies / etc.

I think this one of most glaring and fundamental errors AI regularly commits. It's pretty much the default tie-breaker (massively in my favor) whenever I have to fight a roughly equivalent opponent.
Title: Re: Basic AI flux management error
Post by: DeMatt on April 21, 2018, 07:27:15 AM
I think that this is one area that can be safely left as-is.  Making the AI too capable would make the game too difficult for, shall we say, less-than-fully-optimized-and-skilled players.
Title: Re: Basic AI flux management error
Post by: intrinsic_parity on April 21, 2018, 08:38:55 AM
I would much prefer if AI was at least better at managing flux heavy load outs. Currently I have to build load outs for the AI entirely around making sure they are flux neutral which is very limiting. The two solutions I see would be either holding fire with inefficient weapons (as mentioned below) or reducing rate of fire to try and match flux generation to dissipation. This might be much more complex/computationally intensive though, so I second holding fire on weapons that are inefficient. You could mix the two ideas and reduce rof on inefficient weapons.
Title: Re: Basic AI flux management error
Post by: Megas on April 21, 2018, 11:13:24 AM
The AI already stalls way too much.  I doubt them holding fire to conserve flux, or otherwise making them smarter in flux management, will make them any harder.  The hardest part of beating the AI these days is killing them before CR decays too much.

It is annoying that some of my favorite loadouts for playerships are practically unusable for AI.
Title: Re: Basic AI flux management error
Post by: intrinsic_parity on April 21, 2018, 11:41:23 AM
I think the idea would be that they would shoot less but use higher damage/more effective load outs  so they would still kill faster? Idk if it would actually work out that way, but I think its an interesting idea. AI using weapons in their designed roles and holding fire otherwise would definitely make them harder. If they never waste flux shoot HE into shields, it will make the flux war that much harder to win.
Title: Re: Basic AI flux management error
Post by: Alex on April 21, 2018, 12:32:33 PM
Hmm, yeah. I mean, it's definitely something I've been aware of, but haven't touched because of various concerns. For example, if the AI did this well, it might look "dumb" because it's not firing its weapons, especially if it made mistakes and also occasionally didn't fire when it should. There's also the risk of specific setups not firing certain weapons at all, if one isn't super careful about how to implement this.

That said, I think I have a better handle on how to go about this now, and making more loadouts player-AI-viable is a worthwhile goal. So: gave it a go, and I think I've got something that works pretty well.

The basic approach is it doesn't try to be perfect, but uses a sliding scale that includes its flux, enemy flux, and its soft flux, vs the shield-damage-factor, with a personality modifier thrown in for good measure. The sliding scale means there's a high tolerance to doing something inefficient initially but that drops quickly as the flux situation changes, meaning there's a low probability of certain weapons *never* getting fired, but it won't keep firing inefficient weapons for long.

For example, using the Heavy Blaster Medusa from the OP, it will fire the blasters once on approach (since soft flux is low, and so it's ok-ish to waste some flux, since it'll dissipate anyway - it's not optimal for sure, but I think it feels a lot better to do it regardless), but will then stop firing it and pretty much sticks to just railguns. The PL loadout will fire everything for a few seconds and then also fall back to railguns. This results in pretty much a tie between the two; if they weren't putting hard flux on shields with railguns, then they'd go back to using other weapons, at a rate that roughly matches the flux generation to dissipation.

Both loadouts also beat each other when the opponent is not using the new logic. Well, beat eventually - they consistently win the flux war in every engagement, but actually chasing down and finishing off a Medusa is another matter. What's nice is that it'll fire off HB shots after the enemy is forced to drop shields, so it's actually functioning in its intended role in the loadout.

The big thing, though, is that high-flux weapons should no longer cause many survivability problems, if at all.
Title: Re: Basic AI flux management error
Post by: arcibalde on April 21, 2018, 01:44:52 PM
This is great.
Title: Re: Basic AI flux management error
Post by: Thaago on April 21, 2018, 02:28:45 PM
Wow! This is great news!

If you are still testing, how does this work with really burst weapons, like phase lances or am blasters?
Title: Re: Basic AI flux management error
Post by: Sy on April 21, 2018, 04:30:56 PM
i agree, this sounds great!

it hasn't been a big issue for me, but that's mainly because i build my ai loadouts with this behaviour in mind. i often leave a large number of mounts empty, and generally prefer flux efficient and/or kinetic weapons over ones with higher damage potential.

i'm sure i'll still keep doing that on a good number of my ships, too. ^^ but more variety in loadouts i trust the ai to use well is always nice, and it should also make high-dps weapons less of a trap for inexperienced players. :]
Title: Re: Basic AI flux management error
Post by: TaLaR on April 21, 2018, 08:05:49 PM
Great news!  :)

For example, using the Heavy Blaster Medusa from the OP, it will fire the blasters once on approach (since soft flux is low, and so it's ok-ish to waste some flux, since it'll dissipate anyway - it's not optimal for sure, but I think it feels a lot better to do it regardless), but will then stop firing it and pretty much sticks to just railguns.

First shot on approach is what I do quite often too (even more relevant if I use similar variant without IR pulse laser, just HB and Rail). If my efficient weapons are under vent rate, not doing so means wasting some of my vent rate.
Rule of thumb for me is too keep some amount of soft-flux on top of hard, just not a lot.

Title: Re: Basic AI flux management error
Post by: Alex on April 21, 2018, 09:18:43 PM
If you are still testing, how does this work with really burst weapons, like phase lances or am blasters?

Pretty well, I think. It considers the fire cost of the weapon in the calculation; if it's excessive then that's more difficult to manage, but then something that costs >50% of your flux to fire *is* tricky to use well. Still, I don't think it outright fails, at least not on anything I've seen - plasma cannon, AM blaster, phase lance, all seem to go pretty well.

(And can I say that a plasma cannon and needler Sunder just murders other destroyers! Both with or without this logic; it actually doesn't make much difference in this case since it'll just about fire it once in either case.)


i'm sure i'll still keep doing that on a good number of my ships, too.

Yep, makes sense - I mean, if you've got something that works with more than likely less OP spent in weapons, then no reason to go loading it up with heavy blasters just because :)


First shot on approach is what I do quite often too (even more relevant if I use similar variant without IR pulse laser, just HB and Rail). If my efficient weapons are under vent rate, not doing so means wasting some of my vent rate.
Rule of thumb for me is too keep some amount of soft-flux on top of hard, just not a lot.

Cool! Pretty much same, then. With less finesse on the part of the AI, though, I'm sure.
Title: Re: Basic AI flux management error
Post by: Cyan Leader on April 21, 2018, 09:19:21 PM
Very happy with this, this is as exciting as blog post material.
Title: Re: Basic AI flux management error
Post by: Alex on April 21, 2018, 09:20:26 PM
Very happy with this, this is as exciting as blog post material.

:D
Title: Re: Basic AI flux management error
Post by: Alex on April 21, 2018, 10:15:48 PM
While we're here, was thinking about what sort of gameplay mechanic would help deal with ships taking an unnecessarily long time to take down. For example, if a ship keeps losing the flux battle on each engagement, but only takes minimal damage each time and is able to back off, then cutting down the number of such engagements wouldn't much change the final outcome.

So, here's a thought I had; wanted to run it by you all and see if anything jumps out as being a problem. Not something I'm committed to doing by any stretch; more a thought experiment at this point.

Let's say the 0-flux boost had the following changes:

* half applies when shield/phase cloak is off
* half applies when weapons and fighters are not firing/pulled back
(so, no tie at all to flux level; in-fiction idea is diverting shield/weapon power to engines, just a different take on it)
* total bonus possibly increased, to somewhere not above 100
* same bonus as before to turn rate etc
* and here's the big one: the top speed bonus only applies to forward speed

So if you're going forward, you receive the full bonus. As soon as you let go of the gas and turn, the bonus will go down. You can strafe sideways at about half the bonus, and going backwards gives no bonus at all.

The goal here would be to allow a flux-war-winner to push their advantage. If a ship does not have allies to fall back to, it has to either 1) win the flux war, or 2) take a lot of punishment after losing it, either having to vent under fire or continuing to fight from a flux disadvantage, assuming the enemy is able to hold fire on weapons/drop shields and pursue. Or, I suppose, 3) be fast enough that they can run away anyway and 3b) turn tail and run, which would hopefully take long enough to generally be a bad option.

It would also give larger ships a tad more mobility, in the same vein as burn drive - useful, but not generally for getting out of trouble.

Thoughts? What would this break? (Aside from probably some AI things, sigh. 3b is probably the main concern; the AI wouldn't do it, but if it was a dominant strategy, that'd be... not great.)
Title: Re: Basic AI flux management error
Post by: Dark.Revenant on April 21, 2018, 10:43:57 PM
That places even more stress on the AI threat assessment capabilities, since you'd be increasing the risk and the reward.  If a friendly ship messes up and overextends, it has very little recourse other than to hope allied ships swoop in to bail it out.  Bailing out said allied ship also runs the danger of causing a chain reaction wherein your entire fleet just kamikazes into the other one.

It's also a rather difficult mechanic to properly communicate to the player.  Currently, it's just "you have 0 flux? you get to do 50 units faster".  Simple, but effective.
Title: Re: Basic AI flux management error
Post by: TaLaR on April 21, 2018, 10:55:21 PM
This seems to also break scenario where faster ship wins slightly in every engagement, but needs to retreat-vent after (since taking armor/hull damage allows victim to somewhat recover position in terms of flux war and I do not want to trade armor/hull).
Which is a very common thing I do, since faster and smaller ships usually simply can't win against a larger opponent in single engagement (at acceptable cost).

100 bonus is also really a lot. I don't think I'd be able to maneuver around several enemies like that with Medusa for example. Or even most frigate vs DE scenarios.

I think it gives too much advantage to slow and heavy ships or side with numeric advantatge. Basically, every engagement against larger opponent is like getting pushed by a super-maneuverable Onslaught (unlike it's current straight and fixed burn).

Near instant nature of boost (no need to wait flux to drop) also raises difficulty bar for correctly using it (both player and AI).

And I guess, I just like the fact that even after you lose engagement round flux-wise, it's not the end as long as you can orderly disengage. To me the wide gap between barely a win and completely overwhelming an opponent doesn't seem like a bad thing.
Title: Re: Basic AI flux management error
Post by: TaLaR on April 22, 2018, 06:15:38 AM
The basic approach is it doesn't try to be perfect, but uses a sliding scale that includes its flux, enemy flux, and its soft flux, vs the shield-damage-factor, with a personality modifier thrown in for good measure.
Now this may be somewhat deeper, but can think of one more factor:

Efficiency of enemy weapons against my shields, with extreme case being Hammerhead during Accelerated Ammo Feeder activation. It's weapons are temporarily so effective, that firing almost anything at it is better than letting it spend flux on shooting (as long as it's combined soft flux from firing and incoming beams is above vent rate, which is almost always the case).
Title: Re: Basic AI flux management error
Post by: Megas on April 22, 2018, 07:06:42 AM
* half applies when shield/phase cloak is off
So, for phase ships, instead of moving forward three times faster, the phase ship moves slower due to losing top speed.  In that case, bring back the old cloak so that phase ships can actually brawl, and AI not wasting peak performance.  AI dancing ineffectively and running out of gas is great when the enemy does it, but not when my side does it.  New cloak is great for Quantum Disruptor or invulnerability-frame-kill shenanigans.  For anything else, it is annoying.

As for the rest, may hurt some high-tech.  Thanks to how short-ranged and inefficient energy weapons are, it is hard for some high-tech ships (with max vents and near max capacitors) to win the flux war and have enough flux left to hurt the enemy.  Aside from Paragon, they seem built to rush-in, dump flux, take a small bite out of armor/hull, then withdraw.

Triple-lance Odyssey might be worse, if enemies approach faster than Odyssey can back-pedal.  Thanks to shield nerf, it needs to kite and hang back to outrange enemies and snipe with triple lances.  If it is forced to brawl, it dies.  Terrible shot range (with non-lances), and terrible shield (and defenses), and mediocre firepower for its size, Odyssey cannot brawl like other capitals, including other so-called battlecruisers.
Title: Re: Basic AI flux management error
Post by: Thaago on April 22, 2018, 10:01:28 AM
Re: 0 Flux bonus potential changes

Not being tied to flux, but rather half shields half weapons, I do not see helping to stop a flux high ship from retreating with just a little damage to then rinse/repeat. Reason: ships that are high on flux and loosing drop their shields and stop firing, while ships that are winning keep theirs up. Even with a penalty to backing up, this will help overwhelmed enemies disengage. Diverting power away from weapons/engines to shields 'makes sense', but I don't think it works with this design goal.

It also widens the scenarios of "jeez, if the AI just lowered its shield and took a few hits it would get away", which is currently true only for tricking it to put up its shields in chase scenarios. I think you'd really need to work on the shield/weapon AI to take competent advantage of the speed bonus.

In regards to the bonus applying more towards forward motion than backwards: The only time I can really think of the enemy moving backwards at 0 flux is when kiting outside of weapons range against a superior enemy, as with a frigate swarm, or when a battle line of destroyers scatters away from a charging Onslaught. This I think would be an anti-kiting measure that gives initiative to the attacker - I'd have to play to see, but it might help when being outnumbered by frigates in a cruiser, which is an annoying reality given the AI fleet distributions.
Title: Re: Basic AI flux management error
Post by: Cyan Leader on April 22, 2018, 10:12:24 AM
What would this break?

Retreat missions.
Title: Re: Basic AI flux management error
Post by: Alex on April 22, 2018, 10:18:28 AM
Re: movement mechanic - thank you for the feedback! The AI stuff seems the most troublesome, honestly; what it can get away with as far as 0-flux it can't here since it'd be a too-common in combat consideration.


Now this may be somewhat deeper, but can think of one more factor:

Efficiency of enemy weapons against my shields, with extreme case being Hammerhead during Accelerated Ammo Feeder activation. It's weapons are temporarily so effective, that firing almost anything at it is better than letting it spend flux on shooting (as long as it's combined soft flux from firing and incoming beams is above vent rate, which is almost always the case).

Yeah, I think that's getting too deep :) Especially since stuff like light machine guns - theoretically at the extreme of that range - are nonetheless useless to use that against since their flux cost is *too* low.
Title: Re: Basic AI flux management error
Post by: SafariJohn on April 22, 2018, 03:25:59 PM
I could see the 0-flux speed boost being reworked to a 0-flux travel boost. Let it give a huge speed bonus, but also penalize acceleration/deceleration. Would that be abusable?

The most immediate trouble I see is that shield-less ships and phase ships would be unable to deactivate it by raising shields like normal ships could. That can be solved with a new control key, but that's its own problem...



Spitball idea: give ships a "tactical engine" type specified in their codex entry that describes their 0-flux or whatever boost. Some ships get the 50 speed boost, some get the above, some get some other thing.
Title: Re: Basic AI flux management error
Post by: xenoargh on April 22, 2018, 04:23:37 PM
Quote
The basic approach is it doesn't try to be perfect, but uses a sliding scale that includes its flux, enemy flux, and its soft flux, vs the shield-damage-factor, with a personality modifier thrown in for good measure. The sliding scale means there's a high tolerance to doing something inefficient initially but that drops quickly as the flux situation changes, meaning there's a low probability of certain weapons *never* getting fired, but it won't keep firing inefficient weapons for long.
That's a pretty cool way to go about that.  I was managing this largely by preventing high-flux weapons to fire once Soft Flux exceeded about 65%, which let the small stuff keep going a little bit, unless the enemy was getting pushed into near-Overload, and then allowing it. 

But I definitely like this idea better, since it'd prevent the AI from constantly screwing up with high-Flux weapons.  That's the biggest weak spot the AI has, and building around it is pretty fundamental to current gameplay.  I don't think there's any perfect way to handle the > 50% issue; that's... finicky, and players get it wrong, too.
Title: Re: Basic AI flux management error
Post by: Thaago on April 22, 2018, 05:50:48 PM
Quote
The basic approach is it doesn't try to be perfect, but uses a sliding scale that includes its flux, enemy flux, and its soft flux, vs the shield-damage-factor, with a personality modifier thrown in for good measure. The sliding scale means there's a high tolerance to doing something inefficient initially but that drops quickly as the flux situation changes, meaning there's a low probability of certain weapons *never* getting fired, but it won't keep firing inefficient weapons for long.
That's a pretty cool way to go about that.  I was managing this largely by preventing high-flux weapons to fire once Soft Flux exceeded about 65%, which let the small stuff keep going a little bit, unless the enemy was getting pushed into near-Overload, and then allowing it. 

But I definitely like this idea better, since it'd prevent the AI from constantly screwing up with high-Flux weapons.  That's the biggest weak spot the AI has, and building around it is pretty fundamental to current gameplay.  I don't think there's any perfect way to handle the > 50% issue; that's... finicky, and players get it wrong, too.

I will second players getting it wrong - I've been doing a Falcon + Phase Beam run and I've screwed up the flux plenty of times and gotten myself spanked. Thank goodness the ship actually has some armor and hull :P.
Title: Re: Basic AI flux management error
Post by: TaLaR on April 22, 2018, 08:52:14 PM
Now this may be somewhat deeper, but can think of one more factor:

Efficiency of enemy weapons against my shields, with extreme case being Hammerhead during Accelerated Ammo Feeder activation. It's weapons are temporarily so effective, that firing almost anything at it is better than letting it spend flux on shooting (as long as it's combined soft flux from firing and incoming beams is above vent rate, which is almost always the case).

Yeah, I think that's getting too deep :) Especially since stuff like light machine guns - theoretically at the extreme of that range - are nonetheless useless to use that against since their flux cost is *too* low.

Is it useless though? Once enemy is within LMG range the only options to are to run away (if you are faster), overload/disable their guns or eventually die.
Letting LMG hit shield without fighting back is likely the worst usage of flux at this point (especially if their KE shots are not mixed with enough HE). The earlier you go out with all weapons, the better (while armor lasts).
Title: Re: Basic AI flux management error
Post by: Wyvern on April 23, 2018, 09:57:51 AM
I'm really excited to see this in-game... and I'm also very curious what it does for ballistic-based ships; those tend to be much harder to make in AI-friendly flux-neutral builds.
Title: Re: Basic AI flux management error
Post by: Alex on April 23, 2018, 10:12:47 AM
Is it useless though? Once enemy is within LMG range the only options to are to run away (if you are faster), overload/disable their guns or eventually die.
Letting LMG hit shield without fighting back is likely the worst usage of flux at this point (especially if their KE shots are not mixed with enough HE). The earlier you go out with all weapons, the better (while armor lasts).

Well, no-one said to keep the shields on :) It's useless in the sense that it's not going to stop the LMGs from firing. A possible best use of the flux at that point is to fire whatever is efficient-ish to take down the shields and then use heavy hitters like the HB vs armor.

This may not always be the best approach, but it will be in some cases. Point being that this is not a great metric because it's not clear-cut.


I'm really excited to see this in-game... and I'm also very curious what it does for ballistic-based ships; those tend to be much harder to make in AI-friendly flux-neutral builds.

Got any ballistic loadouts that work well in player hands but don't work for the AI because of flux management? Would love to give one a whirl.
Title: Re: Basic AI flux management error
Post by: Wyvern on April 23, 2018, 11:18:06 AM
Got any ballistic loadouts that work well in player hands but don't work for the AI because of flux management? Would love to give one a whirl.
Almost anything with an assault chaingun or storm needler?  Probably some builds with gauss cannons, too.  I'll have to do some testing this evening, come up with actual specific variants.  (Though, the stock SO-Hammerhead design is probably a good starting point - not to claim that it works 'well' in player hands, as 2x chaingun is silly - but it certainly works better for the player than the AI.  1x chaingun 1x HMG would be a much stronger variant, imo.)
Title: Re: Basic AI flux management error
Post by: Alex on April 23, 2018, 02:20:12 PM
Hmm, that one doesn't seem like a great example because its flux generation is below its dissipation rate.