Elitist Jerks [Math] Stat Equivalence and Taylor Series

 01/04/08, 5:15 PM #16 Muphrid Don Flamenco   Muphrid Gnome Mage   Stormrage The loss of LaTeX would just take all the wind out of it, though.
 01/04/08, 5:29 PM #17 BaelehShmot Glass Joe     BaelehShmot Human Mage   Moonrunner When doing this type of analysis you should mention that higher order derivatives can be ignored if they are much smaller than lower order derivatives (e.g. a factor of ten). If this is not true then your Taylor's analysis is woefully wrong.
01/04/08, 5:53 PM   #18
Muphrid
Don Flamenco

Gnome Mage

Stormrage
 Originally Posted by BaelehShmot When doing this type of analysis you should mention that higher order derivatives can be ignored if they are much smaller than lower order derivatives (e.g. a factor of ten). If this is not true then your Taylor's analysis is woefully wrong.
I did note that usually the higher-order derivatives are negligible. I wasn't aware that a factor of 10 would be a good rule of thumb, though, thanks.

01/04/08, 7:33 PM   #19
PSGarak
Bald Bull

Hyjal
 Originally Posted by Muphrid The ratio is just $\frac{b}{c}$ or its inverse. How is "just taking partial derivatives" different from the Taylor series as a whole?
That's what I was asking you. Your explanation has a lot to do with, e.g., matrices of operators which seems like a lot of extra work to go through if the result is just as simple as taking the first partials with respect to damage and crit. Partial derivates are incredibly easy to perform and understand; multivariable taylor series seems like a lot of extra theoretical and computational work. Multivariable calculus isn't my specialty so I'm wondering if there is any (or any important) information that is being lost, either in general or in this specific example, by avoiding that whole discussion on Taylor series and simply saying "now we use calculus to see how your damage changes with crit." And, if there is extra information there, does it really matter? Since all we're looking at is how your damage is affected by extra stat points, which on the surface would seem to be the first partials, without anything to do with Taylor series in general.
 Originally Posted by Muphrid I would be highly, highly surprised if Blizzard had anything remotely resembling exponential growth or decay in any of their mechanics. They don't seem to be that smart.
Well not on purpose, I mean by accident. [Darkmoon Card: Wrath], for example, is written using entirely additive properties but it's affect on crit is a geometric series and its affect on, for example, ISB uptime could very well end up being exponential decay if there isn't a stack limit. As another example, crit on a warrior gives flurry, both of which give rage allowing more specials which have further chance to crit. I don't know if that's a high-order polynomial or an exponential function, but the point is that without intending to their simplistically-designed primary effects can have more complex behavoirs.
On the other hand some of them also have simpler solutions. For example, re: aff warlock nuke measure mentioned above, is not a differential function, it's a recurence relation with a pretty simple closed-form solution. It does happen to be a fraction of various intermediate variables so it might be a bitch to derivate but the stated form isn't as hard.

(Without having tried) I actually don't think that modelling most classes is honestly that hard, except for hidden cooldowns (boooo enh shamans). For example a fire mage 8-1 cycle is just a weighted average of two of your equations above with different numbers, which will probably result in just another equation of the same form with different numbers. The harder ones are piecewise functions, like what a warrior does with more rage as they start butting up against cooldowns. And if all you need are first partials the derivatives are cake.

I was honestly expecting a lot more symbolic computation when I first came to these boards and I was really dissapointed when I found a bunch of brute-force spreadsheets and no calculus =P. Apparently I'm lonelier than I originally anticipated in seeing scaling information easier with raw equations than numerical tables.

01/04/08, 7:49 PM   #20
• Aldriana
Mike Tyson

Night Elf Rogue

