MathWing: Comprehensive ship jousting values and more

By MajorJuggler, in X-Wing

I think soontir is one of the few ships that can get by better with stealth than hull (even moreso now with auto thrusters). Jake would also probably fit the bill since he also can get 3 actions.

MajorJuggler, thank you for the time you've put into this! I really like looking at ships objectively rather than subjectively.

I have two questions for you:

1) Is Tarn Mison w/ R7 points efficient?

2) Am I mistaken when I thought you said overall hull is better than stealth device (I thought you said that in a NS podcast). In the TC Aces league, everyone so far has used stealth with Soontir, and I wanted to know if you agree.

I'm not MJ, but I think I can answer these.

(1) Yes, with an asterisk. R7 in combination with free target locks effectively cancels out your opponent's focus or target lock token (that is, mathematically the overall effect is a lot like rolling unmodified dice). From a defensive perspective, Tarn + R7 is one of the most efficient ships in the game.

The asterisk is that for 25 points you have the same offensive capability as a 21-point Rookie Pilot, which many people (including MJ) think is a bad buy. I'd encourage you to put it on the table and find out whether a very defensive X-wing suits your needs or not.

The sub-asterisk is that in my experience opponents deal with Tarn in one of two ways: they might focus all their firepower on him early, which is good because it means he draws fire like Biggs but is much more survivable. They also might ignore him entirely, in which case he's still pretty good but can be at the mercy of the mediocre X-wing dial.

(2) The value of a Stealth Device depends heavily on how long you're likely to have it; for most ships, even at 3 Agility, the risk of losing Stealth early means it's worth less than the consistent benefit of a Hull Upgrade.

But Soontir Fel is a special case, because he's one of the most defensively oriented ships in the game. Even without Autothrusters, if you can find him in your firing arc at all it's not unusual to have to dig through focus/focus/evade to hit him. Autothrusters make him even more consistent on defense, and that means Stealth Device has a uniquely high value for him.

(2) The value of a Stealth Device depends heavily on how long you're likely to have it; for most ships, even at 3 Agility, the risk of losing Stealth early means it's worth less than the consistent benefit of a Hull Upgrade.

But Soontir Fel is a special case, because he's one of the most defensively oriented ships in the game. Even without Autothrusters, if you can find him in your firing arc at all it's not unusual to have to dig through focus/focus/evade to hit him. Autothrusters make him even more consistent on defense, and that means Stealth Device has a uniquely high value for him.

On a PTL Fel with a Focus token and an Evade token defending against two hits, Stealth Device will affect the outcome (i.e. give you value for your investment) ~3.3% of the time up to Range 2, and ~1.2% of the time at Range 3. With Autothrusters, the only purpose of that extra Agi is to potentially keep some tokens.

Against three hits, Stealth Device will affect the outcome ~16.48% of the time up to Range 2, and ~8.24% of the time at Range 3. Autothrusters shift these to the two-hit numbers (~3.3% and ~1.2%).

On the rare occasion that your opponent rolls four hits, Stealth Device will affect the outcome ~27.47% of the time up to Range 2, and ~20.60% of the time at Range 3. Autothrusters shift these to the three-hit numbers (~16.48% and ~8.24%).

While these numbers may make the benefits of stacking Stealth Device with Autothrusters seem minimal, the combination allows for greater flexibility in action choice, positioning, and token use, as well as redundant coverage when caught without the relevant tokens.

Edited by randolph

Tarn Mison's great. Leave him to endgame and he's super tanky with few ships on the board. Try to take him out early and the rest of your squadron is being ignored. Win-win.

MajorJuggler, thank you for the time you've put into this! I really like looking at ships objectively rather than subjectively.

I have two questions for you:

1) Is Tarn Mison w/ R7 points efficient?

2) Am I mistaken when I thought you said overall hull is better than stealth device (I thought you said that in a NS podcast). In the TC Aces league, everyone so far has used stealth with Soontir, and I wanted to know if you agree.

First off, thanks! The short answer is: basically what Vorpal said. My longer answer basically boils down to "I haven't computed these yet", but the supporting rationale is important nonetheless.

