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); New blog post: Simulator Enhancements (03/13/24)

Author Topic: AI handling of phase cloak.  (Read 3374 times)

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
AI handling of phase cloak.
« on: August 06, 2012, 11:12:11 AM »

Right now there seems to be huge gap between actually (close to)optimal use of phase cloak with currently defined phase mechanics and the way AI tries to use it.

First a simple question - how much does 1 second in phase cost? Obvious answer is - whatever is stated in ship stats as cloak upkeep. However, complete answer is - cloak upkeep + ship's flux vent rate.
Other important points:
-phase is entered instantly
-when you break phase, there is a short period while you are still immune & don't pay upkeep, but also do not vent flux. You also can fire. For further calculations i'll consider it to be 0.5 sec, though i don't know precise duration.

Consider following variant of shade: 125 phase in, 125 upkeep, 250 flux vent, 2500 flux capacity.

First second of long phase = 125(in) + 125(upkeep) + 250(regen loss) = 500
Not first = 125(upkeep) + 250(regen loss) = 375
Instant phase/unphase = 125(in) + 125*0(no upkeep) + 250*0.5(no regen while unphasing) = 250 for 0.5 sec immunity

This means that if ship is shot at less than once per 1.5 second it can dodge by instant phase/unphasing indefinitely (with perfect control though), more realistic estimate would be once per 2 seconds. Even human player can have good enough reaction to engage cloak right after he sees that enemy fired projectile weapon, so it's not impossible (beams are kind of special case, agreed).