Doomhammer
 Originally Posted by PSGarak That's what I was asking you. Your explanation has a lot to do with, e.g., matrices of operators which seems like a lot of extra work to go through if the result is just as simple as taking the first partials with respect to damage and crit. Partial derivates are incredibly easy to perform and understand; multivariable taylor series seems like a lot of extra theoretical and computational work. Multivariable calculus isn't my specialty so I'm wondering if there is any (or any important) information that is being lost, either in general or in this specific example, by avoiding that whole discussion on Taylor series and simply saying "now we use calculus to see how your damage changes with crit." And, if there is extra information there, does it really matter? Since all we're looking at is how your damage is affected by extra stat points, which on the surface would seem to be the first partials, without anything to do with Taylor series in general.
Honestly, that was my first thought when reading this thread as well. I mean, it all looks very impressive and is an admirable display of rigor; but I don't see it really allows us to do anything that we weren't already doing. I suppose it does tell us how to get more accurate models by adding higher derivatives, but most of these functions are either trivial and adequately described by the first order approximation, or so insanely messy that taking a 2nd derivative is impractical and not necessarily particularly more accurate anyway.

I'm not trying to be critical, but I guess I'm failing to see the advantage of looking at it in this way.

01/04/08, 8:00 PM   #21
Muphrid
Don Flamenco

Gnome Mage

Stormrage
 Originally Posted by PSGarak That's what I was asking you. Your explanation has a lot to do with, e.g., matrices of operators which seems like a lot of extra work to go through if the result is just as simple as taking the first partials with respect to damage and crit. Partial derivates are incredibly easy to perform and understand; multivariable taylor series seems like a lot of extra theoretical and computational work. Multivariable calculus isn't my specialty so I'm wondering if there is any (or any important) information that is being lost, either in general or in this specific example, by avoiding that whole discussion on Taylor series and simply saying "now we use calculus to see how your damage changes with crit." And, if there is extra information there, does it really matter? Since all we're looking at is how your damage is affected by extra stat points, which on the surface would seem to be the first partials, without anything to do with Taylor series in general.
For individual stats, in this particular example, all the non-mixed second partials are zero, so no, there is no lost information in this particular example. In other words, the Taylor series simply terminates after the first-order term.

For any combination of stats, however, and for certain stats (again, agility, resilience, and shadow damage with Imp. Shadow Bolt dependence on crit), the second (and perhaps subsequent) partials are non-zero.

Really, a Taylor series is only comprised of a few parts: the relevant partial derivative, the 1/n! factor that is derived from combinatorics, and some mixture of the elements of ∆u.

In the past, I've used many ways to try to calculate ∆E for given values of ∆u. Simple algebra works great, even with the complications involved when you correct the model for resilience. Integrating the gradient over path works well enough (a play on the fundamental theorem of calculus). Using a Taylor series also works. These are all equivalent methods of calculating the 100% correct symbolic answer.

However, what using a Taylor series does is give you a very quick linear approximation: you just chop off all terms higher than second-order.

 Well not on purpose, I mean by accident. [Darkmoon Card: Wrath], for example, is written using entirely additive properties but it's affect on crit is a geometric series and its affect on, for example, ISB uptime could very well end up being exponential decay if there isn't a stack limit. As another example, crit on a warrior gives flurry, both of which give rage allowing more specials which have further chance to crit. I don't know if that's a high-order polynomial or an exponential function, but the point is that without intending to their simplistically-designed primary effects can have more complex behavoirs.
I wouldn't say the Wrath card's effects are geometric: it operates on a simple principle of adding crit chance.

What really saddens me is that the type of functions we're dealing with--whether they're exponential, polynomial, or otherwise--is never immediately obvious. It never is with Blizzard.

 On the other hand some of them also have simpler solutions. For example, re: aff warlock nuke measure mentioned above, is not a differential function, it's a recurence relation with a pretty simple closed-form solution. It does happen to be a fraction of various intermediate variables so it might be a bitch to derivate but the stated form isn't as hard. (Without having tried) I actually don't think that modelling most classes is honestly that hard, except for hidden cooldowns (boooo enh shamans). For example a fire mage 8-1 cycle is just a weighted average of two of your equations above with different numbers, which will probably result in just another equation of the same form with different numbers. The harder ones are piecewise functions, like what a warrior does with more rage as they start butting up against cooldowns. And if all you need are first partials the derivatives are cake.
