Thursday, June 4, 2009

Aspir data and observations

Edit (June 5): some attempts at clarification.

What affects the accuracy of dark magic? Skill only? How about potency? How can we describe the distribution of MP absorbed with Aspir? What data are out there to support the prevailing assertions? Finding old Aspir data sets (from 2006) was easy enough, and I also collected some Aspir data on my own.

This may seem like treading old ground if not for the B.S. I cited earlier in the week. At least there is some data you can cite when making an argument now.

Regarding the 2006 data set, the writer (whom I will call "tarblm" for now) collected Aspir data from King Buffalo (lv 79-82) over six trials. Each trial involved only a single buffalo. The data were collected under one of three configurations, all with a Pluto's Staff:
  • "Dark magic skill": +40 dark magic skill (above 269) was the primary factor
  • "MAB": +30 MAB from equipment (relative to control) was the primary factor
  • Control: 269 dark magic skill
The writer also noted the experience gain for each buffalo. The data are presented in a dotplot:


First, the data give the impression that some amount of dark magic skill increases the average MP absorbed, whereas MAB doesn't, confirming previous beliefs. Certainly the maximum Aspirs are higher. Low values of MP drained seem fairly rare and set apart from the rest of the data, so describing the data as coming from a uniform distribution doesn't quite work.

Was "effective" magic accuracy capped on "very tough" buffalo? I would say yes. Otherwise, level difference would have confounded the results. If there is no difference in accuracy across the trials, one could attribute the average to an increase in so-called potency alone.

To try to avoid that uncertainty about capped magic accuracy for my data, I focused my attention on low-level Tunnel Worms and collected 50 Aspir samples for each of the following conditions without a Pluto's Staff:
  • Control: 77 INT, 269 dark magic skill
  • INT: +43 INT above control (120 total)
  • Dark magic skill: +22 dark magic skill above control (291 total)
Since the worms are so low in level, I just assumed my effective magic accuracy was capped. This is a major assumption but a reasonable one given magic skill level. (Correction: I earlier used a level correction argument to make this assumption. It has not been established that level difference affects mobs in the same way that it affects PCs.) The data are illustrated in the following dotplot:


Similar to tarblm's data, some amount of dark magic skill seems to increase the average MP absorbed, although the increase is not statistically significant. As magic accuracy was probably capped in this scenario, it is probably safe to say that dark magic skill would increase potency by a statistically significant amount if I had more dark magic skill to pile on. In terms of the distribution of Aspir, it seems to shift the range of possible values to the right.

INT doesn't seem to cause any change in potency. That is not to say INT doesn't affect accuracy in some way! Low values of MP (here, below 50) were infrequent and I assure you they didn't result from capping total MP. A decrease in accuracy may manifest in a higher frequency of low values, resulting in a lower average if not a shift in the range of possible values.

Note that last time I gave an example of a data set (on FFXIclopedia) that showed INT increased the average Aspir, and I said this was a potency-only effect based on the assumption of capped accuracy. Perhaps there are other confounding factors that were not cited.

Also, data overall give an impression that Pluto's Staff affects potency (one, the 2006 data are more variable, Aspirs achieve higher values despite King Buffalo being 62-72 levels higher than Tunnel Worm).

From all this, it seems reasonable to conclude that
  • Dark magic affects potency (still not sure about magic accuracy attribute, e.g., from equipment)
  • MAB does not affect potency
  • INT does not affect potency but it seems likely to affect accuracy in some way. Do not confuse accuracy with potency. In a sense, increasing one or the other should still increase the average drained up to a point, but the way each does that is different. An analogy to melee attack and melee accuracy should make sense.
  • Magic accuracy probably affects accuracy but not potency, but I haven't found nor collected any data to check this.
You may also have noticed that the maxima and sample means in the 2006 data set are larger than those in the 2009 set. I'm pretty sure the difference can be attributed to Pluto's Staff.

Tuesday, June 2, 2009

Dark magic and INT

This is just going to be a quick and dirty post but may motivate a more enlightened post later, but just to reinforce the ignorance exhibited by the "player base," here's another chuckle-inducing, basically worthless discussion about what affects the accuracy and potency of Aspir. Here's another discussion from idiots talking about "tests" on the potency of Aspir, but where's the fucking data? Here's an obvious question. Did anyone ever actually disentangle accuracy from potency in a controlled experiment? Or how about, if you are at some hypothesized potency cap, why would you expect potency to increase with anything?

I mean, really, assertions like "Accuracy of [Aspir] is most highly affected by Dark Magic Skill, and is not affected by Magic Attack Bonus, or INT" are based on something rather than pointless anecdote, right?