1) I don't directly calculate Tarn's efficiency, because his effect is non-linear like C-3PO: it's great for the first defense roll, then does nothing after. (Except for R7 allowing you to gain another Target Lock or move it around, obviously). So in the meantime, you will note that I have placed the value of his ability as 2 points. I don't think it's quite as good as a 3-point ability value like, say, Soontir Fel (we have a very well established baseline that a conditional free action = 3 points), so 2 points is probably about the right value for a first-order approximation without actually getting into the gratuitous math of directly calculating his durability and attack value. If his pilot ability is worth 2 points, then he is probably overcosted by at least 1 point, and likely 2 to be really competitive. He compares slightly better than the generic X-wings, but they are already sub-par to begin with, so that doesn't really say much. The tournament results seem to agree with this - he just doesn't see a lot of use, and you can't blame it on his lack of attack power or durability.

Looking at it backwards, Tarn + R7 costs 25 points, and you basically are looking to get a ship that's straight-up cost efficient at tossing dice around, because he doesn't really have any other tricks. But 25 points is actually a lot - even the mighty TIE Defender is only worth about 24 (Edit: 23) points worth of dice (jousting value) at PS1. So can Tarn hit that magic 25 point target value? Possibly, but there are slightly better options, like even just taking two Z-95 headhunters.

Eventually I may do some more in-depth analysis on Tarn, but it's way on the back burner.

2) Hull is almost always better than Stealth, except for potentially a few corner cases. Soontir Fel with Autothrusters is one such case, and is going to be one of the best uses of Stealth Device in the game. This is probably what you are referring to on Vassal, TCO Aces lists putting Stealth Device on top of AutoThrusters. However I'm still not 100% sold that it is necessarily better than an extra hull - especially with metagame considerations like Vader crew who is going to become more popular in wave 6 for just this very reason.

Incidentally it would only take me a few minutes to update my scripts to find out (I had a whole slew of calculations done for comparing Hull vs Stealth and with R2-F2). The issue is also how to establish the assumptions for the comparison, although again that would probably only take a few more minutes to establish some baseline references (Han + Predator + Gunner; Dash + TL + focus, Rear Admiral + TL, etc).

But, neatly polishing the info and presenting it would take much longer, and the next section in my thesis needs to be written... some Mathwing items are low on the priority, and I'll get around to them when I get around to them. It's not like I'm being paid to do it. ;)

Edited by MajorJuggler

Wait, I thought you were rolling in that sweet, sweet podcasting cash? Don't tell me you blew it all gambling on a single attack roll!

Wait, I thought you were rolling in that sweet, sweet podcasting cash? Don't tell me you blew it all gambling on a single attack roll!

Never play sabacc with Lando unless your name is Han Solo.

I am curious about the probability density formula you used for expected durability. I'd like to calculate what JV or even ship value is left after a ship takes damage or is affected by a change in agility.

This insight could be used to appraise the values of ordnance, think on the margin for damage done by value, and even be made a tool for tracking value throughout a match.

For example, a PS1 Tie Defender at full shields has JV of 23 by your calculations.

(Pjoust=1.91*1.7058, etc.)

Once he has lost his shields, his durability is that of a Tie Fighter (Pjoust=1*1.7058)

From your equations, his JV becomes 16.09--still 70% of the jousting value he had at full strength having lost ~7 JV. At 76.6% joust efficiency, that damage to the shields was worth ~9 points.

Another example, more on the margin, a PS1 E-wing starts with 21.1 JV and 78.3% joust efficiency.

(Pjoust=1.639*1.7058)

After the first point of damage dealt to him, his durability is that of an A-wing (1.336)

His new JV is 18.87, 89% of his joust value still on the table. His loss of 2.23 JV divided by his efficiency makes that first shield point worth 2.84 points.

I don't really know what the calculation is for expected durability for numbers in between (tie fighter left on 1 hull, z-95 without shields, etc.), as I have not put in anywhere near as much work as you have done, and statistical/probability analysis is not what I do all that often :) . Would you mind explaining the formula in more detail?

Edited by zero9300

I am curious about the probability density formula you used for expected durability. I'd like to calculate what JV or even ship value is left after a ship takes damage or is affected by a change in agility.

This insight could be used to appraise the values of ordnance, think on the margin for damage done by value, and even be made a tool for tracking value throughout a match.