Furthermore, while once per 1.5 seconds seems unrealistically rare for ship being attacked by multiple weapons, how the opponent uses these weapons is also important. AI will start firing right after unphase period. So time you get before you need to re-engage cloak = weapon fire up time (weapons like gauss cannon, but for most it's zero) + shot travel time (not quite zero even for beam weapons as it seems). With average speed projectiles at medium range this approach to phasing already starts to make sense, at long range it simply rules.

Conclusion: right now instant phase/unphase usually beats long usage of cloak both because it allows you to continue firing while phasing and stay immune longer (in terms of total *useful* immunity time). What is also important is the fact that it makes enemy waste flux, while simply staying phased lets them recharge it. Anyway - either precise mechanics behind phase needs an overhaul to make this sort of behavior inefficient or AI needs to build it's tactics around it.

PS1: tested it once more and found that unphase time can't be longer than time you spend phased. So if you have perfect reaction and can afford to phase for 0.1-0.2 sec, you can actually get even better efficiency.

PS2: Of course AI has even more obvious problems with phasing too, like staying phased under missile threat, which could easily be handled by available PD, or Doom inevitably killing itself through overload.

PS3: actually, i kind of remember where i've seen AI doing something close to described here - Paragon's Fortress shield handling. Hmm... I wonder if phase ships could be improved by letting them use variant of this logic instead (of course it needs to modified still, since *anything* is threat to them, while for Paragon it's only situations where incoming fire is too much for shield to handle normally).

Any comments on topic and the above wall of text?:)
« Last Edit: August 06, 2012, 11:14:17 AM by TaLaR »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: AI handling of phase cloak.
« Reply #1 on: August 06, 2012, 11:42:54 AM »

First off - good point about missiles. This is actually already changed in the dev build, and the AI is in general much more capable with the cloak - in particular, when it comes to turning it off when it's not needed.


As to the rest of the analysis, I think it pretty much boils down to "if you can unphase for long enough to make up the flux needed to phase again, it's worth it". One can hardly disagree with that.


The up to 0.5 seconds of no upkeep aren't actually that important because they're overshadowed by the activation cost - for all ships except for the Afflictor (which has been adjusted to have a higher activation cost and a reduced upkeep). So long as the activation cost is at least double the upkeep cost, a longer stint in phase is more efficient than short ones in terms of flux spent per second in phase.
Logged

naufrago

  • Admiral
  • *****
  • Posts: 511
    • View Profile
Re: AI handling of phase cloak.
« Reply #2 on: August 06, 2012, 12:10:08 PM »

The problem with the proposed strategy is when a phase ship is facing a player. My strategy for taking out phase ships quickly and easily is wait for the instant they begin to unphase, then I fire my heavy blasters at them. This causes it to hit them the instant they become tangible and often one-shots the phase frigates.

What this means is, if they use your proposed strategy, I can kill them much more quickly by baiting their first phase with a small weapon, them slamming them with heavy blasters when they unphase almost immediately after. But players have the benefit of being able to learn to predict behaviors. Against the AI, I agree that strategy would be the most effective. Ideally, the phase ship would alternate between the strategies to make it much harder to predict, but with a sufficient reaction time it doesn't really matter. If your suggestion were implemented, I would suggest that the time it spends making the transition from a phased or unphased state be shortened a bit, but not too much or it could be overpowered.

I agree that the way the AI handles phase ships right now is sub-optimal, but they have one thing going for them- do I spend my time hunting it down when I could be shooting other threats? The answer is often no, but that's mostly because phase ships really aren't a big threat. Their arsenals feel somewhat lackluster and their hulls are really fragile. I think the main issue that needs to be addressed is their survivability and possibly their weapons. However, it may be that the reason their arsenal feels lackluster is because they don't really get the chance to get in close, unload their weapons, and back out without dying somewhere in the process.

As for how fragile the phase ships are, it might seem silly to add armor to a high-tech ship, but without its phase cloak activated... armor is all it has. I would suggest the phase frigates' armor should be upgraded to 200 or 225, maybe even 250 to be on par with the lasher. As for the cruiser, I think 1000 would be adequate, but maybe even as high as 1250 to be on par with the Venture. Speaking of the Doom, its cloak upkeep cost seems a bit excessive, so seeing that reduced may not be a bad idea. If they still seem a bit weak after those changes, I think replacing a small slot with a medium on the frigates would be a good idea, and just adding another medium slot (preferably energy) on the Doom.

Since Alex would probably mention that a Doom can beat a Dominator in a simulation already, I think it's important to note that currently the AI tends to back off when it has the advantage and should be pushing forward. I'll run some simulations myself so I can give more specific reasons why a Dominator isn't currently beating a Doom, because I feel that it should be winning easily, and if it doesn't then the reason is probably due to the Dominator's AI behaving sub-optimally.

The up to 0.5 seconds of no upkeep aren't actually that important because they're overshadowed by the activation cost - for all ships except for the Afflictor (which has been adjusted to have a higher activation cost and a reduced upkeep). So long as the activation cost is at least double the upkeep cost, a longer stint in phase is more efficient than short ones in terms of flux spent per second in phase.

It's not just the .5 seconds of no upkeep, it's that most weapons have a travel time and ships won't shoot until they think they can hit you. This actually gives you closer to 1 second of not being in danger of taking damage for the price of one activation cost, which costs the same as 1 second of phase upkeep in most cases. That's part of what makes beam weapons so effective against phase ships. If anything, the activation cost should be steeper (say, 2-3 seconds worth of upkeep) and the upkeep cost cheaper than currently.

EDIT: Changed my mind about the Doom. The Doom itself is fine for the most part. Not really worth the FP, though.
« Last Edit: August 06, 2012, 01:37:10 PM by naufrago »
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: AI handling of phase cloak.
« Reply #3 on: August 06, 2012, 12:42:14 PM »

What this means is, if they use your proposed strategy, I can kill them much more quickly by baiting their first phase with a small weapon, them slamming them with heavy blasters when they unphase almost immediately after.

Actually this also has to do more with AI behavior than underlying phase mechanics - nothing prevents player from stopping unphase process in the middle and immediately phasing back. Though i guess player-as-an-opponent still could somewhat efficiently exploit this pattern, just not in such straightforward way.

It's not just the .5 seconds of no upkeep, it's that most weapons have a travel time and ships won't shoot until they think they can hit you. This actually gives you closer to 1 second of not being in danger of taking damage for the price of one activation cost, which costs the same as 1 second of phase upkeep in most cases. That's part of what makes beam weapons so effective against phase ships. If anything, the activation cost should be steeper (say, 3-5 seconds worth of upkeep) and the upkeep cost cheaper.

Yes, THAT. I actually even recorded small video of how this works out in practice - http://www.youtube.com/watch?v=mMUIxN6ZzMA&feature=youtu.be . 30 seconds of shade sitting in front and within firing range of standard Onslaught, pretty much flux-stable.

I agree, that this approach won't work quite as well against beams, but this fact just means that AI will have to check whether it is within firing range & rotation angle of beam weapons or not.
Logged

Faiter119

  • Admiral
  • *****
  • Posts: 1402
    • View Profile
Re: AI handling of phase cloak.
« Reply #4 on: August 06, 2012, 12:43:35 PM »

Yeah the phase ships need abit of a AI change or buff of some kind, if you look a my thread "Usefull Buffalo Mk-II builds". You can see a build that can beat both the Phase frigates really easily.

It kinda speaks for itself when they get killed by the BuffaloMK2...
Logged

naufrago

  • Admiral
  • *****
  • Posts: 511
    • View Profile
Re: AI handling of phase cloak.
« Reply #5 on: August 06, 2012, 12:56:15 PM »

Yeah the phase ships need abit of a AI change or buff of some kind, if you look a my thread "Usefull Buffalo Mk-II builds". You can see a build that can beat both the Phase frigates really easily.

It kinda speaks for itself when they get killed by the BuffaloMK2...

Well, to be fair, there is/was the issue with the phase ships being paranoid of missiles and staying phased unnecessarily whenever they're near.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: AI handling of phase cloak.
« Reply #6 on: August 06, 2012, 01:12:08 PM »

This actually gives you closer to 1 second of not being in danger of taking damage for the price of one activation cost, which costs the same as 1 second of phase upkeep in most cases. That's part of what makes beam weapons so effective against phase ships. If anything, the activation cost should be steeper (say, 2-3 seconds worth of upkeep) and the upkeep cost cheaper than currently.

I think a more dynamic use of the system is more "fun" (yay, subjective words) - wouldn't want to discourage it that much. As it stands, which approach is better is situational - and that's good.

Yes, THAT. I actually even recorded small video of how this works out in practice - http://www.youtube.com/watch?v=mMUIxN6ZzMA&feature=youtu.be . 30 seconds of shade sitting in front and within firing range of standard Onslaught, pretty much flux-stable.

There's an easier way for the Shade to take no damage vs an Onslaught, though - it could simply stay out of range :) Since you can't do this when you're next to the Onslaught, it's not a problem. It just means that with a phase ship, it's beneficial to stay at the edge of your range, so you have more time to fire after you uncloak. This, again, seems like a good thing - it offers an interesting tradeoff: you can stay farther and be safer/have a longer firing window, or come in closer and have a better shot at landing, say, a torpedo strike.

This does bring up a good point, though - the AI could prefire a bit when it detects a ship coming out of phase, but before it's fully out.


Yeah the phase ships need abit of a AI change or buff of some kind, if you look a my thread "Usefull Buffalo Mk-II builds". You can see a build that can beat both the Phase frigates really easily.

It kinda speaks for itself when they get killed by the BuffaloMK2...

With the new phase cloak AI, it's not so clear cut. However, being essentially a missile boat, the Mk2 does have a better-than-average effectiveness vs phase ships, especially with the ECCM Package hullmod. Again, I don't see anything wrong with that - that's just how phasing works. Phase ships are effective against alpha strikes but wilt under consistent pressure.
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: AI handling of phase cloak.
« Reply #7 on: August 06, 2012, 01:40:29 PM »

I think a more dynamic use of the system is more "fun" (yay, subjective words) - wouldn't want to discourage it that much. As it stands, which approach is better is situational - and that's good.

I also prefer it this way and just want AI to be at least as adequate at using phase cloak, as it is at using shields.

There's an easier way for the Shade to take no damage vs an Onslaught, though - it could simply stay out of range :)

Sure, but if you do it this way you have Onslaught waste time and flux on phase ship that it actually can't do anything about, improving odds for other allied ships around... Which probably speaks more about importance of proper target prioritizing:)

This does bring up a good point, though - the AI could prefire a bit when it detects a ship coming out of phase, but before it's fully out.

At least currently, process of unphasing is interruptible - so it could just stop halfway and phase back (AI doesn't do this now). Might waste some flux in process compared to simply keeping cloak up, but won't get hit and also will shot in process. At least it requires active action from opponent, as opposed to pretty much overloading phase ship by simply pointing guns at it.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: AI handling of phase cloak.
« Reply #8 on: August 06, 2012, 02:27:32 PM »

Sure, but if you do it this way you have Onslaught waste time and flux on phase ship that it actually can't do anything about, improving odds for other allied ships around... Which probably speaks more about importance of proper target prioritizing:)

Yeah, fair point. Although, from what I recall of target prioritizing in the AI, it should go after the larger ships first. In particular capital ships try not to waste their time futilely chasing frigates around. And it works in reverse, too - this phase ship is effectively neutralized as long as it's doing its little phase/unphase dance. Though you'd be right to point out that it's a frigate while the Onslaught is a battleship, so it's a good trade. But then I don't *think* the Onslaught would devote all its firepower to that task. Ahh, theorycrafting :)


At least currently, process of unphasing is interruptible - so it could just stop halfway and phase back (AI doesn't do this now). Might waste some flux in process compared to simply keeping cloak up, but won't get hit and also will shot in process. At least it requires active action from opponent, as opposed to pretty much overloading phase ship by simply pointing guns at it.

Yep - and it'll also use up the "activation cost" of flux again.

Btw: with the new AI, "simply pointing guns at it" won't work.
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: AI handling of phase cloak.
« Reply #9 on: August 07, 2012, 03:09:21 AM »

Seems there are already quite a few changes regarding phasing AI in dev build...
Well, then i'll just have to wait for next version:). Current one sure made noticeable step ahead of previous (especially group vs large ship situation).
Logged