Actually, in the talk discussion of that FFXIclopedia article on Aspir, there seems to be something like a controlled experiment with random sampling, with a RDM75 (200 dark magic skill) casting Aspir on a single worm between level 10 and 12. Assuming that "accuracy" is capped in some sense on such a low-level target, it appears that INT does affect potency (just do a quick two-sample t). Sure, type I error, blah blah, but it's better than total bullshit.

Tuesday, May 26, 2009

pDIF and obsession with polynomial fits

A recent thread on the BG forums about an investigation of "cRatio for two handers" really underscores the ignorance coming out of the "playerbase" that actively chooses to post on forums. To wit:
  • You got some motherfucker implying the "center" of advanced knowledge about game mechanics lay among those who were banned for Salvage duping, when the "center" is actually maybe 10 people at best, and not all are necessarily English-speaking, much less posters on BG.
  • Someone rightly points out that said motherfucker is some obsequious cock-gobbler (ok, those are my terms) since information on pDIF has been outdated since the "2-hander update" (well before the bannings) yet no one has actually bothered to do an honest investigation.
  • Another one actually bothers to collect some data on damage frequency to see what kind of distribution the data follows, but is easily derailed with a fetish for polynomial fitting to the data and data following a normal distribution (polynomial fitting and normality are contradictions as I will discuss soon).
This inexplicable obsession with polynomial fitting and normality is misguided for several reasons:
  • Normal distributions have obvious tails at the extremes. Moreover, the tails are neither too short nor too long. The data do not show evidence of any real tails.
  • Normal distributions are not parameterized by extrema (minimum and maximum). The parameters are the mean (center) and variance (spread).
  • A second-order polynomial fit cannot "account" for tails. This is obvious because normal distributions have inflection points. So you cannot use a polynomial fit and argue for "normality" at the same time.
  • Coefficient of determination can be thought of as a summary of a model fit. It doesn't mean the model is actually good. You can draw a squiggly line through all the data points and that will give you a R2 of 1, but that would be a terrible and useless model. Polynomial fitting is similarly terrible and useless for the above reasons.
  • Why even bother with any kind of fitting? As long as the distribution is symmetrical, at least you know the minimum, maximum, and median (same as mean) for pDIF given some value of cRatio, so you can use an expected value argument for long-run damage.
That said, there were some useful comments about the "shape" of the data. One poster actually suggested the data may follow some trapezoidal distribution. This is actually quite plausible under probability theory!

Obviously, the data do not appear to follow a uniform distribution. Even acknowledging the discreteness of damage (due to rounding) such that the minimum and maximum might be observed rarely, a uniform distribution of pDIF (NOT DAMAGE) is not all that likely. Although we cannot observe the uniform distribution of pDIF directly, we can observe histogram of damage (NOT pDIF). For this histogram, if pDIF were actually uniform, one might see an extreme "discontinuous" jump from the minimum to the minimum plus 1, or from the maximum to the maximum minus 1. In other words, the underlying true distribution of damage (NOT pDIF) would appear to be uniform except at the endpoints.

However, from probability theory, it is known that
  • The sum of two uniform random variables with the same variance (regardless of actual minimum and maximum) follows a triangular distribution
  • The sum of two uniform random variables with different variances follows a trapezoidal distribution (so a triangular distribution can be thought of as a degenerate trapezoidal distribution)
How can I argue that the underlying random component of melee damage could follow a trapezoidal distribution?
  • Does anyone actually expect the "developers" to have done anything particularly fancy with pDIF? In many cases, random number generation is basically "sampling" from a uniform distribution, usually Unif(0,1).
  • If pDIF does follow a uniform distribution (conditional on cRatio) for some ranges of cRatio (I realize this has been shown not to be the case for certain ranges of cRatio), there could easily be another random component to introduce "jitter" into the damage calculation, which would increase the variability of damage output yet keep the mean the same. This would account for the "1.05x correction" on maximum damage I've seen bandied about from time to time.
  • So, there could be an "effective" pDIF that includes jitter.
To illustrate the plausibility of the last two points, I simulated 9,885 realizations of non-critical melee damage given 55 "base damage," with pDIF that follows Unif(1, 1.8) and a "jitter" component that follows Unif(-0.1,0.1). Here, the random components are summed together so that the end result is that the fake data are trapezoidal. I plotted the frequencies and I also drew a nonsense curve through all the data points (in blue).