For example, a PS1 Tie Defender at full shields has JV of 23 by your calculations.

(Pjoust=1.91*1.7058, etc.)

Once he has lost his shields, his durability is that of a Tie Fighter (Pjoust=1*1.7058)

From your equations, his JV becomes 16.09--still 70% of the jousting value he had at full strength having lost ~7 JV. At 76.6% joust efficiency, that damage to the shields was worth ~9 points.

Another example, more on the margin, a PS1 E-wing starts with 21.1 JV and 78.3% joust efficiency.

(Pjoust=1.639*1.7058)

After the first point of damage dealt to him, his durability is that of an A-wing (1.336)

His new JV is 18.87, 89% of his joust value still on the table. His loss of 2.23 JV divided by his efficiency makes that first shield point worth 2.84 points.

The differential equations used to get the full-health jousting values assume a continuous exchange of fire from the two sides. Calculating partial health jousting value would basically boil down to what you just described: re-run the jousting value again with the lower health value. A Defender without shields has the identical stat line as a TIE Interceptor, which as you pointed out has a jousting value just a hair over 16 points.

Analyzing a one-off attack is fundamentally different since it doesn't deal continuous damage, but rather a one-time damage boost. For starters, you have to look at the damage difference between the expected damage from the secondary attack and the expected damage from a primary attack at the same range with the same action economy.

It's a good idea, I will have to think about it some more. Using the jousting value curve might be a better idea, but now your answer depends on how much health your target has. The simple way to analyze ordnance is to figure out the damage delta and then multiply that by the target ship cost, divided by its hit points. So for example if shooting a TIE with a secondary weapon yields an extra 1 hit of damage on average, then that would be worth 1*12/3 = 4 points. I have some preliminary results using this method that I have not published. This is also much easier to calculate than full jousting values, so I'm a little surprised that nobody else has actually sat down and done this yet.

I don't really know what the calculation is for expected durability for numbers in between (tie fighter left on 1 hull, z-95 without shields, etc.), as I have not put in anywhere near as much work as you have done, and statistical/probability analysis is not what I do all that often :) . Would you mind explaining the formula in more detail?

Strictly speaking everything is already laid out in the third post, so if you are handy with coding and probability, then you could recreate the results from scratch and get the exact same answer. To partially answer your question, it basically boils down to a few steps.

1) Calculated the probability density function for the damage that the ship will suffer from one shot. This depends on the attacker base dice, action economy of both ships, and range bin. You calculate every single possible permutation, and sum them together, with each instance having a unique weighted average (range 2 is more likely than range 1, 3 attack dice is more likely than 4 attack dice, etc). You now have a 6x6 array (# of hits and crits, ranging from 0-5) that sums to 1 (by definition).

2) Using the PDF in #1, we see how many hits it takes to destroy the ship, including the probability of crits that go to hull and become double damage. For extra measure we measure how many crits the ship suffers to its hull that are NOT double damage, and we'll use this in step 3. This approach is still an approximation since it assumes that each shot at the ship is time invariant. A better approach is to set up a set of "salvos" to fire at each ship, representing multiple shots being fired at the ship in the same round. This would provide a more accurate reflection of the action economy (i.e. spending focus on defense). The computing time would be at least a couple orders of magnitude higher for this approach. And more importantly, I don't have the bandwidth to program it now anyway! In any event, step #2 is transforming the per-shot damage PDF into a rounds-to-destroy PDF. It's basically just lots of convolution and checking for probability of damage equal or exceeding the ship hull.

3) Add a small adjustment for critical hits suffered that were not double damage.

