When to use singular abilities: a true test of our X-Wing Statisticians.

By DraconPyrothayan, in X-Wing

Defense is a game of surviving multiple attacks in the best way possible.

However, one of the primary methods of survival in this game is through the use of singular abilities, most notably Focus and Evade tokens, though others abound (C-3P0, R7 Astromech, et c.)

The thesis of this post is that the ideal spending habit of a few certain of these once-per-turn abilities shifts the more attacks you've already weathered.

Example: You should spend your Evade token the first time you have an otherwise uncanceled damage eke through your defenses, as the potential to block a [KABLAM] result that hasn't yet been rolled is insignificant compared to blocking the uncanceled [bOOM] right now.

Example: It is likely a waste for an otherwise undamaged IG-88 to spend their defensive Focus Token to cancel just one [boom] from the first attack of the opposing BBBBZ fleet. However, it's a fairly good decision when countering an attack from the last B-Wing to fire.

So: the Challenge.

Can you write an algorithm for each of these once-per-turn defenders to show their maximized ideal use as the turn progresses, particularly if it involves dynamic differences in expected incoming damage at different spikes (Don't use a focus to dodge Howlrunner when she's boosting some Sigmas later in combat, for instance)

Extra points go to the MathWinger who shows me Tarn+R7's, or C-3P0's, as they both must be activated before you roll any green dice.

Edited by DraconPyrothayan

It sounds like you want to program all the decision making into an AI - where, I think that decision making is part of the game. - when playing offense, Damage now is almost always better than damage later, I'd assume the inverse is true for defense - damage later is better than damage now.

Most defensive token-spending boils down to "spend at the first opportunity". As Ravncat implies, the certainty of avoiding damage now is better than the likelihood of avoiding damage later. (Gunner and similar effects create some corner cases, but those are pretty well known.)

It sounds like you want to program all the decision making into an AI - where, I think that decision making is part of the game. - when playing offense, Damage now is almost always better than damage later, I'd assume the inverse is true for defense - damage later is better than damage now.

I think it is more of an attempt to math wing spending of tokens to survive. However it really isn't that hard.

Focus is better than evade you only take evade if you have no other option or are so worried of rolling all blanks.

When you spend it is when there are a lot of eyeballs up against a lot of hits.

It's actually close to Ravncat's, except that rather than programming an AI, I want to actually articulate the pathing for myself. It's truly a math question, as I was inspired by Numberphile's video on selecting a port-a-john.

Now, as far as the "Use at the first opportunity" goes, I disagree.

Yes, in many match-ups, that will be the advice of the ideal path. However, it's more complex than that.

See, as the number of trials increases, the probability of seeing an example of higher variance increases.

2d7.gif

I'm flying against an 8 TIE Swarm, all of whom are Generic and Focused.

They all have my Biggs, who has also Focused and at his natural 5 hp, at Range 2.

Each TIE Fighter with a Focus token, has a 56.25% chance of coming up with 2 damage.

Biggs dice have a 6.25% chance of coming up FF.

There is a 28.125% chance that one of the 8 attacks I will survive will let me spend my Focus token to prevent 2 damage, instead of just 1.

In fact, here's my pathing forumula for that scenario. A= number of unrevealed attacks.

If (0.03515625)*A ≥ 1/A, then you shouldn't spend your Focus token for only 1 damage.

The split happens between 6 and 5, incidentally, meaning that if facing the above scenario, you should hold onto your Focus token if it would block only 1 damage until there are 5 or fewer TIES yet to attack.

Of course, that assumes an infinitely healthed Biggs who is simply attempting to mitigate as much damage as possible.

If Biggs is fated to survive getting shot by all 8, the above formula will get him through with the most health, which might be 1.

If Biggs is going to die in the encounter, then I've left out a significant variable for maintaining the health of the entire fleet.

Edited by DraconPyrothayan

Just really liked your comment because:

BILL BILL BILL BILL BILL BILL BILL NYE THE SCIENCE GUY!

You always spend the evade token at first opportunity.

That's the math.

You always spend the evade token at first opportunity.

That's the math.

Eh.

There's a point for an infinitely hulled ship to prefer spending it on a Crit than on a Hit to the point of refusing to spend, but that also requires factoring in the likelihood of crit generation, the percentage of just how more effective a Crit is than a Hit, and probably more attackers than can be fielded.