Yes, this is completely fake and is not meant to demonstrate the truth of anything, but merely the plausibility that pDIF follows (or has followed) a trapezoidal distribution for some values of cRatio. I even put in a second-order polynomial trend line, which has a very high coefficient of determination, which shows that R2 cannot say anything about whether the model is even appropriate. Here, we know it is grossly inappropriate because I know what the underlying probability model is.

Here's the R code for the simulation. Data were exported to Excel. And so goes an hour of my life.

N = 9885
a = trunc(55*(runif(N,min=1,max=1.8)+runif(N,min=-.1,max=.1)))
dmg = seq(min(a),max(a))
N2 = length(dmg)
dmg.counts = numeric(N2)

for (i in 1:N2) {
dmg.counts[i] = length(a[a==(i+min(a)-1)])
}

Saturday, April 25, 2009

Acknowledgement of comments received

Just a brief post acknowledging that I have read two comments made in the past few months when I wasn't doing anything with this blog.

Comments on data table header translations of Lodeguy's data. Technically, I did not really translate anything as I don't know Japanese (I didn't say I was translating anything), barring being able to read katakana, simple phrases and basic kanji.

Comments on my criticism of an alternative analysis of paralyze data. I do not have issues with the original analysis. The secondary analysis I nitpicked past its veneer of soundness. I made this post on a "whim," which kinda goes to show I seek out "fun."

Thursday, April 23, 2009

Expected magic damage in terms of accuracy - more parlor talk

In some sense, having to hoard magic accuracy for so-called high-resist targets when nuking (or enfeebling, etc.) is an all-or-nothing proposition for various reasons I just made up that may incidentally be shared by others. One, these high-resist targets have such high magic "evasion" that it is completely untenable (from experience or whatever) to nuke with the same equipment you would use for Ebony Puddings. Two, even if the target of interest is not quite as resistant as, say, a wyrm or sky god, it can be difficult to ascertain what amount of magic accuracy is acceptable to reach some threshold (say 90% acc.) without personal experience (or the experience of others). Three, compared to mindless melee auto-attacking and WSing, nuking specifically is inefficient from the standpoint of theoretical damage dealt in the "long run" (MP being an important limiting factor), so it seems pragmatic to accept unconditionally the trade-off of lowering maximum magic damage for fewer resists when there is any doubt.

If there comes a time where it is easier to ascertain the magic evasion of any mob of interest (probably never given the FFXI "team's" fetish for making basic game mechanics as opaque as possible, and lack of information sharing among the "playerbase"), perhaps it can be useful to quantify the difference in overall magic damage between a "high-resist" setup (with the purpose of maximizing magic accuracy) and a normal setup for resistant NMs and whatnot. But realistically this is just another parlor talk.

A long time ago, I argued that levels of resistance for a single "nuke" can be modeled by a one-parameter categorical distribution, with the parameter being the probability that a nuke is not resisted at all (full damage). This probability will be called "overall magic accuracy" for the remainder.

To reiterate, the distribution can be described as

no resist: π
1/2 resist: π(1-π)
1/4 resist: π(1-π)2
1/8 resist: (1-π)3

This assertion was based on prior observations by me and others that multinomial count data for nukes, categorized by level of resist, seemed to conform to such a pattern. (I will not discuss the speculated motivation for the programmers to use this model, assuming it is true.) If this is a reliable model, it seems reasonable to think about the effect of overall magic accuracy on magic damage in terms of expected value.

Ignoring rounding, let X be the actual damage of a nuke (subject to being resisted) with unresisted damage D. The expected value of X can be expressed as

E[X] = D[π+0.5π(1-π)+0.25π(1-π)2+0.125(1-π)3]

Based on this expression, overall magic accuracy can be thought of as attenuating the unresisted damage of a single nuke in the long run, multiplying that damage by some factor less than 1 that is a function of π. Therefore, in making some assessment of overall magic damage as a function of magic accuracy, we don't have to consider the actual distribution of resists given π, just as players calculating physical damage don't consider the distribution of pDIF given a ratio of attack to defense.

Just as magic accuracy attenuates unresisted magic damage by some factor less than 1, magic attack bonus (MAB) amplifies magic damage by a factor greater than 1. This is illustrated and summarized with the following graph plotting these factors described (for magic accuracy and magic attack):



As you can see, when "long run" magic damage is considered, there is decreasing return to overall magic accuracy, π (the expected value computed earlier is a third-order polynomial with respect to π), and constant return to MAB. The endpoints also make sense, too. If you happen to have 100 MAB, your overall damage is twice as high. If you happen to have 100% overall magic accuracy (recognizing that this is impossible in FFXI for nukes), then there is no attenuating of your potential magic damage.

Using the model for levels of resistance I described, it is possible and simple to estimate the percent change in long-run magic damage between two equipment setups of interest. Suppose you have a normal setup with +70 MAB such that you know will achieve 60% overall magic accuracy on some target of interest (this means in the long run 60% of your nukes will be unresisted) and you are interested in assessing whether utilizing your "high-resist" setup is worth the tradeoff in potential damage. Suppose your high-resist setup has +63 MAB and +26 more magic accuracy than the normal one.

At this point, there should be no need for quantifying the relative performance increase, but perhaps you want to quantify it anyway.

Since the magic damage "formula" is just multiplying various factors together, it is easy to calculate a percent difference that is independent of base damage, INT, weather effect, etc. (all of which could be considered constant). One needs merely to identify the multiplicative factors associated with MAB (+63 and +70) and m. acc (60% and 86%). Through direct calculation,

(1.63)(0.924757)/[(1.70)(0.752)] - 1 = 0.179

In the "long run," the overall damage using the "high resist" setup will be almost 18% higher than that using the normal one.

Again, is this useful or practical? Not really. But it could serve as a theoretical framework for "theorycrafting" (oh how I hate MMORPG-related jargon).

Tuesday, April 21, 2009

One more time

I am fairly amused that the conclusions from lodeguy's magic accuracy experimentation and my data analysis have been used to support the shibboleth of "320 skill/120 INT" for direct-magic damage (just browsing FFXI forums periodically). Maybe "shibboleth" is too strong a pejorative, since at least this rule of thumb acknowledges that INT contributes to overall magic accuracy (even though this acknowledgment seemed to be supported mainly with anecdotes and collective experience rather than formal data collection).

Should we really care about attaining 120 INT?

As you may recall, lodeguy gave us data that suggest (informally) a critical point for ΔINT (caster's INT minus target's INT) that "connects" two distinct regimes of rate of change of overall magic accuracy with respect to INT. To summarize, before ΔINT +10, the rate of change is estimated to be 1% per 1 INT (actually a little less from statistical significance testing), and between ΔINT +10 and ΔINT +30, 0.5% per 1 INT. I only emphasize this range because there is no data to show what might happen beyond ΔINT +30. (Moreover, there was no data to suggest, as far as I can recall, the effect of INT below 50% overall m. acc. But, realistically speaking, no one is ever going to investigate these issues. This is the best we will ever get, probably.)

With that in mind, it might be interesting to get some sense of whether 120 INT is generally suitable in "endgame" to reach the second ΔINT range with the slower rate of change. To do this, one must compare 120 INT to the INT of various "endgame" mobs.

Regrettably, information about mob INT from English-language sources is either poorly documented (sequestered in obscure FFXI forum posts) or almost non-existent (seriously, does anyone give a fuck about anything other than Ebony Puddings?), and this annoyed me to the point that I attempted to calculate the INT (as well as magic defense bonus, or MDB, and reduction of magic damage taken, or MDT-) of various mobs that I faced over the past few months to get a sense of whether I was surpassing ΔINT +10 most of the time. As I said in the last post, magic damage is deterministic (level of resist is random), so it should be fairly straightforward to calculate mob INT in many cases. Of course, I could have made calculation errors or overlooked level variability for specific mobs. I will leave it to others to verify or refute my calculations.

There isn't much variety in what I do in FFXI, though. All I have is data for mobs in NW Apollyon and those for various ZNMs. First, NW Apollyon:

MonsterINTMDBMDT-
Bardha75
0
0
Pluto82
0
0
Mountain Buffalo
60
0
0
Apollyon Scavenger
620
0
Gorynich72
0
0
Kronprinz Behemoth
74
0
0
Kaiser Behemoth
???
???
???

As you can see, most of the "normal" mobs have low INT so that ΔINT +10 is easily cleared. As for Kaiser Behemoth, I didn't gather enough information, but I am pretty sure it possesses some combination of MDB and MDT- traits. I also collected similar data on some ZNMs I fought several months ago:

MonsterINTMDBMDT-
Lil' Apkallu
60
0
1/4
Verdelet
115
0
0
Experimental Lamia
89
0
1/8
Mahjlaef the Paintorn
1120
1/4

Cheese Hoarder Gigiroon
81
0
0
Vulpangue
78
0.20
0
Dea
62
0
0
Iriz Ima
70
0
0
Gotoh Zha the Redolent
92
0.28
1/8
Tinnin
85
0.20
0
Achamoth
65
0.16
0

Here, MDB is reported in terms of amount above 1.00. MDT- is reported in terms of fractional reduction of magic damage.

Other than Verdelet (an imp) and Mahjlaef the Paintorn (a soulflayer), all of the ZNMs have INT such that ΔINT is well above +10. Therefore, from the standpoint of optimizing overall magic accuracy (given what we know), it seems practical to exchange INT in excess of ΔINT +10 for elemental magic skill or magic accuracy. In particular, this could be useful for Tinnin, which seems to have higher magic resistance than the "lower-tier" ZNMs (probably a result of level difference) despite having "only" 85 INT.

Moreover, there could be some patterns to mob INT despite the limited information available. Beastmen and other "sentient" mob types (particularly soulflayers and imps) could have higher INT in general than other types. Magic users have higher INT in general than non-magic users (I will treat this as self-evident).

But concerning the main question, it appears, at least for most ZNMs that are worth nuking and mobs in NW Apollyon, that ΔINT +10 is surpassed most of the time. If you happen to get close to 120 INT incidentally, that's great, but not necessarily at the expense of possible improvements to magic skill/magic accuracy. For example, Dea has only 62 INT, but it is still prone to resisting Thunder IV (compared to Blizzard IV). Therefore, it would be appropriate to use Sorcerer's Petasos instead of Demon Helm +1 for the sake of improving accuracy.

None of these mobs even have INT above 120, so it's not like you would get much of an improvement to resist rates whoring INT (such that ΔINT +10 is satisfied) compared to whoring magic skill/accuracy (all things being equal).

So what about beastmen "kings" and HNMs? Bahamut ("The Wyrmking Descends") is reported to have 115 INT (from Studio Gobli, if you can actually find the documentation). (Bahamut is sentient, right? Check.) Also Jormungand is reported to have 120 INT (also from Studio Gobli). (Perhaps the example of Jormungand motivated the 120 INT figure?) Other than that, I have no other information.

Anyone can calculate mob INT, but...

... magic defense bonus (MDB) and reduction in magic damage taken (MDT-) can get in the way of calculating INT. These factors may play a role in determining overall magic damage for things like Sarameya and Tyger. Without knowing MDB and MDT- and considering the incessant flooring involved in these calculations, it is somewhat difficult to arrive at a unique set of MDB/MDT-/INT that allows you to calculate magic damage exactly without using formal optimization methods, and I am not interested in doing that.

However, this post offers some very useful facts to determine what exactly a mob's potential MDB or MDT- is. In particular,
  • 1000 Needles is not affected by MDB.
  • Quick Draw is not affected by MDT-.
  • Damage calculations for both are independent of mob INT.
Unfortunately, I don't have access to blue mage or corsair, but these tools would be very useful if I had access to them. Practically speaking, it doesn't seem particularly appropriate to do this kind of testing during "serious" events (how seriously do you take Proto-Ultima?), but your mileage may vary (enough with the cliches!).

Saturday, February 7, 2009

The seed

First, Tarutaru Times Online no longer indexes new blog entries. Second, I have decided to stop writing about FFXI in general, so this blog will not be updated further.

However, I would like to share one last thing that I am looking into at the moment. I am calculating the INT of various "Zeni Notorious Monsters" based on data I've collected over the past few weeks.

Frankly, calculating INT should be a trivial exercise since potential (maximum) magic damage is not a function of a random variable, but I wasted a lot of time looking into the effects of magic defense bonus. Before considering possible MDB, you should first consider reductions in magic damage taken. Most of the time any overall reduction in magic damage is the result of a reduction in magic damage taken, not magic defense bonus. I am not sure to what decimal place the game rounds the ratio of MAB/MDB, either, so I would mess with that only as a last resort. (To the hundredths place? Thousandths?)

To give an example, Apkallus in general appear to take a 25% reduction in magic damage (64/256). Lil' Apkallu, then, also takes a 25% reduction in magic damage. Knowing this, it is easy to confirm what Lil' Apkallu's INT is. Other ZNMs also appear to take a similar magic damage reduction.

As another example, Verdelet does not have any magic damage reduction, so it's even easier to calculate its INT.

However, I will not give out these values as I do not feel particularly compelled anymore to share basic things to a collectively ignorant "playerbase." Fine, not everyone understands basic statistics and probability, but anyone can gather data; it's even easier to gather data automatically with a parser.

Regrettably, the magic damage formula on FFXIclopedia is incorrect in various ways, most critically the application of rounding and the order of factors that contribute to the calculation. Refer to wiki.ffo.jp for the correct expression.