4) Take the mean value (I also report the standard deviation divided by the mean in post #3), and then normalize that to a TIE Fighter.

Eventually (as in.... eventually ... don't hold your breath for a few months) I'll make a new thread with graphs showing the actual distributions for each stat line.

Edited by MajorJuggler

he differential equations used to get the full-health jousting values assume a continuous exchange of fire from the two sides...

Eventually (as in.... eventually ... don't hold your breath for a few months) I'll make a new thread with graphs showing the actual distributions for each stat line.

Have you outlined your methods for working out actual durability anywhere? I've looked desultorily but haven't found it, and I don't feel like working them out myself (and no longer have access to MATLAB for an analytical solution or SAS for a brute-force simulation).

he differential equations used to get the full-health jousting values assume a continuous exchange of fire from the two sides...

Eventually (as in.... eventually ... don't hold your breath for a few months) I'll make a new thread with graphs showing the actual distributions for each stat line.

Have you outlined your methods for working out actual durability anywhere? I've looked desultorily but haven't found it, and I don't feel like working them out myself (and no longer have access to MATLAB for an analytical solution or SAS for a brute-force simulation).

See post #109 for the method, and post #3 for the weighted averages (meta assumptions). As stated above, it's essentially just iterative convolution of the PDF from step 1. The biggest advantage with this approach vs calculating durability by average damage based on the defender's agility is that the statistical effect of the final "kill shot" is expressly computed.

The MATLAB code I wrote is not public. I did however make public the method and statistical assumptions used here, so the results can be exactly recreated using your programming language of choice. If you don't feel like working them out yourself, I can't really help you with that part. (Not that I would blame you!) There is obviously a fairly large barrier to entry to doing this stuff correctly. :)

Edited by MajorJuggler

If you don't feel like working them out yourself, I can't really help you with that part. (Not that I would blame you!) There is obviously a fairly large barrier to entry to doing this stuff correctly. :)

Of course you could help me! I can think of any number of ways: hire a full-time nanny for me and my wife, blackmail my diss committee into removing the hurdles they keep placing in my way, or offer to cover my salary indefinitely so I can quit my job and spend 40 hours a week on Mathwing.

No one is going to do any of those things, but procedurally speaking they're not even all that complex. ;)

If you don't feel like working them out yourself, I can't really help you with that part. (Not that I would blame you!) There is obviously a fairly large barrier to entry to doing this stuff correctly. :)

Of course you could help me! I can think of any number of ways: hire a full-time nanny for me and my wife, blackmail my diss committee into removing the hurdles they keep placing in my way, or offer to cover my salary indefinitely so I can quit my job and spend 40 hours a week on Mathwing.

No one is going to do any of those things, but procedurally speaking they're not even all that complex. ;)

Well. You never know, maybe I know "a guy" who can make these sorts of problems just go away. :P

Have you outlined your methods for working out actual durability anywhere? I've looked desultorily but haven't found it, and I don't feel like working them out myself (and no longer have access to MATLAB for an analytical solution or SAS for a brute-force simulation).

I just....

I just want to give you major props for using "desultorily". It's pretty dope to be erudite.

Have you outlined your methods for working out actual durability anywhere? I've looked desultorily but haven't found it, and I don't feel like working them out myself (and no longer have access to MATLAB for an analytical solution or SAS for a brute-force simulation).

I just....

I just want to give you major props for using "desultorily". It's pretty dope to be erudite.

OK, I have to admit, I did in fact have to google that word to be sure....

Analyzing a one-off attack is fundamentally different since it doesn't deal continuous damage, but rather a one-time damage boost. For starters, you have to look at the damage difference between the expected damage from the secondary attack and the expected damage from a primary attack at the same range with the same action economy.

It's a good idea, I will have to think about it some more. Using the jousting value curve might be a better idea, but now your answer depends on how much health your target has. The simple way to analyze ordnance is to figure out the damage delta and then multiply that by the target ship cost, divided by its hit points. So for example if shooting a TIE with a secondary weapon yields an extra 1 hit of damage on average, then that would be worth 1*12/3 = 4 points. I have some preliminary results using this method that I have not published. This is also much easier to calculate than full jousting values, so I'm a little surprised that nobody else has actually sat down and done this yet.

The insight that I am looking for is, "If I put on ordnance, how much additional damage-in joust value-do I inflict for that single attack?" I can calculate how many additional hits I can expect during that attack, but that means little to me if I don't relate it to a value. The 0.43-0.68 additional average damage from proton torpedoes to a decimator from an x-wing or b-wing is certainly not worth 4 points (the simple way says this is ~1-1.5 points, probably depressingly less when using the JV-curve). Maybe 0.97-1.26 against an interceptor is. The simple method is simply unconvincing to me, though.

Moving the calculations to the JV curve, as you say, demands we know the health of the target(and range, agility, focus, etc.). An approach I suggest would be to test for how much JV is decreased by an attack for each level of health the target may have (possibly weighted, but this is already a large quantity of calculation) and find the mean. Do this for the primary weapon (with same action economy) and the ordnance and find the difference in JV removed from the target. Throw a bin of meta-specific targets into this calculation and you can get an idea of the value.

Maybe I am crazy, but I seriously think proton torpedoes, for example, would be fine at 1-2 points, but obviously I need to do the calculations.

I sat down last night and started on some scripts recreating your durability calculations. I have done some of the simple dice math in tables before, but I made a pair of independent PDF functions for attack and defense dice, respectively. Next on the to-do list is making a script that will loop through the PDF functions multiplying the probability of an outcome by its weights (in range, attack dice, attacker/defender having focus/etc.). Probably index those results, as it is not often changing, but going to be used a lot.

hCClMDk.png

Edited by zero9300

Just completed a HitCritPDF() function for damage/critical damage given an agility. Lots of for loops. Tomorrow I will try to convert to the Mean rounds to destroy.

2Bl9oug.png

Edited by zero9300

Just completed a HitCritPDF() function for damage/critical damage given an agility. Lots of for loops. Tomorrow I will try to convert to the Mean rounds to destroy.

2Bl9oug.png

I would check your math, but I'm not sure what your function inputs are. :)

Just completed a HitCritPDF() function for damage/critical damage given an agility. Lots of for loops. Tomorrow I will try to convert to the Mean rounds to destroy.

2Bl9oug.png

I would check your math, but I'm not sure what your function inputs are. :)

I wrote a function that is input a desired damage and critical damage (the rows and columns of the table above) as well as the agility of the defender. The result should be the probability that a shot will inflict that desired damage and critical damage (after canceling attack dice results by defense dice).

For now, I have the "standard" meta assumptions as you have specified in post #3 (range, attacker, focus availability for attacker and defender) inside the function, but they would be easy for me to change if it became interesting enough for me to do so. For now, I am happy with trying to recreate the method.

Does that table not agree with your HitCritPDF array for agility 2 defender and std meta assumptions? I haven't had time to check my math thoroughly so far, mostly I was happy that the resulting table summed to 100%. Looking at the script, again, I realized I did not turn critical results to hits from the HLC case. My remedy is to just duplicate the attackdice function with different math accordingly.

Does this table agree with the array you would have for the probability density function for the damage that an agility 2 ship will suffer from one shot?

0VEZ4hd.png

e: I apologize for bugging you on this, I simply feel the need to unit-test my attempts to make the computer spit numbers at me. :)