For the most part, I don't think there is a whole lot of difficulty deriving close-form expressions for modeling purposes once given conclusive data and knowledge of how the mechanics work. The problem is that we don't know how all mechanics work and some of the testing required to determine how they work is quite, well, ridiculous.

One thing I would mention, however, is combustion. Trying to model the average benefit of combustion has eluded me, mostly because of the interaction with the cap. At present, most mage theorycrafters I know use a model derived from a simulation.

 I was honestly expecting a lot more symbolic computation when I first came to these boards and I was really dissapointed when I found a bunch of brute-force spreadsheets and no calculus =P. Apparently I'm lonelier than I originally anticipated in seeing scaling information easier with raw equations than numerical tables.
No kidding. I only learned yesterday that the board supported LaTeX; it was that that allowed me to make this post (which I had planned for some time, just for a loss as to where best to put it).

 01/04/08, 8:24 PM #22 galzohar Bald Bull   Galzohar Blood Elf Paladin   Darksorrow (EU) The fact is, in practice, for a realistic increase of 1 stat (from say, 1 item upgrade or some well-fed buff), has an extremely small effect on the value of other stats that you can just ignore it. For example if you go to lieuler's spreadsheet, look at the extra dps increase from 10 spell dmg, then the extra dps increase from 10 crit rating, then the dps increase from both 10 dmg and 10 crit rating, you'll see a negligible difference between adding the "benefit from 10 dmg" with the "benefit from 10 crit rating" to what you actually get on the spreadsheet by adding both. That's again, becuase a small change of stats simply doesn't have any even nearly-meaningful effects on the value of stats. You need quite a big change of stats for the value of stats to actually change, in which case you just go to the spreadsheet again and enter your new stats. In reality those kinds of changes happen once in a long time considering the rate at which you get raiding upgrades.
01/04/08, 8:46 PM   #23
Disquette
doop doop de doooo

Human Rogue

Sargeras
 Originally Posted by Muphrid For the most part, I don't think there is a whole lot of difficulty deriving close-form expressions for modeling purposes once given conclusive data and knowledge of how the mechanics work.
So you haven't looked at enhancement shaman mechanics, I can tell. Each time someone has talked about making closed form expressions for class dps, and how easy it would be, they have been stumped on Enhance shaman mechanics. Tornhoof has a pretty good version at this point, I think. But we have no way to test to see how accurate it is. Blizzard should give us target dummies that act like raid level bosses, imo.

 The problem is that we don't know how all mechanics work and some of the testing required to determine how they work is quite, well, ridiculous.
Absolutely true.

Or, we know how the mechanics work, and they're dumb. Expertise, for instance.

Let's say I know the partial derivative of Dd/De (damage with respect to expertise). For enhance shaman, by the way, this is an incredibly hard derivative to find, but pretend it were easy. Since blizzard has made expertise only useful when a multiple of 4 expertise rating is achieved, you now have to express Dd/De as a function of your currently level of expertise.

If I have to choose between using an item with 11 expertise rating and 0 attack power, or one with 28 attack power and 0 expertise rating, I can't do so without knowing my current expertise rating. For these purposes, assume that without this stair step insanity that Blizzard uses, 3AP = 1 Expertise rating, which is about right for Enhance Shaman).