But I'm inclined to think you're absolutely right :)

I'd add the caveat of "Unless a pilot of lower skill has Greedo"

The only thing is, how do you know if any of the other models from the bbbbz will fire at you, you might let 1 damage through and then no one else shoots at you, thus you have wasted the token.

Obviously if there is only 1 possible target fine, but that not always the case.

Anyway, Good Luck.

You always spend the evade token at first opportunity.

That's the math.

I beg to differ. I've had many situations involving spend token vs not spending token which have been very difficult to decide. Consider an A-wing with PtL and SD which turtles up with Focus+Evade and faces an attack from a ship with Gunner. Take three hits and roll focus, evade, blank, blank. Spend the tokens to save the SD and take another attack while you are unable to modify your dice or do you save the focus, take one hit and lose the SD? This and similar scenarios with even more ships involved can get a bit complex from time to time.

I agree with narcoleptic. The most simple example I can think of to not always use tokens at the first given opportunity is Millenium Falcon with an Evade token facing a shot from an Ion Cannon with three hits.

I would say I consider spending my tokens as soon as possible as a rule of thumb, but there's too many exceptions to say 'always'.

Evade you will almost certainly want to spend at the first opportunity. Focus is more complicated for high agility ships because you can potentially mitigate more damage.

I have scripts that can calculate this pretty easily, but I will have to add it to the very long backlog of stuff to look at later.

Unless you have a crystal ball the evade token has a 100% chance of being useful now and a less than 100% chance later. If you're playing mathwing, and therefore only looking at the percentages (as was requested by the op) then the choice is always clear.

If you don't spend it early you may not get to spend it a all later.

I looked at putting 'chance to spend token' in my xwingdice.com script, but found that it doesn't always get to the nuances that would go into a real decision (and it's only a percent chance that spending the token was needed to produce a particular result - though it will shot off the 'extreme' situations where even with spending a token you're still an near sure chance to miss).

I think this question suffers the same thing that lots of other mathwing questions to: the variables cannot be totally made generic into a one-shot algorithm. You have to use logic to make decisions to determine the odds. Sure, the odds can be determined for a single situation - but making something generic is near impossible to do with simple combinations.

I always weigh whats coming... ie I rarely spend the evade if theres another ship firing and the first one didn't land a crit. If a crit is about to land? I absolutely spend it. That crit is probably my only hard-fast criteria. That's a no brainer.

Its so highly situational, I don't know that there would be something a non-mathematician could come up with because of all the variables: Crits, number of possible future attackers, surviveability of ship, agility of ship, other tokens, asteroids, etc.

I would dare say that probably only Chewie would absolutely spend it no matter what. Cause crits don't matter :)

Edited by jonnyd

This is reminding me of the the "is it better to split using TL and Focus tokens over two attacks instead of using both on one attack and making an unmodified attack?" question from a little while ago. There may be an 'average' answer to give at the beginning but the truth is that you really don't know until after the first attack has been rolled. Spending your defensive tokens will run into the same kinds of problems of so many variables.

...

I'm flying against an 8 TIE Swarm, all of whom are Generic and Focused.

They all have my Biggs, who has also Focused and at his natural 5 hp, at Range 2.

Each TIE Fighter with a Focus token, has a 56.25% chance of coming up with 2 damage.

Biggs dice have a 6.25% chance of coming up FF.

There is a 28.125% chance that one of the 8 attacks I will survive will let me spend my Focus token to prevent 2 damage, instead of just 1.

In fact, here's my pathing forumula for that scenario. A= number of unrevealed attacks.

If (0.03515625)*A ≥ 1/A, then you shouldn't spend your Focus token for only 1 damage.

The split happens between 6 and 5, incidentally, meaning that if facing the above scenario, you should hold onto your Focus token if it would block only 1 damage until there are 5 or fewer TIES yet to attack.

Of course, that assumes an infinitely healthed Biggs who is simply attempting to mitigate as much damage as possible.

If Biggs is fated to survive getting shot by all 8, the above formula will get him through with the most health, which might be 1.

If Biggs is going to die in the encounter, then I've left out a significant variable for maintaining the health of the entire fleet.