Edited by zero9300

After Completing a RoundsToDestroy script, I realized that something may be off. I tested the mean rounds to destroy in comparison with a few ships. The normalized numbers were very close, but not quite equal to your numbers (1.8799 for tie defender, 2.208 for the firespray, 1.17 for x-wing). I still need to add the adjustment to critical damage weight, though.

A pretty picture:

Wqp7aoL.png

I'll check my numbers sometime this afternoon and see how close the exact distribution is to yours.

Remember that I am also allowing for some percentage of HLC shots, which:

A) disregards range for (assume HLC always has a shot), and

B) initial critical hits are immediately converted to hits

Does this table agree with the array you would have for the probability density function for the damage that an agility 2 ship will suffer from one shot?

0VEZ4hd.png

For no defensive rerolls and no autothrusters (I calculate those too for kicks), I get:

34.4399 9.5099 1.6832 0.1304 0.0044 0.0001
18.5538 7.2361 0.9971 0.0537 0.0010 0
14.1586 3.5796 0.3066 0.0079 0 0
6.6287 0.8928 0.0338 0 0 0
1.6353 0.0762 0 0 0 0
0.0712 0 0 0 0 0
Meta assumptions again. These should match what I have in post #3:
AttackMeta{2} = [35 45 10 10]/100; % "standard" meta: [2base 3base 4base HLC]
% attacker action economy used for calculating durability: [no action | focus | Target Lock | Focus + Target Lock]
AttackActionProb = [0.3333 0.4444 0.1111 0.1111]
RerollProb = [0.9 0.1]; % probability of attacker rerolling 1 dice
DefenseFocusProb = [1/2 1/2];
RangeProb = [30 45 20 5]/100; % ranges: [R1 R2 R3 R3+obstruction]
Bingo, I found the discrepancy. I am now using a more in-depth attacker action economy:
First:
AttackActionProb = [0.3333 0.4444 0.1111 0.1111] <---- used in calculations
AttackActionProb = [0.3333 0.6666 0.0000 0.0000] <---- as described in post #3
And also I am using a 10% chance of rerolling 1 die on offense:
RerollProb = [0.9 0.1]; % probability of attacker rerolling 1 dice <---- used in calculations
RerollProb = [1.0 0.0]; % probability of attacker rerolling 1 dice <---- as described in post #3
I just temporarily changed my numbers to as described in post #3. I now get:
36.9607 8.9668 1.3794 0.0908 0.0025 0.0000
19.6074 6.5004 0.7754 0.0353 0.0005 0
14.2057 2.9447 0.2202 0.0048 0 0
6.1566 0.6555 0.0225 0 0 0
1.3641 0.0539 0 0 0 0
0.0526 0 0 0 0 0

