Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Pages: [1] 2

Author Topic: Basic AI flux management error  (Read 5303 times)

TaLaR

  • Admiral
  • *****
  • Posts: 2551
    • View Profile
Basic AI flux management error
« on: April 21, 2018, 03:47:07 AM »

Let's take 2 almost same variants:
  • Medusa: 2xHeavy Blaster, 2x Railgun, 2xIr Pulse, Unstable Injector , Hardened Shields, Resistant Flux Conduit, 19 vents
  • Medusa: 2xPulse Laser, 2x Railgun, 2xIr Pulse, Unstable Injector , Hardened Shields, Resistant Flux Conduit, 20 vents, 3 caps

Whichever I pilot wins easily 1v1, without even doing anything complex (skimming out of shots, skim-venting, etc).
  • As PL variant I could just auto-pilot. Firing HB right off the bat is suicidal here, yet enemy AI does exactly this.
  • As HB variant I approach to closest range, disable IR pulse (they are inefficient against target shields), and wait till enemy flux is high enough. Then fire blasters at near-overloaded enemy.  Reason is that IR and PL are inefficient against my shield, so my flux grows slower then theirs.
  • Same goes for PL vs PL or HB vs HB, I win by just holding fire initially (except Railguns).

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.
« Last Edit: April 21, 2018, 09:54:47 AM by TaLaR »
Logged

DeMatt

  • Commander
  • ***
  • Posts: 102
    • View Profile
Re: Basic AI flux management error
« Reply #1 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.
Logged

intrinsic_parity

  • Admiral
  • *****
  • Posts: 2352
    • View Profile
Re: Basic AI flux management error
« Reply #2 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.
Logged

Megas

  • Admiral
  • *****
  • Posts: 9528
    • View Profile
Re: Basic AI flux management error
« Reply #3 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.
Logged

intrinsic_parity

  • Admiral
  • *****
  • Posts: 2352
    • View Profile
Re: Basic AI flux management error
« Reply #4 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.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19113
    • View Profile
Re: Basic AI flux management error
« Reply #5 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.
« Last Edit: April 21, 2018, 12:35:03 PM by Alex »
Logged

arcibalde

  • Admiral
  • *****
  • Posts: 1728
    • View Profile
Re: Basic AI flux management error
« Reply #6 on: April 21, 2018, 01:44:52 PM »

This is great.
Logged
Creator of:
Relics MOD - vanilla balanced - Campaign integrated
Vanilla addon MOD - vanilla balanced - Campaign integrated
Project ONI MOD - mission only

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 5777
  • Harpoon Affectionado
    • View Profile
    • Email
Re: Basic AI flux management error
« Reply #7 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?
Logged

Sy

  • Admiral
  • *****
  • Posts: 1225
    • View Profile
    • Email
Re: Basic AI flux management error
« Reply #8 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. :]
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2551
    • View Profile
Re: Basic AI flux management error
« Reply #9 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.

Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19113
    • View Profile
Re: Basic AI flux management error
« Reply #10 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.
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 640
    • View Profile
Re: Basic AI flux management error
« Reply #11 on: April 21, 2018, 09:19:21 PM »

Very happy with this, this is as exciting as blog post material.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19113
    • View Profile
Re: Basic AI flux management error
« Reply #12 on: April 21, 2018, 09:20:26 PM »

Very happy with this, this is as exciting as blog post material.

:D
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19113
    • View Profile
Re: Basic AI flux management error
« Reply #13 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.)
« Last Edit: April 21, 2018, 10:18:35 PM by Alex »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2700
    • View Profile
    • Sc2Mafia
    • Email
Re: Basic AI flux management error
« Reply #14 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.
Logged
Pages: [1] 2