I look at this formula and start thinking 'how often am I going to see eight ships shooting at me so I can hold off on using Focus while the first three attack me?" Don't forget you've had three opportunities to see the [eye] [eye] defense combo but if the attack only has a single [(ka)boom] during that time wouldn't it change spending the focus. Maybe waiting can give a bigger payout but can you always afford to wait for that payout or do you need to go now.

I guess if I were looking at a situation to question I'd pick on Fat Han getting shot at by four or five TIE fighters and trying to decide when you use C-3PO and the Evade token from the Falcon. Here a good argument could be to hold on to those things when the first couple TIEs attack and you would have shield tokens to protect you from any [crit] results. One the [crit] results become a threat then spending may become automatic but when initially being shot at you do run the risk of holding out too long and ending the round with neither being used effectively if those last TIEs shoot poorly.

Granted you want to know the numbers involved but there are so many other factors involved. It's as much a mental game as anything else; knowing your opponent. What if leaving that evade token on your ship keeps the other player from attacking you as he's afraid he'll miss and waste the shot? Or what if he's trying to drop your shields with early hits in the round to do big damage with crits from another ship.

I'm sure you could write a formula if the battle was static. You're defending the same attacks from the same ships every round. But then again the randomness of the dice roll would come into play. So you'd have factor in the chance for every possible die roll, which would be exponentially huge.

I'm sure you could write a formula if the battle was static. You're defending the same attacks from the same ships every round. But then again the randomness of the dice roll would come into play. So you'd have factor in the chance for every possible die roll, which would be exponentially huge.

All possible die rolls converge to far fewer possible output states though. I'm already doing this as part of my scripts, I have a multi-attack damage PDF calculator already programmed, where the defender has an arbitrary number of focus tokens (and stealth for that matter) that he can burn through.

So I actually have a script that does this. It calculates recursively, so it's rather bad for other reasons (even if it's optimized to save some of the calculation in order not to redo them).

Basically I can input a number of attackers, along with number of dice and probability for each dice to be a hit (0.5 for unmodified, 0.75 for focus, 15/16 for TL+focus). Additionally, If I haven't put TL I can put a "reroll_one" option for some of the attacks (mimicking Howlrunner). For the defender, I have number of shields, hull, evade tokens and focus tokens. The crits have 8/33 chance of an extra damage (7 Direct Hits + 2 Minor Explosion with 50% chance), not interested in the rest.

What I have found is that while defending with 2-3 dice, you spend the evade immediately and spend the focus whenever you have a single focus symbol (if it helps, of course). Intuitively it's almost never worth it to wait for two focus because a) the attacker might not get through anyway b) you might not get more focus symbols than you already have. Even if you're expecting a large attack at the end (let's say 3 attacks of 2 dice and 1 attack of 4 dice), it's still not worth it.

Now factoring in Gunner is more difficult, and I haven't attempted that yet.

Ions, Flechette Cannons, crits, and gunner would be the only things I can think of preventing you from spending an evade token right away. I've actually used a Gold w/ ICT as a way to push extra damage through because they'd rather save the evade for the PS2 Ion attack than use it on a normal attack. Then you can either just ion someone else, or you can still push the ion through and the defender is left with an unused token. That could be considered sub-optimal play, but I can also see it as the better move to make, that just happened to back fire.

And then there are game scenarios that affect your decisions to be more/less aggressive. For example, I was at a SC where it was down to 2h1s Tycho vs. 6 hull Chewy w/ MF, C3PO, and Gunner. Normally Tycho wouldn't want to get into R1, as those 4 dice are frightening. However with C3PO and the title, he's forced to do so in order to get damage through at a max of 1 per turn. And then normally he would want to just eat 1 damage and be happy with that. But knowing that at that rate, I would lose, I had to play the odds and hope that unmodified 4 dice attacks weren't going to push through my 3 agility, even with gunner. So, I F+E with my actions, and forced gunner, even if it meant I was tokenless. I ended up doing 4 damage before I died. I took 1 shield from an initial attack, and then the two hull came off of a gunner triggered shot for the game.

While math would tell me that it was bound to happen (which it did) there was an outside chance of it not happening, and therefore I could potentially win from doing that. Whereas staying out of R1 and/or taking 1 damage to prevent the gunner trigger, would 100% mean I lose.