Bingo! Now we match.

Congrats, you are the first person to actually check my work! Nobody else has pointed out the discrepancy between the documentation and the results, so I'm assuming you are the first (other) person to go through the process. :)

Here's what I get (with the assumptions you ran) for shots to kill:

100* DurabilityPDF_3_3_0{2} =
[9.3470 18.7668 19.3426 16.2045 12.1966 8.5860 5.7710
3.7489 2.3721 1.4699 0.8954 0.5377 0.3190 0.1874
0.1090 0.0630 0.0361 0.0206 0.0117 0.0066 0.0037
0.0021 0.0012 0.0006 0.0004 0.0002 0.0001 0.0001]

Looking at your picture, I think we have the same thing. It might be off a little depending how you handled HLC.

Ok, now I put the meta assumptions back to the modified ones. Now here's what I get for shots to kill:

100* DurabilityPDF_3_3_0{2} =
[10.9955 20.9160 20.4253 16.2103 11.5572 7.7060
4.9056 3.0181 1.8086 1.0613 0.6123 0.3482
0.1957 0.1088 0.0600 0.0328 0.0178 0.0096
0.0052 0.0028 0.0015 0.0008 0.0004 0.0002
0.0001 0.0001]
I'll update post #3 accordingly to reflect the more advanced attacker approach. Note: when calculating expected damage, I use the simpler action economy for the attacker. You're trying to get the baseline attack value, without any bells and whistles from pilot abilities or EPTs, so only focus vs no focus is the only real choice.

Here's what I get (with the assumptions you ran) for shots to kill:

100* DurabilityPDF_3_3_0{2} =
[9.3470 18.7668 19.3426 16.2045 12.1966 8.5860 5.7710
3.7489 2.3721 1.4699 0.8954 0.5377 0.3190 0.1874
0.1090 0.0630 0.0361 0.0206 0.0117 0.0066 0.0037
0.0021 0.0012 0.0006 0.0004 0.0002 0.0001 0.0001]

Looking at your picture, I think we have the same thing. It might be off a little depending how you handled HLC.

These numbers do in fact match mine, which relieves me of my doubts in the RoundsToDestroy() code. It appears that to make data that would match, I could probably redo my HitCritPDF() function for the more advanced action economy and expect it to work properly.

My functions definitely need some technical refinement before I do a quantity of calculation. I have been writing them in javascript and testing them in a spreadsheet, which is not the best environment for calculation speed but pretty quick for acceptance testing and making pretty pictures of the data.

Yeah, I actually have some tweaks that I could use in my own Matlab scripts. Running the entire script takes around 35 seconds, and most of that is from the durability calculations and arrays that are continuously growing (extremely poor memory performance). Pre-allocating variable memory would speed it up.

New calculations for HitCritPDF including the assumptions in post #122

r0PaILd.png

Calculation speed is starting to get noticeably slow. Probably because the assumptions multiply the number of loops by 4 and some change for reroll calculation. Time to index.

e: Just indexed HitCritPDF and calculation speed is up quite a bit. The shots to kill distribution for the tie fighter matches the one in your post #122. For the critical hit adjustment mentioned in post #3, would you mind elaborating on that? Is it enough to count the (crits on hull)*(probability) and calculate the average damage intake from there?

Edited by zero9300