Possible Applications of Specific Durablity, or, Why You Should Care

The first Specific Durability (or SpecDur, as I'll be calling it for now on) thread was criticized for being too abstract and heading nowhere, so in this thread I'll be discussing it in terms of how to apply it to competitive Pokemon.

But first, Disclaimers:
-I realize that I may sound condescending, and I'm sorry if you get that impression. However, bear in mind that whenever I explain something as I would try to explain it to myself, all I see are WTF faces. Maybe it's just the people I know, but generally this is the best way I've found to make myself clear.
-MATH WARNING: THERE IS MATH HERE. (This snide comment has been deleted.)

Now, to business.

I won't re-derive the SpecDur formula again here; if you want to see that bit just read through the first thread and try not to wince at my overwhelmingly condescending tone. Here, I'll be discussing how we can use the formula to better distribute EVs for the pokemon in teams we design, in terms of both offense and defense.

For easier reference, the various versions of SpecDur:
The basic formula is
img2d.png

(Where H, D, and S represent HP, Def, and SpD, respectively)

In terms of EVs and base stats, it becomes
renderl.png

(H, D, and S now represent what the pokemon's base stats would be with 0 EVs)
L stands for however many EVs are required to raise a stat by 1 point (L=4 for lv.100, and about 8 for lv. 50).

While in normal discussion Effort Values and Effort Points may be synonymous, I think it will make things easier here to use Effort Points to refer to the number of points added to a stat from EVs.

Finally, the graphable formula:
img3o.png

(Sorry, but "available defensive EVs" should read "available defensive EPs" because the formula calculates with points, not EVs.)

While this formula's most obvious application is as a more efficient alternative to Overall Harm, because Overall Harm finds the optimum spread numerically, which is not as accurate as an algebraic method.

However, as Larvitar Star pointed out in the last thread, this formula can also be used to optimize attack stats to deliver the most efficient amount of damage for a given metagame. For example, you could figure out the minimum attack stat required for Weavile's Ice Shard to OHKO any Garchomp configuration. On the other hand, the SpecDur formula solves for a combined physical and special attack of a given power, so it would actually be more efficient to just use the damage formula...

Anyway, if this is to reach its full potential of being more efficient than overall harm, we have to derive the algebraic formula that calculates the ideal distribution. There are two ways to do this: one, we could try to differentiate in three dimensions and find the optimum EV spread, or two, because the graph always has the same basic shape we could calculate the transformation caused by changes in H, D, S, and E. I myself am banking on the second approach, because the first seems to generate negative numbers.

Finally, we need to incorporate natures and intimidate and other arbitrary stat changes into the formula. To get really precise, we could adjust the bias on physical or special defense according to the proportions of common physical and special moves in a given metagame, i.e. change numbers depending on whether there are more physical than special moves or vice versa.

I'm hoping people with experience in higher mathematics (read: anyone with a thread in Pokemetrics), especially in optimization, will want to work on this problem because I doubt I could reach a good solution alone. I'm sure there's a simple way to solve this, but I just don't know what it is. Any and all contributions would kick arse.

In conclusion, I'm going to contradict Colin's last post on the closed thread: There is plenty to discuss here, and this concept is far more than a notation. If you want an example of how to "solve a pokemon problem" with this, here it is.

I'm designing an EV spread for the modest Gengar I plan to use in Double Battles. I've already decided on 252 SpA EVs to maximize its exceptional Special Attack and 80 Spe EVs to give it a boost, but not max speed because defense is more important in doubles than singles.

That leaves 178 EVs to distribute among the defenses. But the question is, how to distribute it best? The DefenseEffortValues applet can do that for me, but since it only calculates by guess-and-check-ing it might not stumble upon the best-est configuration. So, I'll use the SpecDur formula above to find the optimum.

What I would do is plug the 0-EV stat values and available EVs into the equation, and get the following formula:
img4i.png

(Sorry again, but the 174 should be 44, because I forgot to divide by 4 to convert to EPs. Just pretend it's a 44, please.)

That's right, I was so unlucky I got a Gengar with 0 IVs and a nature that hinders all stats. Funnily enough, those are the same numbers as on Bulbapedia's listings, but let's just pretend this is possible for the example, okay?

Now, I just plug that into a 3D grapher and see the following graph:
threedee.png

We want to choose EVs according to the X and Y values of "THERE," and Gengar will be optimally defended! Yaaay!

The tough part is finding the formula that points to "THERE." That's what we have yet to do.
 
While this formula's most obvious application is as a more efficient alternative to Overall Harm, because Overall Harm finds the optimum spread numerically, which is not as accurate as an algebraic method.

The search space is discrete, so a brute force search is exact, and it's not possible to get more accurate than it.

About the optimisation problem, you would first find the critical points of the function (points where the gradient vanishes), and then consider the Hessian matrix at each point. If the Hessian matrix at a critical point is negative definite then the function achieves a local maximum at that point. (This result is a special case of Taylor's Theorem in multiple variables.) It's not so bad to work it out for a specific case, but the general case appears tedious.
 
Yeah, taking the grad seems like a better method than a graphical solution, especially since you can take the derivative after your specific numbers are included to collapse to one dimension.
 
First: any calculation which does not calculate the percent physical / special EV spread is going to be inherently flawed. Ubers Blissey has few Def. EVs because Sp. Def is more important in Ubers, and while it can maximize its "overall durability" by maximizing its Physical Defense, it doesn't help its Sp. Defense too much.

Therefore, here is a new formula (based on your calculations) that takes into account a single new variable: P. P is a value between 0 and 1. 0 is pure Defense, and 1 will optimize purely on special defense. Edit, K represents a different value with this formula, it is the value of taking both that Physical and Special hit on successive turns. (ie: with P at .7, it means you take a hit of K * 70% Base Power on turn one, then a hit of 30% * K on turn two). The optimization method should remain the same.

K = DS(H-4) / (PS + D - PD)

With a value of P=0, the formula becomes

K = DS(H-4) / (D)

With P=1, the formula becomes:

K = DS(H-4) / (S)

Derivation of this is trivial based on your work. Add the P variable here: Damage = KP/D + K(1-P)/S + 4. And work forward.

-------------------------

Overall, I'm unsure if this does anything more than XAct's Maximizing EVs Applet. You should message X-Act and ask him how his calculator works.

As far as "Optimization", lets look at this from a Computer Science point of view. As demonstrated by your 3d graph, there is a single, global maxima on that graph. If this is true for all instances, then all you have to do is program a simple greedy rule. If you have say, 200 EVs left, start with all of them in HP. Then check if 196 / 4 / 0 is better. If it is, then check if 192/8 is better. Keep going till you hit the maximum.

Hell, with 510 EVs to be split between 3 catagories, this is a "multiset of size 127, with 3 catagories". There are only 8256 possible combinations of EVs, assuming the maximum number of EVs. Basically, write a program that brute forces the damn thing. There aren't even 9000 combinations of EVs, a computer can easily brute force the solution, probably in less than a second.

EDIT: Ninja'd by Colin. But yes, I agree that a Brute Force solution would be most trivial, and easily within the means of a Computer.
 
Back
Top