If I currently have 0 expertise rating, then the first item would only give me 8 expertise rating worth (since any expertise rating that doesn't get me to a multiple of 4 is wasted). So, my choices are:

8 e.rating x 3gear-goodness/e.rating = 24 gear goodness
compared to
26 AP x 1 gear-goodness/ap = 26 gear goodness.

Aha! I should pick the second item, as it's a clear winner.

But wait, if I already have 5 expertise rating... well now 5 + 11 = 16, which is evenly divisible by four, so all 11 points of expertise rating on the item are providing benefit. The equations change!

11 e.rating x 3gear-goodness/e.rating = 33 gear goodness
compared to
28 AP x 1 gear-goodness/ap = 28 gear goodness.

Aha! I should pick the first item, as it's a clear winner.

/facepalm

Why Blizzard would do this is a mystery.

http://us.battle.net/wow/en/forum/to...6766?page=3#41
Let me map a priority list out for you so that you can refer to it in the future:
1. Money 2. Money 3. PvE 4. Mages 5. Companion pets 6. PvP

01/04/08, 8:53 PM   #24
Hamlet
<Druid Trainer>

Tauren Druid

Mal'Ganis
 Originally Posted by Muphrid For individual stats, in this particular example, all the non-mixed second partials are zero, so no, there is no lost information in this particular example. In other words, the Taylor series simply terminates after the first-order term. For any combination of stats, however, and for certain stats (again, agility, resilience, and shadow damage with Imp. Shadow Bolt dependence on crit), the second (and perhaps subsequent) partials are non-zero.
Yeah, Mage isn't the greatest example here, since essentially everything is linear. On the other hand, it's actually simple enough to model, and since this is just about mathematical fun anyway, I guess that makes it the best candidate to mess around with.

Int has a slight quadratic term for deep Arcane, I guess.

If the main goal is to get people to properly think more in terms of marginal DPS per stat, maybe a nice post just explaining things at the linear level would be nice.

Also, you might be interested in this:
http://elitistjerks.com/f31/t14250-m...ell_selection/

 01/04/08, 10:06 PM #25 PSGarak Bald Bull     Garak Undead Warlock   Hyjal Aha, I see what you're doing. You're using the first Taylor term (the first partials) as an approximation of the change with respect to an arbitrary change in statistics across all of $\vec{u}$. It's the Taylor series itself that loses information compared to other methods of multivariable differentiation. I for some reason thought the Taylor series was exact and the first partials were an approximation of it. Combustion and darkmoon wrath are almost the same effect. The part that's a geometric series is the average crit chance it gives, because the benefit it gives affects the chance of it getting consumed. Combustion is more convoluted because it's three crits rather than one, making it a maddening mess of inclusion-exclusion terms. Disquette: how much of shaman calculational bullcrap comes down to the windfury cooldown? That seems like about the only thing that would hard, except that the amount of hard that it is overshadows about anything else I've seen in the game and it's fundamental to just about every part of their DPS (eg UR uptime). Also, re: two-cycle theorem, I realized (after learning the relevent mathematics) that the theorem is only valid if you allow fractional cycles (eg 20 and 2/3 8xfireball 1xscorch cycles). If you're looking for whole cycles it's an integer program instead of a linear program, so the optimal point may be nowhere near any vertex (much less the linearly optimal one). Nuts to that. It also becomes $\mathbb{NP}$-complete to compute.
 01/04/08, 11:23 PM #26 galzohar Bald Bull   Galzohar Blood Elf Paladin   Darksorrow (EU) Isn't a geometric series defined as having a fixed chance for each roll to succeed? So while darkmoon card: wrath with any reasonable crit rate can be more or less approximated as a geometric series (as in, the extra crit doesn't change a lot when it stacks up so the chance for it to fall off is more or less the same, giving you a good general idea of how horrible it is so you don't need to bother with more accurate calculations), combustion changes the crit chance by a LOT (not rare to stack it up to 100% crit), which makes it very different from a geometric series. I've yet to figure out a way to take combustion into account mathematically (aka no simulator) other than simply calculating the average number of crits out of casts by calculating the chance to get 3 crits, 4 crits etc up to having all spells crit - and afterwards doing the same calculation without combustion (which would be easy of course) to see the difference.
01/04/08, 11:42 PM   #27
Disquette
doop doop de doooo

Human Rogue

Sargeras
 Originally Posted by PSGarak Disquette: how much of shaman calculational bullcrap comes down to the windfury cooldown? That seems like about the only thing that would hard, except that the amount of hard that it is overshadows about anything else I've seen in the game and it's fundamental to just about every part of their DPS (eg UR uptime).
All of the problematic math that is shaman specific is because of the windfury cooldown, I believe (I can't think of anything else that causes a math problem). But, as you say, it's intrinsic to every aspect of the damage we do.

The other parts that are difficult result from stuff like dumb game mechanics (expertise rating) or unknown true mechanics (how flurry works, proc rates of items, how exactly does the two-roll attack table work for yellow attacks).

http://us.battle.net/wow/en/forum/to...6766?page=3#41
Let me map a priority list out for you so that you can refer to it in the future:
1. Money 2. Money 3. PvE 4. Mages 5. Companion pets 6. PvP

01/04/08, 11:52 PM   #28
Torael_7
Piston Honda

Orc Rogue

Mal'Ganis
 Originally Posted by PSGarak (Without having tried) I actually don't think that modelling most classes is honestly that hard, except for hidden cooldowns (boooo enh shamans). For example a fire mage 8-1 cycle is just a weighted average of two of your equations above with different numbers, which will probably result in just another equation of the same form with different numbers. The harder ones are piecewise functions, like what a warrior does with more rage as they start butting up against cooldowns. And if all you need are first partials the derivatives are cake. I was honestly expecting a lot more symbolic computation when I first came to these boards and I was really dissapointed when I found a bunch of brute-force spreadsheets and no calculus =P. Apparently I'm lonelier than I originally anticipated in seeing scaling information easier with raw equations than numerical tables.
I would imagine that you could very easily account for any cooldown - internal or otherwise - could be modeled with the aide of a heavyside function.

I don't really see why you'd expect a bunch of calculus when a brute-force spreadsheet does the job just as well and anyone with a basic understanding of Excel can use one, though.

 01/05/08, 12:25 AM #29 PSGarak Bald Bull     Garak Undead Warlock   Hyjal Because brute-force spreadsheets take longer for me to come up with than calculus equations, and because they generally don't do the job just as well. The provide numerical evaluations at specific points, which don't particularly help to see the underlying dependence, especially when there are multiple variables being depended on. They also don't provide anything but the barest hint of "why" one number varies with another in the manner it does. I suppose it's a different expectation of the word "theory" too, meaning I associate theory with equations rather than numbers. Yes, the probability distribution as a function of time can be modeled as a shifted heavyside function times a geometric distribution, but heavyside functions are discontinuous functions defined as either limits of series of analytic functions or piecewise analytic functions, so that doesn't make them actually easy to work with. Plus, the starting point of one depends on the evaulation of the previous one so the second+ windfury proc is no longer strictly heavyside (although in a Markov fashion). So a single windfury proc is an easy step function, but everything else's dependence on windfury (including the frequency of future windfury procs because of flurry) gets maddeningly complicated very fast. I'm not even sure it's tractable to dynamic programming (which at least Affliction spec is, which is also really hard to get exact). As a general rule of thumb, heavyside functions are only nice to work with when you're doing (continuous) Fourier transforms. Markov chains, not so much.
 01/05/08, 12:28 AM #30 glowacks Piston Honda   Razzishi Troll Shaman   Ravencrest I did a decent amount of my own multi-variable analysis of the mage damage function with the only variables being crit and damage. With a consistent talent build and base damage values, there were numbers in place of the variables other than hit and crit in your final equation. That stuff just took 3rd semester calculus to calculate, and even adding in haste or other variables into the calculation would not really change things other than the computational complexity. I abandoned work on it when I found that people had developed detailed spreadsheets for calculating damage directly instead of goign through symbolic analysis. The problem with analyzing other variables is such a rigorous manner is that the gains you would gain from it you would potentially lose because you're basically assuming differentiability to the non-differentiable step-functions that arise in the game. When it comes down to it, all that matters is a proper model of your classes damage and an ability to input all your possible gear and buffs into that model and see what comes out the best. The fact that spreadsheets might list partial derivatives at the current gear state is only to help guide decisions when the spreadsheet doesn't have everything available. The power of calculus in the real world is to approximate solutions where direct calculation is unappealing; if we can use a straightforward "brute force" model that approximates things just as well as an analytical model and can calculate it just as easily, there's no point to the extended analysis.

 Elitist Jerks [Math] Stat Equivalence and Taylor Series