PDA

View Full Version : pDif and damage



Motenten
12-05-2011, 06:33 PM
Reference existing thread: http://www.bluegartr.com/threads/87774-pDIF-testing-and-Damage-formulas

Copying my evaluations here. Should have done this long ago, really. It's based mostly on Masamune's data.

This is an explanation of the algorithmic order of calculations for determining pDif on melee damage. It's a bit messy and complicated, and uses terms I had to make up just to describe the idea being presented. Plus, certain limits were never fully verified, and some of the equations have multiple possible solutions, which is why I held back on presenting it before. However it's the best representation of the game formulas that I know of.

Also note: These equations are a bit different from Masamune's, since the approach we each used to solve the approximations was a bit different. I obviously will be biased towards my own formulations.



Summary:

[For Ratios above 1.0; no data below 1.0 yet]

Numbers are run as fractions of 1024. Corresponding floating point values will be provided as well.

Examples used for illustration:
[Example 1: 1-handed melee vs lvl 63 lesser colibri (231 defense), attack of 370]
[Example 2: 2-handed melee vs lvl 81 greater colibri (322 defense), attack of 422]


~~~~
Basic info

Ratio = attack/defense

Ex.1: 370 att vs 231 def == (370 * 1024) / 231 = 1640 (1.6016)
Ex.2: 422 att vs 322 def == (422 * 1024) / 322 = 1342 (1.3105)

cRatio = level corrected Ratio {{ Level correction gets applied after the Ratio cap is applied. }}
-50 (~0.05) from Ratio for every level the mob is above player level

Ex.1: No level correction. cRatio = Ratio = 1640
Ex.2: Lvl 81 - Lvl 75 = 6; cRatio = Ratio - (50 * 6) = 1342 - 300 = 1042 (1.0176)


cRatio has a max of 2048 (2.0) for 1-handed weapons and 2304 (2.25) for 2-handed weapons.

If the hit is a crit, skip all the equations for normal hits and go to the crit hit section. Crit hits are NOT +1.0 to a normal hit's pDiff.

{{ This may not be correct. }}


~~~
Normal hit calculations


mRatio is cRatio with a gain multiplier factored in.
1-handed gain multiplier = +133/1024 (+13%)
2-handed gain multiplier = +163/1024 (+16%)

Ex.1: mRatio = 1640 * ((1024 + 133) / 1024) = 1853 (1.8096)
Ex.2: mRatio = 1042 * ((1024 + 163) / 1024) = 1207 (1.1787)


minROffset is the amount subtracted from mRatio to get the min pDiff.
1-handed minPDiffOffset = -711
2-handed minPDiffOffset = -762

{{ 1-handed gain/offset pair can be any of +133//-711, +134//-713, +135//-714, +136//-716; final value undetermined }}
{{ 2-handed gain/offset pair can be any of +159//-751, +160//-757, +163//-762; final value undetermined }}


Of particular note: when cRatio is exactly 1.5, mRatio - minROffset gives 1.0 as the min pDiff.

{{ 2-handed gain/offset is slightly off for this requirement; +159/-751 is the closest }}

Ex.1: minPDiff = 1853 - 711 = 1142 (1.1152)
Ex.2: minPDiff = 1207 - 762 = 445 (0.4346)


There are also limits on how low the pDiff value can go.

First, the minimum lower limit is mRatio - 440.

Ex.1: minPDiffMinLimit = mRatio - 440 = 1853 - 440 = 1413
Ex.2: minPDiffMinLimit = mRatio - 440 = 1207 - 440 = 767

There's also a minimum cap of 1.0, but only as long as it doesn't violate the minimum lower limit above.

We want to determine the final limit for min pDiff (minPDiffLimit)

minPDiffLimit = minPDiff

if (minPDiffLimit < 1024) then minPDiffLimit = 1024
if (minPDiffLimit > minPDiffMinLimit) then minPDiffLimit = minPDiffMinLimit

Ex.1: if (1142 < 1024) is false, so no change, and no second check required
Ex.2: if (445 < 1024) is true, so set to 1024; if (1024 > 767) is true, so set to 767

So:

Ex.1: minPDiffLimit = 1142
Ex.2: minPDiffLimit = 767


maxRMultiplier is used to calculate max pDiff. It is applied to cRatio, not mRatio.
maxRMultiplier appears to be +230 (0.225).
maxRMultiplier has a maximum value of 378 (0.375).
maxRMultiplier has a minimum, possibly 275 (0.269).


Ex.1: maxPDiffOffset = 1640 * 230 / 1024 = 368 (0.3594), within min/max range
Ex.2: maxPDiffOffset = 1042 * 230 / 1024 = 234; this is lower than min value, so set to 275


max pDiff = cRatio + maxPDiffOffset

Ex.1: maxPDiff = 1640 + 368 = 2008 (1.9610)
Ex.2: maxPDiff = 1042 + 275 = 1317 (1.2861)


A random value is then generated between minPDiff and maxPDiff.

Current pDiff range:
Ex.1: 1142 to 2008
Ex.2: 445 to 1317


If the pDiff value is less than the limited min pDiff (minPDiffLimit), reset it back to a neutral 1024 (1.0).

Ex.1: limited to 1142-2008, so no problems.
Ex.2: limited to 767-1317. Any random values less than 767 (since it can go as low as 445) are set to 1024.


Finally, an additional 5% multiplier is applied as a damage spreader to make the damage distribution a bit less crisp.

dmgSpread: random value between 0 and 51.

Final pDiff = pDiff * (1024+dmgSpread) / 1024

Final pDiff range:
Ex.1: 1142 to 2108
Ex.2: 767 to 1382


pDiff is then multiplied by the base damage to get the final damage.

Ex.1: base damage of 50+9 = 59
Ex.2: Base damage of 75+8 = 83

Looking at the range of possible damage:
Ex.1: 65 to 121 {{observed: 65-121}}
Ex.2: 62 to 112 {{observed: 63-112}}


~~~~

Crit hits:

1-handed and 2-handed weapons use the same equation.

minCritGain is 30 (3%)
minCritOffset is 589

min crit pDiff is calculated from cRatio.

min crit pDiff = (cRatio * (1024 + minCritGain) / 1024) + minCritOffset

eg:
min crit pDiff = (1595 * (1024 + 30) / 1024) + 589 = 2229 (2.1768)

max crit pDiff is calculated from min crit pDiff

max crit pDiff = minCritPDiff + 845

eg:
max crit pDiff = 2229 + 845 = 3074 (3.0020)

A random value is then generated between min pDiff and max pDiff.

pDiff = random(2229, 3074)

Caps are then applied. Max pDiff cannot be higher than 3072 (3.0).

An additional 5% damage spread is then applied here.

dmgSpread: random value between 0 and 51.

Final pDiff = pDiff * (1024+dmgSpread) / 1024

Masamune
12-09-2011, 03:53 AM
There is another approach i tried last year but kinda dropped research...

The idea is, since one can get a distribution graph from a KParse, to find "signatures" in a 1st step, then try to reproduce them with an Excel formula (and RAND()) over about 5k values graphed into a distribution graph to compare with the KParse.
...and only after reproducing the general shape of distribution graph parsed, can tweak the parameters in the formula in such way produced damage values match parsed ones.

I partially managed to reproduce the signatures at high cRatios down to cRatio=1, but not below, with same formula...

need KParses for below cRatio=0.7, maybe on those new Orichalcum crabs ? or even high lvl Buffalos (since they are PLD) ?

EDIT: what i call "signature" is for example the high frequency spike at cRatio=1, the one at PDIF=3,15, the caps and the "floors". Also the trapezoidal shape of the distribution graph is a signature.

Masamune
12-24-2011, 08:06 AM
i found this from Prothescar implying got another source (http://www.bluegartr.com/threads/106679-Test-Server-Findings?p=4954105&viewfull=1#post4954105) of data for pDIF testing.

Mind sharing those datas please Prot so can cross check and hopefully confirm and even better, get data for cRatio<0.7 ?

Yugl
01-01-2012, 05:15 AM
I'm actually interested in this as well. Namely, I've seen recent debates over pDIF models, but I haven't seen anyone lay out the competing versions. The only ones I know of are BG's and Wiki's, but it seems as if new versions have formed since.

Raelia
01-01-2012, 06:03 AM
Short version is there are effectively two. Prothescar's was a complete hodgepodge mess and will be ignored if I have anything to say about it.

1. Masa and Moten did this huge workup with tons of parsed data and regression.

2. I took the old knowledge, which was fairly incomplete anyway, and had an epiphany related to Ratio, level correction, and crit cap orders and the 1.00-1.05x randomizer you see being thrown around to produce exactly the sort of change that was observed.

The former continually rejected the latter for sake of a few instances at mid-range Ratio values where it didn't fit, even when it was pointed out that an unforeseen 1 fSTR increase (which can only be estimated anyway) would have given exactly the disparity noted.

The latter continually rejected the former for sake of it all producing an incoherent mess of numbers with no real usefulness or sanity in assigning multipliers or order of operations, foolhardy chasing of the max and min of a nonuniform (trapezoidal) distribution, and seeming pick-and-choose acceptance of concepts like the 1.05 secondary randomizer (but then rejecting it again a week later).

So what we have now is their model with a wide range of usefulness but no real coherence or even simple methods, and my model that is perfect above ~1.8 Ratio for one- and two-handed but lacks real data for any other application (which is fine for me, I play DRK and whatnot) and is detailed on otherwiki (http://wiki.ffxiclopedia.org/wiki/PDIF).

Neither is invalid within its given range or application, it's just more work than we've already done to put it all together now, plus there are still other strangenesses such as what a crit really does to pDIF.


There are simply two approaches happening here. One by Statisticians, the other grounded in Sensible Game Design. My policy that their work brushes up against is simply put "One does not write an MMO damage system by slamming their face into the numpad".

CDF
01-01-2012, 10:29 AM
Use of regression estimates is actually more practical because it is reasonably "model-free" thanks to the central limit theorem and you can incorporate it into "DoT" calculations regardless of whether an exact model is ever determined. Face-slamming is a straw man

Raelia
01-02-2012, 05:47 AM
Don't be that guy that rushes in to referee some formal argument. I gave my opinion on the usability of their system, which in no way questioned the validity of their method only its cleanliness, and you're just intending to sow more discourse and generally invoke why the internet sucks.

CDF
01-02-2012, 08:04 AM
Ultimately cleanliness doesn't even matter because DPS calculations, specifically changes in average DPS, are what people are interested in and regression is an easy and practical way to link changes in attack to changes in average pDIF, which Motenten may have done with his DPS spreadsheets (correct me if I'm mistaken because I have yet to look at them), which seem to be widely used and cited.

As for otherwiki, whatever the claims are (such as a distinction between 1H and 2H, critical points of 5/6 and 10/6 for 2H), they aren't supported by Masamune's data as a whole but I don't know if you have your own data.

Motenten
01-02-2012, 01:23 PM
The former continually rejected the latter for sake of a few instances at mid-range Ratio values where it didn't fit, even when it was pointed out that an unforeseen 1 fSTR increase (which can only be estimated anyway) would have given exactly the disparity noted.

I don't recall such a thing being pointed out to me, so it may have been something you discussed with Masa. In any case, the lower pDif samples (below about 1.4 Ratio) were able to show exactly what the total base damage was, and thus exactly what the fStr was. There was no ambiguity.

I did, in fact, completely ignore the old pDif model on the wiki (which was a bit different from what's on there now), as there were too many instances where it didn't even come close to matching the observed values. It was more practical to work solely from observed data.

The model currently on the wiki is actually much closer to my own, but makes some 'softening' assumptions that I'd have to verify against the parsed data. It also doesn't even make an attempt to explain certain pDif distribution behaviors, which to me means it's inherently flawed, though it may be "close enough" for most work (and it's not like I even use my own model very often).


The latter continually rejected the former for sake of it all producing an incoherent mess of numbers with no real usefulness or sanity in assigning multipliers or order of operations, foolhardy chasing of the max and min of a nonuniform (trapezoidal) distribution, and seeming pick-and-choose acceptance of concepts like the 1.05 secondary randomizer (but then rejecting it again a week later).

I know Masa had some issues accepting the 1.05 multiplier (trying to figure out if there was a way to explain the distributions without using it), but it's always been part of my own equations. I'll agree that the equations are a bit of a mess, though, but that's because we never really reached the "clean-up" stage.


I'm thinking of running my own set of new test data and reworking things from scratch. On nin I can add up to ~130 attack at roughly 7-8 attack intervals without affecting fStr, and attack fast enough to get lots of sample points quickly. Will see if I can find the free time to do it.

Raelia
01-02-2012, 01:38 PM
The tables on otherwiki are out of date and not something I wrote nor confirmed nor even endorsed. I just put my knowledge of the changed cap order and extra randomizer on there, which works perfectly at capped Ratio where the 1.0/2.0 'flats' don't occur. The place is still a joke it's just easier to link people there than this mess (http://ffxi.allakhazam.com/forum.html?forum=260&mid=1264398049203898202) from long ago. The flats are still the weirdest part and crits not being a flat +1.0 increase I now agree with.

At some point I will take a stab at fitting their much larger data set to my assertions or vice versa, I'm just generally too busy... you know... actually playing the game lately. This isn't anymore the 2009-2010 level 75 doldrums that boredom'd me into modeling high Ratio damage in the first place. We're all doing the same thing, I just worked from a much narrower set that let me focus on what mattered to my playstyle and avoid some of the craziness Moten and Masa ran into at intermediate Ratio values.

I have to disagree heartily with your 2.25 2-hander Ratio cap, which I surmise you got from the other thread you linked. I had 2-hander's ratio cap pinned down pretty good using the first post of page 3 here (http://www.bluegartr.com/threads/68018-Yuki-Gekko-Kasha-Attack-bonus-Testing/page3). He found a pDif max multiplier of ~1.23, which with an 'average' 1.025 secondary taken out gives 1.2 for max primary multiplier. Secondary rolling high as well explains why he saw up to 1.25. This then feeds back in with the observed 2.76-2.77 'maximum' pDif that was approached in many sources that then a 2.2 capped Ratio gives: 2.2 * 1.2 * 1.05 = 2.772 max combined pDIF, which after flooring of final damage gives the widely observed pDIF max limit for 2-handers of 2.76-2.77. Extend this model to the observed 2.0 Ratio cap on 1-handers and you get a 2.52 max combined pDIF which is very close to the 1-handed data in the other thread (http://www.bluegartr.com/threads/87774-pDIF-testing-and-Damage-formulas) after flooring of final damage is considered.

That's the basis of my model in a single paragraph really, besides the 1.00-1.05 secondary randomizer being visible on crits capping at 3.0 before it.

Motenten
01-02-2012, 08:18 PM
Started some of my own testing, which lets me pin down certain values that were ambiguous with Masa's data since I can choose the exact attack values to work with.

Test environment:
Nin/dnc vs Greater Colibri (slashing weapons, so no piercing bonus to factor out).
No spellcast, no gear swaps within a test.
93+5 str which gives 8 fStr.
Two d23 weapons. Final d on all attacks is 31.
Gear swaps only change attack (and dex/agi/etc, which I don't care about), not str or crit damage (so I can use the crit data later).


Can generally get around 100 attacks in per bird. I try to get at least 5 birds per level per test run for ~500 attacks per bird-level. With a d31 weapon, I should be fairly certain of hitting the damage limits, as well as seeing some of the shaping effects (though not so much on these tests, since cRatio is too high).


Testing for first bound factor: max pDif.

Whatever max damage result occurs, factor out the 1.05 multiplier in order to determine max pDif damage value.

Will list just the tests that gave useful results (other tests included all values that these tests covered, plus more, so don't actually contribute towards finding the limit).

Max pDif appears (from this and previous testing) to be a straight multiplier on cRatio. It also appears (from previous testing) to be capped, but I'm not trying to determine the cap yet, just the multiplier.



Attack Defense cRatio (1+ X/1024) Max observed Max/1.05 Mult. range (decimal) Mult. Range (X/1024)
464 322 1.441 (451) 56 54 +20.89% - +23.11% 214-236
464 327 1.419 (429) 56 54 +22.76% - +25.02% 234-256
472 327 1.443 (454) 57 55 +22.92% - +25.15% 235-257
489 327 1.495 (507) 59 57 +22.99% - +25.14% 236-257


Note: The multiplier ranges are calculated based on Max/1.05; they do not include the damage spread factor.

Reason for these values:
464 att gave a possible range of 234-236 when combining the lvl 81 and lvl 82 bird results. 472 was chosen to either prove or eliminate 234 (eliminated), and 489 was chosen to either prove or eliminate 236 (proven).

From that, we can see that the multiplier must be 236/1024 (assuming integer math in /1024 base), or 23.047%.

Masa's test data indicated that the max pDif multiplier was the same for 1-handed and 2-handed weapons. I have not re-tested 2-handed weapons, but will assume that it still holds for now.

Prior testing indicated that the multiplier had a max possible pDiff gain of 0.375 (384/1024, though I wrote 378/1024 in my notes; needs validation).

~ Gain: if you have 400 att and add 20% you end up with 480; the 'gain' is 80 points

The cRatio that would generate a gain of +384 would be 1.627. Testing 1.75 cRatio to see if it holds.

1.75 cRatio: 572 att vs lvl 82 birds. I put together a build with 571 att.
571 vs lvl 81 birds: 1.773
571 vs lvl 82 birds: 1.746

Expected max damage if gain is capped:
Vs lvl 81: 31 * (1.773 + 0.375) = 66 (69 after 1.05)
Vs lvl 82: 31 * (1.746 + 0.375) = 65 (68 after 1.05)

Expected max damage if gain is not capped:
Vs lvl 81: 31 * 1.773 * 1.23047 = 67 (70 after 1.05)
Vs lvl 82: 31 * 1.746 * 1.23047 = 66 (69 after 1.05)


Observed max damage for lvl 81 birds: 69
Observed max damage for lvl 82 birds: 68

Conclusion: The max pDif multiplier has a cap on the amount gained of approximately 0.375.

Caveat: Cannot necessarily assume that the same holds for 2-handed weapons.

With regards to max cRatio for 2-handed weapons: 2.25 plus the capped gain of 0.375 totals 2.625. Add in 1.05 multiplier and max pDif should reach 2.75625, which is close to, but not necessarily an absolute match for, the 2.76-2.77 max observed values.

On the other hand, the 20% multiplier value you use is clearly wrong (if it uses the same value as for 1-handed weapons), so can't be used as a basis for calculating max cRatio on 2-handed weapons. You'd end up with a max damage value of ~2.84 pDif if using the proper +23% multiplier on a max cRatio of 2.2.

Motenten
01-03-2012, 09:10 PM
Just as a cross-reference point with respect to the validity of the current pDif formulas ~~


With 482 attack and 91 str, both attack and fStr will be capped on all levels of lesser colibri.
Testing with 496 attack and 103 str.

d23 katana, capped fStr, total base damage = 33

With capped attack, using:

1) My formula: cRatio * 236/1024, capped at 384/1024.
2 * 236/1024 = 472/1024, capped at 384/1024 (0.375)
2 + 0.375 = 2.375
33 * 2.375 = 78.375 (floored to 78)
78 * 1.05 = 81.9 (floored to 81)

2) BGWiki formula: 1.019 × cRatio + 0.485
= 2.523
33 * 2.523 = 83.259 (floored to 83)
I think this includes the 1.05 damage spread already?

3) OtherWiki formula: fMax(cRatio) = 1.2 x cRatio + 0.05 (Proven)
1.2 * 2 + 0.05 = 2.45
33 * 2.45 = 80.85 (floored to 80)
Does this include 1.05 damage spread? If not,
80 * 1.05 = 84 (would almost never see; functional max of 83)



Since I don't have to worry about mob level, simply targetting ~500 non-crits to be certain of full spread.


698 total hits; 188 crits; so 510 non-crit hits.

Low/Hi: 51/81

Hit distribution:


Melee
51: 3
52: 8
53: 18
54: 17
55: 19
56: 14
57: 17
58: 17
59: 23
60: 17
61: 14
62: 11
63: 18
64: 8
65: 13
66: 22
^ 67: 21
+ 68: 30
69: 21
70: 20
71: 20
72: 14
73: 24
74: 24
75: 21
76: 24
77: 15
78: 17
79: 12
80: 7
81: 1


I did manually verify the 81 dmg sample in my chat log.

BGWiki predicts high of 83
OtherWiki predicts high of 80 or 83/84
Mine predicts high of 81

Motenten
01-03-2012, 11:55 PM
Going to attempt an additional test to see if I can pin down the max cap a bit better.

There are more differentiable values on the lvl 81 birds than on the 82 birds, so that's the target for these tests.

For any given A/B cap, if the cap is at least B then the max will be Y, while if the cap is A or lower the max seen will be X.

374/375 @ 537 attack
374 max: 62 (65 with 1.05)
375+ max: 63 (66 with 1.05)

379/380 @ 556 attack
379 max: 64 (67 with 1.05)
380+ max: 65 (68 with 1.05)

383/384 @ 534 attack
383 max: 62 (65 with 1.05)
384+ max: 63 (66 with 1.05)

Note that failure to show the higher value does not eliminate that cap value. The chances of hitting the exact max are extremely small, further reduced by needing to hit the top end of the 1.05 spread. The purpose of this test is mostly to eliminate lower values as possibilities. For a given max, you know the cap has to be at least X if you ever see a max value above the higher limit.


It's impractical to try to test for the exact value. For example, if the limit was 375, My 374/375 test would take about 17,500 hits on level 81 birds (so ~35k hits total, after removing crits and misses, if there were an even numbers of 81 and 82 birds) for a max value of 66 to show up.

On the other hand, if the max cap is 384 then my 374/375 test should see a 66 show up in about 1/10 the number of hits: 1750 instead of 17,500.

...

Given the preponderance of lvl 82 birds I'm getting (which I'm sure will reverse now that I'm changing the test), and the rarity of the chance of hitting the max damage target, I'm going to change my setup.

374/375 @ 524 attack vs lvl 82 birds
374 max: 60 (63 with 1.05, functional max of 62)
375+ max: 61 (64 with 1.05, all 63's should be evidence of this max)

Given that over 1/3 of all damage spread results should be 63 on a 'hit' if the cap is at least 375, and that I shouldn't get any 63's if the cap is 374 or less, and I should see a 63 within a reasonable time frame if the cap is notably above 375.

Results: a damage value of 63 on the first lvl 82 bird, out of 75 non-crit hits. This indicates that the cap is above 375, and probably a fair bit above in order to see that result so quickly.

Ok, two 63-damage results within 3 lvl 82 mobs using 524 attack. That's enough to show that the cap is clearly above 375.


Moving to the next stage.

379/380 @ 556 attack vs lvl 81 birds
379 max: 64 (67 with 1.05)
380+ max: 65 (68 with 1.05)

If cap is 379 or lower, 67 results should be very rare (once every several thousand hits). If cap is 380 or higher (in particular, if it's ~384), 67s should be fairly common, and 68s are possible.

The only difficulty is getting lvl 81 birds to pop....

Ok, after several 81's, I got several 67s and a few 68s. More 68s than I would have expected, actually, but I can hardly complain. It's clear the cap is reasonably above 380, which puts 384 as a perfectly viable threshhold.

Also, from the previous test, it's also clear that the cap cannot be higher than about 395. It's possible the cap is in the 385-390 region, but I've done enough work on this stage for now and am willing to work with 384.

This gets us maximum max pDif. We also need to test for minimum max pDif. I'll have to use clubs for that test to get my attack down low enough.

Motenten
01-04-2012, 01:11 AM
Minimum max pDif

Max pDif has a minimum limit to complement its maximum limit. In order to find it we need to set up a cRatio that will give us a multiplied value well under what we would expect the lower limit to be.

Using my -attack setup while wielding clubs, my attack is 337. That gives cRatios of 1071/1024 for lvl 81 birds and 1055/1024 for the lvl 82 birds.

The default max pDif based on the multiplier would be +246 for the lvl 81 birds and +243 for the lvl 82 birds.

Base damage is d15 + 8 fStr = d23.

Threshholds for a higher minimum:
Lvl 81:
+246 = 29 (30 with 1.05)
+265 = 30 (31 with 1.05)
+310 = 31 (32 with 1.05)

Lvl 82:
+243 = 29 (30 with 1.05)
+282 = 30 (31 with 1.05)
+326 = 31 (32 with 1.05)


Sample max 31 on lvl 81 birds, means that the min value is at least +265.
Sample max 30 on lvl 81 82 birds, means that the min value is probably less than +282.

Lacking the patience right now to fine tune this again, I'm going to assume a value of +272, which is evenly divisible by 16 and falls neatly between the two limiting values from the test run, as the minimum limit for max pDif.


Overall max pDif calculation:

cRatio * 236 / 1024
Clamped to a range of +272 to +384.

Any cRatio below 1180/1024 (1.152) will have a max pDif of +272 (0.265625)
Any cRatio above 1666/1024 (1.627) will have a max pDif of +384 (0.375)

Raelia
01-04-2012, 10:52 AM
On the other hand, the 20% multiplier value you use is clearly wrong (if it uses the same value as for 1-handed weapons), so can't be used as a basis for calculating max cRatio on 2-handed weapons. You'd end up with a max damage value of ~2.84 pDif if using the proper +23% multiplier on a max cRatio of 2.2.

Except you did it ass-backwards from my system. Your 1.23 multiplier is the same as 1.2 * 1.025 (because max Primary multiplier samples are always very rare, secondary rolling average would be normal, not to mention flooring), so you're re-applying secondary to this already combined multiplier to 'disprove' my model? Please don't mix systems, especially in completely the wrong way. Masa's chart does not include Secondary, which is an imbalanced (always 'upward') multiplier. If you want to use it to solve for 2-hander Ratio cap, but agree that the Secondary multiplier exists, you need to solve:

(1.116x+0.2535)1.025=2.77

x = 2.194

1.025, average Secondary, because max Primary multiplier hits are far too small in sample size to reliably have Secondary high as well. Is it inconceivable that pDif min/max multipliers stop converging past 2.0 cRatio? They appear to dip in the final two samples of Masa's 2-hander chart, which for that matter has no hitcount for any values to really know their reliability.

Anyway, hard-testing Ratio cap currently to put this to rest. Rather nice to be around 2.2 on Greater Colibri in my standard gear now, and one piece swaps to go from 2.15 up to 2.3 with birds self-identifying in Kparser for easy sorting between 322 and 327 defense. Capped fSTR on my OA2-4 Scythe even.


Edit: (I edit a lot anyway, but wanted to point this out as an edit) I may have found something absolutely bonkers: Secondary may be only applied when you hit capped ratio. I'll have both 2.198 and 2.208 Ratio parses to show this I think, but it's also visible on Masa's 1-hander data, where if you really look at all the sub-2.0 data it appears to shoot low of the 2.0 result (but he fit his line to the 2.0 result anyway). This sorta came to me when I was snoozing last night that my 708 attack data seemed far lower than it should have been compared to my 800+ attack samples and that I should try 'truly' capped 2.2 ratio just to be sure.

I'll have a really tight cluster of data around 2.2 Ratio, some 2.257 Ratio, and some 2.4+ Ratio data (Last Resort up) just to compare. This would explain perfectly why yours and Masa's partial ratio data always disagreed with my capped ratio conclusions.

Motenten
01-04-2012, 12:19 PM
Your 1.23 multiplier is the same as 1.2 * 1.025 (because max Primary multiplier samples are always very rare, secondary rolling average would be normal, not to mention flooring), so you're re-applying secondary to this already combined multiplier to 'disprove' my model?

You stated:


He found a pDif max multiplier of ~1.23, which with an 'average' 1.025 secondary taken out gives 1.2 for max primary multiplier.

That is, you're removing the average possible 1.05 additional multiplier from the estimate that Yarko made.

I removed the 1.05 multiplier -completely- (not just the average, the full 1.05) before figuring out the primary multiplier. The 'average' 1.025 applied to mine would produce 1.23 * 1.025 = 1.26075 and the max would be 1.23 * 1.05 = 1.2915. So it is not the same thing as yours.




Anyway, hard-testing Ratio cap currently. Rather nice to be around 2.2 on Greater Colibri in my standard gear now, and one piece swaps to go from 2.15 up to 2.3 with birds self-identifying in Kparser for easy sorting between 322 and 327 defense. Capped fSTR on my OA2-4 Scythe even.

I do appreciate this. I hadn't even started retesting 2-handed stuff; was just working from the prior assertions that max pDif was calculated the same for 1-handed weapons and 2-handed weapons.

I could actually start pulling out Masa's old parses to try to validate, or at least confirm, some aspects of things.

Motenten
01-04-2012, 12:37 PM
Going back to Masa's data (I have copies of his parses, so can clarify anything missing in his posts), here's some sample points from the 2-handed parses vs lesser colibris (just enough to do some basic checks):

482 att
d103 vs lvl 63 (def 231, ratio=2.087), max = 265
d103 vs lvl 64 (def 235, ratio=2.051), max = 261
d102 vs lvl 65 (def 241, ratio=2.000), max = 253
435 att
d103 vs lvl 63 (def 231, ratio=1.883), max = 242
d103 vs lvl 64 (def 235, ratio=1.851), max = 239
d102 vs lvl 65 (def 241, ratio=1.805), max = 231
404 att
d103 vs lvl 63 (def 231, ratio=1.749), max = 228
d103 vs lvl 64 (def 235, ratio=1.719), max = 225
d102 vs lvl 65 (def 241, ratio=1.676), max = 217

Each of these parses had 2500-3000 hits, split fairly evenly across the various levels of birds (for every 100 hits on one level of bird, there weren't more than about 150 on any other level).

If you factor out the 1.05 from the max damage, convert to approximate pDif value, and then subtract ratio, you get:

482 att
Lvl 63: 265 > 253, 2.456, 0.369
Lvl 64: 261 > 249, 2.417, 0.366
Lvl 65: 253 > 241, 2.363, 0.363
435 att
Lvl 63: 242 > 231, 2.243, 0.360
Lvl 64: 239 > 228, 2.214, 0.363
Lvl 65: 231 > 220, 2.157, 0.352
404 att
Lvl 63: 228 > 218, 2.117, 0.368
Lvl 64: 225 > 215, 2.087, 0.368
Lvl 65: 217 > 207, 2.029, 0.353

This is similar to what I expect in my model, though the lvl 65 birds start to fall a bit low. Due to rounding? Try working the other direction.


Predicted vs actual max using my model:
482 att
Lvl 63: 2.087 + 0.375 = 2.462 * 103 = 253.586 > 253 * 1.05 = 265.65 > 265 / 265
Lvl 64: 261 / 261
Lvl 65: 254 / 253
435 att
Lvl 63: 243 / 242
Lvl 64: 240 / 239
Lvl 65: 233 / 231
404 att
Lvl 63: 228 / 228
Lvl 64: 225 / 225
Lvl 65: 219 / 217

Several exact matches, and some that are 1-2 points higher than observed (does not invalidate theory). Lvl 65 results are still a slight concern as they appear to be a full point off.

Predicted vs actual max using the 1.2 multiplier:
482 att
Lvl 63: 2.087 * 1.2 = 2.5044 * 103 = 257.9532 > 257 * 1.05 = 269.85 > 269 / 265
Lvl 64: 265 / 261
Lvl 65: 256 / 253
435 att
Lvl 63: 243 / 242
Lvl 64: 239 / 239
Lvl 65: 231 / 231
404 att
Lvl 63: 226 / 228
Lvl 64: 222 / 225
Lvl 65: 215 / 217

Predicted values are several points high at 482 att, perfect matches at 435 attack, and low at 404 att. Even if you remove the first flooring step, the predicted maxes for 404 att do not reach the observed values, so that would seem to invalidate this method.



Secondary may be only applied when you hit capped ratio.

I can pretty well confirm that this is not the case. Indications of the secondary multiplier abound in every single parse I've looked at, usually in 2 to 3 different segments of the distribution.

Raelia
01-04-2012, 12:57 PM
Put simply, I'm seeing my average damage jump from 166 to 172 just going from 2.198 Ratio to 2.208. This is with 1000+ samples. Could also be explained by Ratio being floored to 2 decimals. Silly me, there's another zero in there when you 2.2/2.19 compared to 172/166

Also remember that if the max damage predicted is something like 100.1, there's only that 0.1 margin that must be hit to actually floor to that 100 damage, else you'll only see 99.

Also, you're using partial ratio examples to 'disprove' my capped ratio assertion again. Primary multiplier gets wider as you drop below 2.0 ratio with 2-handers, as apparent on Masa's graph.

Motenten
01-04-2012, 02:14 PM
Put simply, I'm seeing my average damage jump from 166 to 172 just going from 2.198 Ratio to 2.208. This is with 1000+ samples. Could also be explained by Ratio being floored to 2 decimals. Silly me, there's another zero in there when you 2.2/2.19 compared to 172/166

I'd have to see the full distribution to make any guesses. Will see once you've completed the runs.


Also remember that if the max damage predicted is something like 100.1, there's only that 0.1 margin that must be hit to actually floor to that 100 damage, else you'll only see 99.

Indeed. That's why I noted that a predicted max value being slightly above observed does not in itself invalidate a particular methodology. A predicted value being below max observed, however, should.


Also, you're using partial ratio examples to 'disprove' my capped ratio assertion again. Primary multiplier gets wider as you drop below 2.0 ratio with 2-handers, as apparent on Masa's graph.

As I am apparently completely misunderstanding what you're trying to say, please spell it out in clear steps, and define your terms (eg: what do you mean by "partial ratio examples"? how does a multiplier get "wider"?). Also, please run through the actual math that you would apply for the above listed samples to show how it compares with the observed values.

Masamune
01-05-2012, 01:50 PM
Question: any ideas to setup a test for determining the lower inflexion points for Max Normal PDIF (around cRatio~0.7 & 0.3?) and Min Crit PDIF ?

Asking this because once determined, since we also know precisely the other inflexion points (cRatio=1.25 and 1.5 + the max caps), can start to search for a model mimicing the parsed distribution with excel.

Motenten
01-10-2012, 08:21 AM
Ok, limits.

I know from my parses that there -must- be a multiplier on cRatio of at least 236/1024 for max pDif. While I also pegged that as the maximum possible value, I'll grant the possibility that extremely low-frequency values could have shown up later to boost that max.


Pulled all data to review again. Looking at it first without factoring out the 1.05 secondary multiplier. Assuming for now that the secondary multiplier is applied directly to primary pDif, and not to a floored damage value.

For my data (cRatio of about 1.4 to 1.8), there's a clear trend upwards if you use a difference value (max pDif - cRatio). If you use a ratio (max pDif / cRatio), the line is pretty much flat.

For Masa's data (cRatio of about 1.5 to 2.0), the difference values are mostly flat, while the ratio values have a slight decline.

Combined graph very much looks like there's a multiplier that can reach a cap. The difference at the low end is around 0.40, while the difference at the high end hits 0.50. It's clear that it can't be a flat addition, and there are also no indications that it's a piecewise calculation (ie: use this formula for cRatio between A and B, use the next formula for cRatio between B and C, etc).

So continuing with the idea that the concept of the original formulation is correct.



The highest difference shows the minimum that it has to be able to add. This is reached on Masa's 2.0 data. Difference required is between 0.4915 and 0.5085.

The highest ratio shows the minimum multiplier that has to be used. This is reached with Masa's 370 att data. Ratio required is between 1.2810 and 1.2918. There are several other points that hit 1.27+, however it falls off very rapidly above ~1.75 cRatio.

Note that both of those include secondary multiplier effect.

We may reasonably assume that the secondary multiplier on those maximum cases was between 1.04 and 1.05. Factoring that out, and picking through the narrowest viable final ranges, that gives us a base range of:

Ratio: 1.2810 to 1.2848 >> 1.2200 to 1.2354

As fractions of /1024, 1.2200 to 1.2354 would lie between 1 + 225.3/1024 to 1 + 241.0/1024. I picked 236/1024 before, but it appears 240/1024 is also viable. Given the issues with probability distributions, the higher value also seems more probable, so I'll go with that.

Difference: 0.3729 to 0.3960

That's between 381.8/1024 and 405.5/1024. Any of 384, 392 or 400 is acceptable as a fraction of /1024, and based on recent probability work I'd be willing to go for the higher value of 400/1024.


So, reasonable choice on max pDif:
Adds to cRatio as a random value between 0 and (cRatio * 240)/1024, with a cap of 400/1024. Cap would be reached at 1.6667 cRatio.


With a cap of 400/1024, max at 2.0 cRatio for the previous discussion with d59 weapon would be 148.099.


Min cap on max pDif:

More limited data.

d23 on warp cudgel with 8 fStr

Max of 31 at 337/322 = 1.0466 cRatio
Max of 30 at 337/327 = 1.0306 cRatio

Expected max without any caps applied:
Lvl 81: 29.71 without 1.05, 31.20 with 1.05
Lvl 82: 29.26 without 1.05, 30.72 with 1.05

It would appear that there's no evidence of a lower limit on the max pDif at this point. The lower limit would only apply if the primary damage value was being floored. If there's no flooring, it doesn't appear to be necessary.

There's probably still some sort of limit, but whatever it is would occur below 1.0 cRatio.

Motenten
01-10-2012, 10:20 AM
The next test is for the minimum pDif.

The first thing we need is to create a slope on the min pDif value. This will determine what type of formula we want to use.

1) If slope is 1.0 vs cRatio, then min pDif is a direct subtraction from cRatio
2) If slope is less than 1.0 vs cRatio, then min pDif is a multiplier on cRatio, with the multiplier being less than 1.0
3) If the slope is greater than 1.0 vs cratio, then min pDif is a subtraction from a line generated by multiplying cRatio by a value greater than 1.0

http://images.bluegartr.com/bucket/gallery/e1a6e1dbd035161a0b391fba94f6cdf4.png


Blue line is minimum possible pDif for the min damage at X.0 (eg: pDif for 35.0 when minimum damage is 35). The pink line is the maximum possible pDif (eg: pDif for 35.999 when minimum damage is 35). The yellow line is same as the lower line, but excluding the 1.0 values. This allows us to get a trendline on that segment.

A quick trendline shows a slope of about 1.15.

Since the slope is greater than 1, it has to be a fixed subtraction from a some multiple of cRatio (option 3, above).

There are a few points where it appears reasonable to expect that the true minimum was not reached. Tweaking a few values gives a trendline of 1.1499x + 0.7431.

Going to see if it's possible to make a 1.15 slope line that fits fully between min and max limits.

Dropping 5 values by 1 point (two of which are clearly wrong, such as the 2.0 cRatio with a higher min than other 2.0 samples, and the other three of which can be shown to be out of balance with the surrounding results) out of 25, the result can fit 1.15x + 0.7324. 0.7324 was chosen as 750/1024; 1.15 is 1 + 153.6/1024.

1.15 doesn't have a convenient /1024 value, and 750/1024 isn't a multiple of 8 (or at least 4) like I'd prefer. Tried tweaking various values to see what combinations worked.

Using a subtraction of L, range of valid multiplier M:

Lowest possible L: 688
Highest possible L: 771
Outside that range, it's not possible to generate a valid M.

Given that M appears to be close to 1.15 --



L M
747 152
748 152
749 153
750 153
751 154
752 154
753 155
754 155-156
755 156
756 157


The only combination where both L and M are divisible by 4 is 748 L with 152 M. Will probably go with that, but more likely use the simplified version of 1.15 * cRatio - 750/1024.

Edit: If I tweak one other value of questionable validity, a better fit is 752 L and 152 M. That's better as it makes both values divisible by 8.



Edit 2: Further note, drawn from my original calculation set:


mRatio is cRatio with a gain multiplier factored in.
1-handed gain multiplier = +133/1024 (+13%)
2-handed gain multiplier = +163/1024 (+16%)

Ex.1: mRatio = 1640 * ((1024 + 133) / 1024) = 1853 (1.8096)
Ex.2: mRatio = 1042 * ((1024 + 163) / 1024) = 1207 (1.1787)


minROffset is the amount subtracted from mRatio to get the min pDiff.
1-handed minPDiffOffset = -711
2-handed minPDiffOffset = -762

{{ 1-handed gain/offset pair can be any of +133//-711, +134//-713, +135//-714, +136//-716; final value undetermined }}
{{ 2-handed gain/offset pair can be any of +159//-751, +160//-757, +163//-762; final value undetermined }}

Given the data in this post, it's clear that my original estimate of an M value of ~1.13 for 1-handed weapons is wrong (though understandable due to the valid range that L and M can cover). As the 2-handed weapon values are very close to the results I determined here for 1-handed weapons, it's likely that both types use the same equation.

Motenten
01-10-2012, 12:17 PM
Min crit graph. This is a bit more scattered about, but there's a pretty clear baseline.

http://images.bluegartr.com/bucket/gallery/f4ab2c20fc8406324dc8d3b05c107d48.png

Taking only the lowest points, the trendline generated is 1.0843x + 0.4566, so it's increasing at a rate greater than cRatio. Slope could go as high as 1.1018. We don't really have to factor out the secondary randomizer since this is a minimum set, but it could potentially drop the slope to 1.09.

Max crit is even more messy.

http://images.bluegartr.com/bucket/gallery/447a73a3eb0586d692aba53e7f94ed25.png


Peak of 3.15 seems to be reached at about 1.64 cRatio. Best slope before cap seems to be... (3.15-2.9355) / (1.6422 - 1.4587) = 0.2145 / 0.1835 = 1.1689. Possibly a little lower, such as 1.15.

Unlike the minimum pDif, however, we need to factor out the 1.05 spread. That ends up with a slope between 1.095 and 1.124 (with allowance for not-quite-max secondary modifier).

So it looks like it's feasible that both min and max crit could be plotted relative to a 1.09 or 1.10*cRatio line (before secondary). A basic initial attempt to find something that works ends up with:

critLine = 1.09*cRatio + 0.85
min Crit = critLine - 0.4
max Crit = critLine + 0.4

This is moderately close. Given that a lot of Masa's data only had ~100 crits (much lower crit rate than my data, so fewer crits even though he had more hits), not hitting the full edges is to be expected. The above formula gives a few points leeway on several of the data sets, and matches the limits on others.

Motenten
01-10-2012, 01:37 PM
When making estimations based on crit hit distributions, I usually maintain a rough assumption of a 50/50 split between below 3.0 and 3.0+. That actually isn't quite accurate, as there's a small bias towards 3.0+.

Using the above estimation of the crit hit distribution pattern, 1.09 * 2.0 + 0.85 puts the center of that distribution at 3.03. Along with the secondary modifier, you should expect to see maybe 55%-60% of all hits as 3.0+.

Going to look at Masa's 2.0 samples to see if that holds.

d59
Total crits: 96 + 103 + 27 + 69 = 295
Crits of 177 or higher: 56 + 56 + 20 + 43 = 175
Percent of crits at 3.0 or higher: 59%

d58
Total crits: 40
Crits of 174 or higher: 22
Percent of crits at 3.0 or higher: 55%


My d33 data vs Lesser Colibri:
Total crits: 188
Total crits of 99 or higher: 104
Percent of crits at 3.0 or higher: 55%


Overall:
Total crits: 523
Total crits at 3.0 or higher: 301
Percent of crits at 3.0 or higher: 57.6% +/- 4%


On the other hand, it is possible to explain the skew based solely on the secondary modifier. Anything down to 2.86 could potentially be pushed over the 3.0 limit, and the overall average is about 8.9% of all values end up as 3.0+ instead of below 3.0, giving a 59/41 split. That's actually closer to the observed results than it would be if the extra .03 was factored in.

As such it's possible that the target average crit value is exactly 3.0 when starting from a 2.0 cRatio. That means a 1.075 multiplier + 0.85 (or 1.1 + 0.8?). Combined with +/- 400/1024, it seems to fit pretty well.

Rena
01-10-2012, 05:09 PM
Some notes on low ratio, since it has been brought up a bit:

Non-crit max has a cap of 1.0 pDIF from 0.5 to 0.75 ratio.

Crit min has a floor of 1.0 pDIF from 0.25 to 0.5 ratio, exactly 1.0 below the 1.0 floor for non-crit min at 1.25 to 1.5.

Comparing what data I have, it seems that the function for min crit for 0.5 to 1.0 ratio is, if not identical, then at least very similar for non-crits for 1.5 to 2.0 ratio. Seems entirely possible that crit min and non-crit min use the same function, with crits receiving a 1.0 bonus to ratio (obviously bypassing the cap that normal hits have).

Looking at max crits for sub-1.0 and comparing them to max non-crits for ratio values 1.0 above those, the resulting pDIF values there are also close enough that they could quite possibly function the same as suggested in the previous paragraph, adding +1.0 not to pDIF, but to ratio.

Byrthnoth
01-10-2012, 05:20 PM
Heh, here is the expanded version of the lolmodel I made:
http://images.bluegartr.com/bucket/gallery/e018c8515e1f61ceafd075c9e625c32f.jpg
Here is the MATLAB code:

clear;
cRatio=[0:.01:2.25];
reso = length(cRatio);
bigar = zeros(10000,reso);
for index=1:reso
randy = cRatio(index)*10/9 + rand(10000,1)*8/9 - 3/19;
for n = 1:10000
if randy(n) < 1.3
bigar(n,index) = (randy(n) - .3);
else
if randy(n) < 1.5
bigar(n,index) = 1;
else
if randy(n) > 1.5
bigar(n,index) = (randy(n)-.5);
end
end
end
if bigar(n,index) > 3
bigar(n,index) = 3;
end
if bigar(n,index) < 0
bigar(n,index) = 0;
end
end
end
plotar = zeros(3,reso);
plotar(1,1:reso) = cRatio;
plotar(2,1:reso) = min(bigar);
plotar(3,1:reso) = max(bigar);
figure; plot(cRatio,plotar(2,:)); hold on; plot(cRatio,plotar(3,:));
figure; hist(bigar(:,1),50);It's horrible, I'm a bad taru, etc. Solly, but cope.

Edit: I should note that I just intended this as a model of the shape and didn't bother dicking around with constant to get it precisely correct. Also, I haven't really figured out how to incorporate critical hit rate yet (if it would work) and I ignored the 1~1.05 randomizer that gets tacked on at the end.

I was expecting to test some low pDIF values tonight, but Rena is ahead of me! I might still do it tomorrow, but I'm sleepy >:/

Edit 2: Critical Hit minimum is approximately cRatio + .5 and maximum is approximately cRatio + 1.2.

Spoiler: Here is Masa's 1H data, corrected for inconsistent fSTR and plotted with the above fit using the above constants:
http://images.bluegartr.com/bucket/gallery/57e2bf65d536839469b87886878875be.JPG

You can see why critical hits are going to pose a problem with a scheme like this. I could wave my hands and say that 10/9 is within tolerance for most of the data, but I can't account for the critical hit max. I mean, we have to accept that the crit max/mins are less rigorously tested than the non-crits simply because the tests were performed with about a 30% crit rate. I would not feel bad about changing the intercept of the lower crit boundary a little, and putting a line with 10/9 slope low enough to account for the values.

If I was going to adjust the crit max slope though, based on Masa's numbers I would be inclined to decrease it a little and bump the intercept up.

Masamune
01-11-2012, 03:25 PM
Some notes on low ratio, since it has been brought up a bit:

Non-crit max has a cap of 1.0 pDIF from 0.5 to 0.75 ratio.

Crit min has a floor of 1.0 pDIF from 0.25 to 0.5 ratio, exactly 1.0 below the 1.0 floor for non-crit min at 1.25 to 1.5.

Comparing what data I have, it seems that the function for min crit for 0.5 to 1.0 ratio is, if not identical, then at least very similar for non-crits for 1.5 to 2.0 ratio. Seems entirely possible that crit min and non-crit min use the same function, with crits receiving a 1.0 bonus to ratio (obviously bypassing the cap that normal hits have).

Looking at max crits for sub-1.0 and comparing them to max non-crits for ratio values 1.0 above those, the resulting pDIF values there are also close enough that they could quite possibly function the same as suggested in the previous paragraph, adding +1.0 not to pDIF, but to ratio.

exactly what i were trying to simulate Rena /nod :D

prob is since with older formula there were a plateau for min crits that disappeared after the 2H update, and since i have only sparse data of min crits, imnot sure where is exactly the pDIF=1 plateau for them... same for non-crits Max pDIF, ends at 0.75 ? 0.7? 0.65 ?

Byrthnoth
01-12-2012, 05:08 AM
Here is what you are suggesting, I think. It took very little modification to my code.
Simulation:
http://images.bluegartr.com/bucket/gallery/6c217751bf68d6feaa8a9d9ee099c83a_thumb.jpg (http://images.bluegartr.com/bucket/gallery/6c217751bf68d6feaa8a9d9ee099c83a.jpg)

Comparison with adjusted 1H data:
http://images.bluegartr.com/bucket/gallery/bd2319ed480d15547df682ca2e9cafb9_thumb.JPG (http://images.bluegartr.com/bucket/gallery/bd2319ed480d15547df682ca2e9cafb9.JPG)

Code:

clear;
critrt=.5;
cRatio=[0:.02:2];
reso = length(cRatio);
bigar = zeros(200,reso);
for index=1:reso
for n = 1:200
randy = (cRatio(index)+(rand < critrt) + rand*4/5 )*10/9 + - 3/19;
if randy < 1.3
bigar(n,index) = (randy - .3);
else
if randy < 1.5
bigar(n,index) = 1;
else
if randy > 1.5
bigar(n,index) = (randy-.5);
end
end
end
if bigar(n,index) > 3
bigar(n,index) = 3;
end
if bigar(n,index) < 0
bigar(n,index) = 0;
end
end
end
figure; plot(cRatio,bigar,'.');<critrt) +="" rand*4="" 5="" )*10="" 9="" -="" 3="" 19;
<critrt) +="" rand*8="" 10)*10="" 9="" -="" 3="" 19;
The things I like about this:
* It fits fairly well considering how simple it is.
* It is similar to almost every other equation in FFXI (piecewise linear)
** The above two things are what we would expect of the "true" pDIF function.</critrt)></critrt)>
* It uses constants that we see in the ranged attack equation.
<critrt) +="" rand*4="" 5="" )*10="" 9="" -="" 3="" 19;
<critrt) +="" rand*8="" 10)*10="" 9="" -="" 3="" 19;
* It predicted an unverified observation.

The thing I don't like about it:
* As I noted earlier, the model fails when it comes to the max crit damage. I'm not willing to accept that we're somehow just never seeing the "true maximum" in most of those parses.</critrt)></critrt)>

Rena
01-12-2012, 10:01 AM
I don't think max pDIF uses the same function for 0.75 to 1.?? as it does from 1.?? to cap. It's easy enough to see that from ~1.75 and up at least, max is ratio + 0.375, and crit max is simply ratio + 1.375 (consistent enough with crits being ratio +1.0, and this would mean we run into the 3.0 cap on crits around ~ 1.625 ratio, which seems correct). Somewhere below 1.75, results and formula diverge noticably, with disparities growing greater as ratio drops, suggesting there is another function between 0.75 and 1.75. 1.75 is a rough guess due to somewhat limited data at the moment, but if I draw a line between 0.75 and 1.75, the results fit very well, if we assume there is no floor before the 5% randomizer. This results in a 9/8 growth per ratio for 0.75-1.75.

As another curiosity that still needs some more examination; if we apply this same formula to the min pDIF line, we end up with results that are very close to observed results (1.5625 and 2.625 for 2.0 ratio, and 1.84375 and 2.875 for 2.25 ratio, as non-crit min and crit min, respectively). If we also look at the 1.0 caps, we can see that for min pDIF, it occurs exactly 0.75 after it does for max pDIF. In other words, max and min pDIF seem to be using the same function, with min pDIF simply being ratio - 0.75.

Edit: going to make a wild guess here, since I haven't looked much at distribution at all, but for those who have, how would a simple randomizer generating a value from 0/256 to 192/256 to subtract from ratio work?

Byrthnoth
01-12-2012, 10:27 AM
I don't know about that. As you can see above, I get an R^2 of .9991 for 1H non-crit max pDIF via Excel's linear fit over the whole range. The lowest R^2 is .9924. No data has been deleted (1H samples) and I just combined all the 2H samples and they end up right on top of one another.

Motenten
01-12-2012, 11:38 AM
What values are you using for the model equations in the comparison graph?

Also, using the R^2 values for a graph fit isn't necessarily the best validator. Consider:

http://images.bluegartr.com/bucket/gallery/667eb010a1d6a913cbaefd2158b9f905.png

This is purely a model graph for max pDif, where max pDif = cRatio * (1 + 240/1024), capped at +400/1024 (you can see the inflection at about 1.65). It generates an R^2 of 0.9982.

Actually, I wonder...

Ok, a couple more graphs, that show some interesting effects.

Max pDif below 1.625 cRatio. A bit messy, and I'm not sure how to create a trendline that requires all points are above or below it, so I don't really trust the scaling value here.
http://images.bluegartr.com/bucket/gallery/2ae3422e17bb4008de402cc73e89651d.png

Note: for all of these, the blue line is the absolute minimum valid pDif for the given damage value, and the red line is the absolute max valid pDif for the damage value. Trendlines were created on the max curve.

A subset of the above, this takes only the most linear segment.
http://images.bluegartr.com/bucket/gallery/32c834380eaaae59d6331497bfaedd3a.png

Seems to be running at 1.216 over cRatio. However that includes the 1.05 secondary multiplier, so actual slope is perhaps 1.16. Hard to say, as the larger segment requires a higher multiplier.

Now the interesting one. This is max pDif values above 1.625.
http://images.bluegartr.com/bucket/gallery/7a9464bdf4f71696ede9d490e6176b94.png

Note that the trendline multiplier is just a bit below 1.05. Considering that these values are after the 1.05 secondary multiplier, it would seem to indicate a 1:1 match with cRatio, simply offset. Also note the offset of 0.4013, just a little higher than my estimated 400/1024 (0.39). Considering that the trendline was created off of the upper limit, this makes sense.

Note that I still don't believe that these are sets of piecewise-joined equations, but rather that there is simply a cap on the value that can be added, while the equation remains the same.

Byrthnoth
01-12-2012, 11:53 AM
The equation is:
Normal Val = (cRatio + .8*rand)*10/9 - 3/19
Crit Val = (cRatio + 1 + .8*rand)*10/9 - 3/19

If Val < 1.3, pDIF = Val - .3
If 1.3 < Val < 1.5, pDIF = 1
If Val > 1.5, pDIF = Val - .5

Then I cap pDIF to 3 and keep it from going below 0.

I am also using what you call the max pDIF (recorded damage+1)/base damage in my plots. I forget exactly what my logic for this was, but they stuck around because I thought it looked too cluttered with both sets.

Masamune
01-12-2012, 12:11 PM
Easiest imho is to pinpoint @ which cRatio Max pDIF hit the plateau =1.

Why? because we know it caps @ Cratio~2, then can pinpoint an acceptable line having parsed maxs below it.

Other concern i had due to lack of data is when crit pDIF min meets the plateau max pDIF=1... around cRatio~0.3 but not very clean...

Raelia
01-12-2012, 12:40 PM
Note that the trendline multiplier is just a bit below 1.05. Considering that these values are after the 1.05 secondary multiplier, it would seem to indicate a 1:1 match with cRatio, simply offset. Also note the offset of 0.4013, just a little higher than my estimated 400/1024 (0.39). Considering that the trendline was created off of the upper limit, this makes sense.

Note that I still don't believe that these are sets of piecewise-joined equations, but rather that there is simply a cap on the value that can be added, while the equation remains the same.

Gee, sounds like cRatio+0.40 before Secondary to me. Don't make me feel like you all took my ball and went home guys...

They can certainly be piecewise, because Secondary will 'scrub' the discontinuity anyway (to say: no holes unfilled). If you try to make the RAE values not piecewise you just screw up the slope over half of each range. I tried this, was not pretty. Had values in the bottom half falling completely out of Secondary's range.

I think part of your problem with those particular graphs is your parse sizes:


1,797 1,792 1,762 1,718 1,688 1,660 1,618 1,602 1,574 1,535
1096 1336 974 1227 851 1277 1376 1296 1177 1003
Notice the shorter parse at 1.688 causing an apparent 'dip' in maximum, and the shorter parse at 1.762 as well. Reconsidering these values presents to me two distinct sets above and below 1.75
http://images.bluegartr.com/bucket/gallery/a8157a77d394dccc4c20400c77cab40b.png
Except these are backwards from pDif max (RAE) getting smaller as cRatio gets lower.

Unfortunately this presents quite a pickle, because if you look to see those 1.762 values be any higher due to a small parse size it messes with 1.75 being a break point, so it could be that 1.762 'got lucky' and hit a high value just by chance, or there is a change in maximum there and 1.762 lowballed it hard.

Perhaps all of that wonkiness is caused by larger parse sizes hitting extreme values by higher chance while the more moderate parse sizes better fit a norm and all of this is further confounded by particularly small samples like 1.950 completely undershooting maximum. In fewer words, I think in this particular graph you're chasing variance in maximums due to parse size instead of an actual change in pDif max. It's not that they're all too small, but a few are too small and a few are noticeably larger as to change the amount of 'plunge' into extreme values.

Anyway, I have a suggestion for parsing effectively below 1.0 cRatio: Reverse the roles! Find a particular mob that doesn't use any attack boosting or debuff abilities, work out it's attack and base damage, and then vary the player's defense to produce useful data. Throw on some -Evasion (stumbling sandals, spelunker's hat), some regen junk, and walk away for an hour or two.

Motenten
01-12-2012, 01:40 PM
I was actually asking about the graph you labelled "Comparison with adjusted 1H data:"; is that the same data, and you're just using the limits?

Still, am seeing an obvious effect here that doesn't match up. Since all your adjustments are fixed linear subtractions, the entirety of the slope calculation comes from the 10/9 fraction. As such, the minimum pDiff observed should fall on such a slope, but it doesn't.

From this image from my earlier post:

http://images.bluegartr.com/bucket/gallery/e1a6e1dbd035161a0b391fba94f6cdf4.png

you can see the slope of the minimum pDif is 1.15, not 1.11. We can also see that it would be impossible to fit the data to a 1.11 curve; the L value (combination of all the subtractions you do) cannot be below 688/1024 (actually, with better refinements it can't be below 712/1024). 712/1024 offset requires a 131/1024 slope, significantly higher than the 114/1024 slope of 10/9, and even with an L of 688/1024, the multiplier needs to be around 117/1024.


Tried doing a fit over the non-crit values.

For the minimum damage results: Only about 2/3 of the values ended up being 'valid' using your equation, even after adjustments (not counting the 1.0 minimums).

For the maximum damage results: Only 5 out of 36 of the values fit if 1.05 multiplier was left in; none fit if it was factored out. Was generally nowhere close to matching. There was a fair bit more noise in the data, but there was enough that at least some should have matched if it was a reasonable estimation.

Motenten
01-12-2012, 02:17 PM
Gee, sounds like cRatio+0.40 before Secondary to me. Don't make me feel like you all took my ball and went home guys...

Yours is a fixed addtion; mine is the cap on a multiplier. Very different effects once you start dropping cRatio (as you somewhat allude to in your next paragraph).

Also, your estimated value is 0.40. Mine is 400/1024, which is more like 0.39. Other than that minor discrepency, I thought we'd already more or less agreed on that max value in the other thread.

And I'm posting more here because this thread is more for my model, and I've been trying to keep it updated with my own work on the issue.


They can certainly be piecewise, because Secondary will 'scrub' the discontinuity anyway (to say: no holes unfilled).

Interesting that you should put it like that, as there have been mild indications of some sort of "holes" in the data, where the frequency of certain damage values are significantly lower than surrounding values. I've always set it aside as random noise (which is most likely the case) since I had nothing to even begin to base an explanation on, but it's conceivable that there's something else in there.


If you try to make the RAE values not piecewise you just screw up the slope over half of each range.

Only if you assume that the RAE must be a constant value.


I think part of your problem with those particular graphs is your parse sizes:

Depending on the limits being considered, that's a viable concern. Difficult to judge the extent of the errors. I'm inclined to think that 2500 samples per mob-level (for either crit or non-crit) should be sufficient for all but the most extreme of low probabilities. That would give a better than 90% chance of hitting a value that has a 0.1% probability of happening. [Alt: Assuming the reversal suggestion works, 5000 samples would give better than 90% chance of hitting a value that has a 0.01% probability of happening.]


Notice the shorter parse at 1.688 causing an apparent 'dip' in maximum, and the shorter parse at 1.762 as well. Reconsidering these values presents to me two distinct sets above and below 1.75

I think you posted just the thumbnail image, rather than set it up as a link to the original image. Can fix?


Reverse the roles! Find a particular mob that doesn't use any attack boosting or debuff abilities, work out it's attack and base damage, and then vary the player's defense to produce useful data.

That.. is a very interesting idea. Assuming mobs' equations are the same as players', aside from the fact that their pDif can go a lot higher than ours. However isn't there also a hard-coded minimum pDif for mobs? Like 0.5 or 1.0 or something? It being one of the reasons that pld defense gets very useless so quickly..

Still, it should be fine for the 1.0 to 2.0 range, at the very least, and far easier to get large samples that way.

Would suggest finding exact base damage for 2 or 3 EM mobs that could be used (eg: crabs or fish in Aby-Grauberg, etc). I -think- we can get (mostly) exact attack based on mob family, etc, but we may need to pin it down as an estimate based on when min damage goes above 1.0 pDif. Estimate it would take about 3 hours to get a 2500-hit sample, or 6 hours for a 5000-hit sample.

Nightfyre
01-12-2012, 02:22 PM
edit: nvm, wasn't thinking through all the extra reductions involved. Will look into potential mob pDIFmin tomorrow.

Byrthnoth
01-12-2012, 02:48 PM
The "Comparison with adjusted 1H data:" is Masamune's data. He had one fewer fSTR against level 65 Colibri, so it looks bumpy unless you take that out. The second time I posted it I also included his corrected 2H samples. I divided out the randomizer (all max values/1.05) in all the graphs I've posted so far, because people don't seem to debate it as much anymore.

Also, I wasn't proposing my model as the correct coefficients, I was just showing how the shape we were looking for could be fit with a pretty simple format. I picked the coefficients because they were close and used in the ranged pDIF equation.

Raelia
01-12-2012, 02:53 PM
That.. is a very interesting idea. Assuming mobs' equations are the same as players', aside from the fact that their pDif can go a lot higher than ours. However isn't there also a hard-coded minimum pDif for mobs? Like 0.5 or 1.0 or something? It being one of the reasons that pld defense gets very useless so quickly..

Still, it should be fine for the 1.0 to 2.0 range, at the very least, and far easier to get large samples that way.

Would suggest finding exact base damage for 2 or 3 EM mobs that could be used (eg: crabs or fish in Aby-Grauberg, etc). I -think- we can get (mostly) exact attack based on mob family, etc, but we may need to pin it down as an estimate based on when min damage goes above 1.0 pDif. Estimate it would take about 3 hours to get a 2500-hit sample, or 6 hours for a 5000-hit sample.

Or maybe they have the same function as players giving them a spike at 1.0, which was interpreted as a 'min pDif', and if they do have that same spike it's a crazy easy method to determine their base damage then.

Anyway. I might have uh... made RAE not piecewise. Like beautifully. This came about when trying to match where the 1.0 floor and ceiling start and end, as well as trying to 'catch up' to the average pDif I got at 2.25 suggesting a RAE greater than 0.4. I'm doing a grand rollup of my thread right now. The problem is I haven't actually seen any of this data that suggests the ceiling, I'm just working from Byr's graph and guessing a bit XD. If I had hard numbers I could produce hard numbers...

Rena
01-12-2012, 03:19 PM
I ran the numbers in this (http://www.bluegartr.com/threads/87774-pDIF-testing-and-Damage-formulas) post against my previously proposed theory, and it predicts the values for which there are averages within 1 point of damage. Would still need to check properly against distribution, but I won't have the tools or parses available for a while, unfortunately. Still, it seems to be fairly close to 'good enough' if you want an average.

Byrthnoth
01-13-2012, 10:21 AM
How are you implementing this?

I tried to combine what you have said with Motenten's observation (http://www.bluegartr.com/threads/108626-Uh-oh-Rae-s-gonna-make-pDif-simple.?p=4980806&viewfull=1#post4980806)that values after 2.0 pDIF may be more common than those before it. This could be created by a slope decrease (from 1.1 to 1) around that point, as you are describing. It works on the excel version, but I cannot see how to implement it on my version because the slopes of crit min and max are non-parallel in either dimension (cRatio or pDIF).

I can get to something like this, which changes slope to 1, pretty easily with fairly superficial changes to my formula:
http://images.bluegartr.com/bucket/gallery/125bf22e5d29ca58746932170243bbd9_thumb.jpg (http://images.bluegartr.com/bucket/gallery/125bf22e5d29ca58746932170243bbd9.jpg)

Rena
01-13-2012, 02:57 PM
Model I used had the slope from 0 to 0.49 at 9/8 (don't have enough data to say for certain what it is, but it's close to that, and would make very little difference even if slightly incorrect), 0.5 to 7.5 is stuck at 1.0 obviously, then from 0.76 to 1.75 I have the slope at 9/8. From 1.76 and up, it's ratio+3/8 (0.375 if you so prefer) up until you hit the 3.0 cap.

What I suggested previously was that the game generated a value between 0/256 and 192/256, and subtracted this from ratio, using that number to pull the actual pDIF from the function above. Finding the average after that should be simple enough.

Edit: upon rereading, I'm not sure this really answers your question, since I'm not sure I understand which part you are trying to ask about. I can provide more clarification if needed.

Byrthnoth
01-13-2012, 03:28 PM
That is approximately what I was doing in the code above, I think. Toss it in to a single piecewise equation and get numbers out.

Do you have intercepts for those values lines?

If I plot what you just said (without a randomizer), I get this:
http://images.bluegartr.com/bucket/gallery/2ee7c785364144ce3a6edf4d173f5b8f_thumb.jpg (http://images.bluegartr.com/bucket/gallery/2ee7c785364144ce3a6edf4d173f5b8f.jpg)

That's:

clear;
cRatio=[0:.01:3]; % Make an array of numbers from 0 to 3 counting by 0.01s.
reso = length(cRatio); % How long is the array?
bigar = zeros(10000,reso); % This is just for lag, although it isn't really necessary here because the array size never changes. Habit.
for index=1:reso % This index variable is for counting through the elements of cRatio
randy = cRatio(index) - rand(10000,1)*3/4; % Makes a 10000 element array of cRatios below the current cRatio with varying 0~3/4 offsets.

for n = 1:10000
if randy(n) <= .5
bigar(n,index) = 9*randy(n)/8; % Equation Below 0.5
else
if randy(n) <= .75
bigar(n,index) = 1; % Equation between .5 and .75
else
if randy(n) <= 1.75
bigar(n,index) = 9*randy(n)/8; % Equation between .75 and 1.75
else
bigar(n,index) = randy(n)+.375; % Equation between 1.75 and 3.0
end
end
end
% These next two steps just apply the floor and ceiling.
if bigar(n,index) < 0
bigar(n,index) = 0;
end
if bigar(n,index) > 3
bigar(n,index) = 3;
end
end
end
% If I wanted to add a randomizer, I could add it here.

plotar = zeros(3,reso);
plotar(1,1:reso) = cRatio; %Cratio!
plotar(2,1:reso) = min(bigar); %Grab the min values
plotar(3,1:reso) = max(bigar); %Grab the max values
figure; plot(cRatio,plotar(2,:)); hold on; plot(cRatio,plotar(3,:)); % Plot the mins, then plot the maxes both against cRatio.
Did you mean to add something to the equations like an intercept? It's pretty obvious that .5*9/8 is not going to be continuous with 1. I've tried to do this though, and I can't get the max and the min both happy at the same time.

Rena
01-13-2012, 03:48 PM
Ah, right, the model I used simply started from the 1.0 cap and generated a line backwards along 9/8.

As I lack good data for that range, it's a bit of a guess still, but based on what I do have, and extrapolating from that, intercepts should happen at ~-0.445 for min and ~0.421 for max (edited out old numbers due to stupidity, shouldn't be doing this at work...), which is slightly different from the 9/8 figure (closer to 37/32, in fact ).

Byrthnoth
01-13-2012, 04:19 PM
Okay, well I'll let you think about it and model it. The min and the max should have the same equation if they're generated from the same piecewise function though, right?

Nevermind, I got it to work. There was a second offset. At the moment I'm using:
cRatio < -0.4 : 0
cRatio < .5 : 9/8*cRatio+.45
cRatio < .75 : 1
cRatio < 1.75 : 9/8*cRatio+(1-27/32)
cRatio < 3 : cRatio + .375
cRatio > 3 : 3

The frequency distribution also works out. I have not checked this against the data and do not intend to. Feel free to provide the correct constants!

Does anyone see a feature of the graph that this fails to model with the constraints:
* Critical Hits add 1 to cRatio
* 1H Ratio input caps at 2
* 2H Ratio input caps at 2.25
* The output caps are as stated above.

Rena
01-13-2012, 04:31 PM
That would be correct, yes. I can't give any better numbers due to a lack of data that low though, 37/32 is simply what fits best. Numbers for 0.5 ratio and above should be accurate, however.

Masamune
01-14-2012, 11:15 AM
A fast verification would be:
- set Ratio=1: is frequency spike corresponding to DMG=BaseDMG AND centered through the whole dmg values range ?
- set ratio=1.4 : is spike completely on the left of dmg range ?
- set ratio=0.4 : is spike completely on the right of dmg range ?
- compare spikes intensity between Ratio=1,7 and Ratio = 5: the former is much less noticeable than the latter.

Also, i'mnot sure if i misread but both Rena and Byrth seems to think Crits caps @ Ratio=1.75 ? it's actually 1.65.

Another thing is crits=Norm +1.2 (and not +1), because if yu just +1, just take the case where all randomizers rolls lowest (ie 0) yu end up with a critmin = Normmax, while parses show clearly a gap between normal maxs and crit mins. Unless your formulas takes care already of an additional term to produce that gap ?

I have a question about the range 0.3 < cRatio < 0.6 : do we have proof crits distribution actually go "eat" inside normal hits distribution ?

Rena
01-14-2012, 05:38 PM
Also, i'mnot sure if i misread but both Rena and Byrth seems to think Crits caps @ Ratio=1.75 ? it's actually 1.65.
You misread; according to the proposed theory, they would start happening at 1.625, albeit very rarely. I can confirm they start happening at least at 1.63 ratio.


Another thing is crits=Norm +1.2 (and not +1), because if yu just +1, just take the case where all randomizers rolls lowest (ie 0) yu end up with a critmin = Normmax, while parses show clearly a gap between normal maxs and crit mins. Unless your formulas takes care already of an additional term to produce that gap ?
It accounts for this. The randomizer would never subtract more than 0.75, and crits would add 1.0, so crits would be at least 0.25 ratio over the max for normal hits. (At cap, minimum crit pDIF with this formula would result in 2.625 for one-handers, and 2.875 for two-handers.)


I have a question about the range 0.3 < cRatio < 0.6 : do we have proof crits distribution actually go "eat" inside normal hits distribution ?
Not sure I understand this correct, but are you asking if crits for low ratio fit the expected numbers for non-crits 1.0 ratio above? If so, yes, according to my data they fit, though some may be a few points off (but still within range). This can easily be explained by limited sample sizes.

Raelia
01-14-2012, 05:59 PM
You misread; according to the proposed theory, they would start happening at 1.625, albeit very rarely. I can confirm they start happening at least at 1.63 ratio.

My system pegs it at 1.6363~, or 18/11, so definitely agrees with this assertion. Maybe you should give it another look.

I've got +1.0 on crits too, but also narrows the range of Primary because a straight +1.0 ranges too low at high cRatio.

Or we can keep playing this game where you guys are ignoring my formula and still catching up on how to produce the 1.0 spike just because some few of you rightfully think I'm a self-aggrandizing douchenugget.

Rena
01-14-2012, 06:16 PM
One particular instance has it happening at 393/241 = ~1.6307 ratio, so less than your assertion. Furthermore, suggesting we shouldn't explore other ideas just because you propose another, unproven, theory is asinine. You do not have the amount of evidence necessary for me at least to disregard other possible solutions.

Suggesting we are 'still catching up' with reproducing the 1.0 caps and floors is funny though, since I came up with an idea to solve it in the very posts where I posted the information about where they occur for max normal/min crit pDIF. A solution was already proposed in this post (http://www.bluegartr.com/threads/108161-pDif-and-damage?p=4988119&viewfull=1#post4988119), before you posted (http://www.bluegartr.com/threads/108161-pDif-and-damage?p=4988616&viewfull=1#post4988616) that you had a solution. Develop your formula as you wish, but please stop attacking those of others.

And again, to repeat what I said in a previous thread, it has nothing to do with any particular feelings about you, so let me ask you again: drop the persecution complex.

Raelia
01-14-2012, 06:57 PM
The problem is you're allegedly sitting on the data that makes or breaks my system, so we can all keep Princessing about over it or you can put up or shut up about it being 'unproven' when I show it fitting Masa's >1.0 cRatio data like a glove.



One particular instance has it happening at 393/241 = ~1.6307 ratio.

Once again vague data. You can hit above a 3.0 post-Secondary in my system as early as 1.506 (116/77) cRatio, just at extremely low probability because it's Secondary pushing sub-3.0s over, so your assessment is false. I did misstate: Pre-Secondary capped 3.0s start at 1.6363~, so that's roughly the earliest you could see a nigh 3.15 'high Secondary' crit.

But this is exactly what I want. Tell me what the hell doesn't fit since apparently you're the paragon of coughing up such data.

Rena
01-14-2012, 08:16 PM
Sitting on data that breaks your system means we should ignore my new proposed one in favor of yours that cannot explain available data? Not quite buying that line of reasoning.

And that datapoint was indeed 3.15 pDIF. That I happened to have exactly such a datapoint is not as coincidental as you would think, as I specifically went out to see if I could produce results as would be expected from my proposed formula, which would mean a 3.15 crit at 1.625 ratio. With the highest level of lesser colibri's defense of 241, this would mean 1.625*241 = 391.625 rounded up = 392/241 = 1.626556~ ratio in order to produce a 3.15 crit. Since this would be quite rare, and I was somewhat low on time, and because I should probably find a mob with a defense rating more suited to producing an exact 1.625 ratio (see previously mentioned time constraints), I decided to try at 393/241 ratio instead for the time being, and attempt to produce better evidence for the 1.625 cap at a later time.

If you don't believe me, you're perfectly free to go reproduce the test yourself. 20 D weapon including fSTR, 63 damage was the result. Attack, defense and target noted above. Took about 14 kills to see it, if that is of interest.

Motenten
01-14-2012, 09:52 PM
Wanted to re-do my dhalmel test to check something regarding the distribution. I'm still looking over the distribution effects, but decided to use this for another check against the formulas being proposed.

Base damage: d42 (31 + 11 fStr)

Att: 551
Mob level is around 40, so should be far past cRatio cap. Previous test was also at cRatio cap.

Sample size (non-crit):
Original: 1382
New: 1395 (so far)
Total: 2777

Min Damage: 65 (pDif between 1.54762 and 1.57142) 3 occurrences
Max Damage: 103 (pDif between 2.4524 and 2.4761) 15 occurrences

Predictions:

Mote:
Minimum: 2.0 * (1+152/1024) - 752/1024 = 2.0 - 448/1024 = 1.5625. Match
Maximum: 2 + (capped) 400/1024 = 2.390625 * 1.05 = 2.51015625. Within scope, but not a match.
Max damage: 42 * 2.51015625 = 105.4265625

Rae:
Minimum: 2.0 - 0.55-(cRatio-1)/10 = 2.0 - 0.45 = 1.55. Match, but should result in higher frequency that Mote's.
Maximum: 2.0 + 0.30+(cRatio-1)/10 = 2.4 * 1.05 = 2.52. Within scope, but not a match.
Max damage: 42 * 2.52 = 105.84



Working through the probabilities, tried to figure out frequency of lowest damage value for each formulation. Expected frequency with 2777 hits:

Mote: 1.7
Rae: 9.7

With 3 observed samples, confidence interval is between 0.0002 (0.6 occurrences) and 0.0033 (9.2 occurrences). Raelia's formula therefore appears to be outside the confidence interval, though rounding effects due to integer math make that less certain.





Both formulas yield a max possible damage value of 105, whereas max observed was 103. The probability of -not- getting at least a 104 in 2777 hits is:

Mote: 1.9 * 10^-7 (pretty much impossible)
Rae: 1.4 * 10^-11 (pretty much impossible)

Given this consideration, I looked back at my formula. I changed it recently from capping at 384/1024 to capping at 400/1024 due to the probability issues that Rae brought up. If I drop it back to 384/1024...

Max damage: 42 * 2.375 * 1.05 = 104.7375
Probability of not hitting 104: 1.6% (still quite unlikely to not get a 104)

Masa's Woodville data prevent the primary modifier max from dropping much below this. A max of 147 on d59 means a minimum pDif of 2.4915. Factoring out 1.05 means max primary pDif has to be *at least* 2.373.


However there was one additional factor that was dropped in the process of accepting certain assertions in the recent discussions. Originally I floored the damage value before applying the secondary modifier. If I did that now:

With 400/1024 cap:
42 * 2.390625 = 100.40625 floored to 100. Should still see 104+.

With 384/1024 cap:
42 * 2.375 = 99.75 floored to 99. 99 * 1.05 = 103.95. Would never see 104.


How would that work on Masa's data? 59 * 2.375 = 140.125, floored to 140. 140 * 1.05 = 147.000. So it's -possible-, but seems unlikely given that 147 seemed fairly easy to hit, but the probabilities would imply it would occur about once in ~19,000 tries. Actual occurrence was 3 in 2170 hits.


I'm trying to work out if there's any way to determine whether or not the primary damage value is calculated and floored before the secondary multiplier is applied. I have a vague idea, but it's going to be difficult to test.

Motenten
01-14-2012, 11:09 PM
Planned test:

Base damage: 61 (H2H d53 (455 skill) + 8 fStr (+0 weapon, no +kick damage)
455+ skill: 424 base, 16 merits, 15 in gear. 7 hands, 7 neck, 3 ear

Target: Lesser colibri.
Cap fStr at +28 dStr. Vit of 55 (max) means fStr capped at 83 str or higher.
Cap attack at 482 att or higher, which only requires 17 att in gear.

Gear set:
Ursine Claws//Thew
Tantra+2/Faith/Brutal/Bruiser
Tantra+2/Tantra+2/Rajas/Epona
Atheling/Twilight/Tantra+2/Usukane

For max DA/TA/KA rates and 25% haste. Want at least 3000 non-crit hits. Should take about 2 hours (including time running between mobs).

Edit: Forgot to factor in the delay reduction on Tantra+2 body. It nets a slightly lower average delay per swing than Aurore. However I also found that going bare-handed completely trumps it; average delay per swing is a good 10% lower than using Ursine Claws (based on an estimated OAx distribution), so I'll just do that instead.


Anticipated values:

If capped at +384/1024 (0.375), max primary is 144.875
If floored, max is 151.2
If not floored, max is 152.119

If capped at +400/1024 (0.390), max primary is 145.828
If floored, max is 152.25
If not floored, max is 153.120

If capped at 2.4, max primary is 146.4
If floored, max is 153.3
If not floored, max is 153.72


So:
If max damage seen hits 153, cap is either 2.4, or 2.39 with non-floored primary.
If max damage seen hits 152, cap is not a floored 2.375.
If max damage seen is 151, cap is probably a floored 2.375.


Further refinements will be made after any exclusions are completed.

Raelia
01-15-2012, 01:22 AM
Simulated 50k hits with histogram. Floored Primary eliminated all 104 damage hits, but increased the expectation of 65 damage hits from 9.8 (you came in a bit low) in 2777 to 22.2.

However it also cut the occurrence of 103 damage hits to just 11.66 in 2777, down from 34.5 and a fair rate of 105 damage hits, bringing such into range. I think Secondary is too finely distributed (at least 16 steps, likely more than 32 steps) to see a flooring step before it except at an extremely low base damage, like a 1 damage one-handed weapon for 9 base damage that with capped Ratio should produce around 21.6 at capped Primary and well into 22 with a decent Secondary, but if Primary is floored first the margin for a 22 would be next to nothing. I'm sure a certain somebody just happens to have a 9 base damage sample floating about.

Rena's datapoint only contends the critical hit modifier I came up with just yesterday, so I'm not concerned with it just yet but I'm happy to have it. Moten's last post may yet tweak my normal Primary which changes the baseline of that crit mod anyway.

Rena
01-15-2012, 02:30 PM
I do actually, thanks for asking. My notes show that the maximum normal hit for a 9 D weapon does indeed equal 22, but this doesn't tell us much, since even with flooring, such a number is possible. You'd be better off asking about the D values for which a lack of flooring would result in a higher value than would be possible with flooring, such as 5, 7, or perhaps 15 D. Looking at my notes for those, all of the results match up with what would be expected if you include flooring.

Considering potentially inadequate sample sizes and such however, I went out and gathered up another few samples with a 15 damage weapon. 2.2k of them, to be specific. With a max pDIF of 2.375, we get 15*2.375*1.05 = 37.40625 for expected maximum value. If we include flooring, we get floor(15*2.375)*1.05 = 36.75. The result? Not a single 37 damage hit, which would be an indication that there is indeed flooring between the two steps. Of course it's impossible to completely rule out bad luck, and I might expand on the sample size later, but for now, these results are what I have.

On another note, I managed to produce a 3.15 crit at exactly 1.625 ratio. I also tried at 1.6245~ ratio, but no 3.15 crit was seen.

Motenten
01-15-2012, 04:37 PM
Confirming config

Gear set:
None//Thew
Tantra+2/Faith/Brutal/Bruiser
Tantra+2/Tantra+2/Rajas/Epona
Atheling/Twilight/Tantra+2/Usukane

Str: 93+26 = 119 (capped)
Att: 584 (capped)
Skill: 457 (53 base damage)

Got assistance from a friend, who came brd/whm for Haste and Marches to make things go faster. No spellcast. No gear changes except manually swapping to Hermes Sandals for running back to the start of the loop.

Hit/miss: 3964/194
Crits: 928
Non-crits = 3964 - 928 = 3036

Distribution, for reference:


Melee
95: 1
96: 16
97: 26
98: 36
99: 38
100: 68
101: 55
102: 49
103: 64
104: 51
105: 50
106: 66
107: 63
108: 44
109: 54
110: 63
111: 61
112: 50
113: 58
114: 64
115: 47
116: 76
117: 42
118: 58
119: 50
120: 64
121: 41
122: 50
123: 52
^ 124: 61
125: 60
126: 65
127: 61
128: 69
129: 70
130: 68
131: 59
132: 57
133: 57
134: 63
135: 64
136: 63
137: 75
138: 65
139: 56
140: 61
141: 61
+ 142: 82
143: 72
144: 70
145: 50
146: 36
147: 43
148: 38
149: 28
150: 13
151: 11
Melee Crits
160: 3
161: 5
162: 2
163: 14
164: 6
165: 11
166: 11
167: 33
168: 21
169: 19
170: 18
171: 14
172: 17
173: 19
174: 25
175: 17
176: 13
177: 22
178: 20
179: 18
180: 17
181: 22
182: 17
+ 183: 74
^ 184: 63
185: 69
186: 58
187: 64
188: 42
189: 59
190: 50
191: 40
192: 45



We see that, while 151 is relatively common (almost as many as 150), there were absolutely no instances of 152 or higher.

Probabilities:

If capped at +384/1024 (0.375), max primary is 144.875
If floored, max is 151.2
If not floored, max is 152.119
Probability of not seeing 152 in 3036 hits if not floored: 94.5%

If capped at +400/1024 (0.391), max primary is 145.828
If floored, max is 152.25
If not floored, max is 153.120
Probability of not seeing 152 in 3036 hits if floored: 42.4%
Probability of not seeing 152 in 3036 hits if not floored: 0.73%

If capped at 2.4, max primary is 146.4
If floored, max is 153.3
If not floored, max is 153.72
Probability of not seeing 152+ in 3036 hits if floored: 0.067%
Probability of not seeing 152+ in 3036 hits if not floored: 1.25 * 10^-5


Conclusions that can be drawn:

Max primary pDif cannot be 2.4
Max primary pDif can only be 2.391 if damage is floored, but at the moment seems the less likely of the available options. (Another 3000 samples would drop probability limit to under 20%.)
Otherwise max primary pDif must be 2.375; however cannot determine whether or not it's floored from this data set.


If we assume that 151 is the true max, the we can also infer that the primary multiplier max cannot be higher than 2.3770 (2 + 386/1024). And from Masa's data it has to be at least 2.373 (2 + 382/1024). Therefore the primary max multiplier at 2.0 cRatio is almost certainly 2.375 (2 + 384/1024).


Considering potentially inadequate sample sizes and such however, I went out and gathered up another few samples with a 15 damage weapon. 2.2k of them, to be specific. With a max pDIF of 2.375, we get 15*2.375*1.05 = 37.40625 for expected maximum value. If we include flooring, we get floor(15*2.375)*1.05 = 36.75. The result? Not a single 37 damage hit, which would be an indication that there is indeed flooring between the two steps. Of course it's impossible to completely rule out bad luck, and I might expand on the sample size later, but for now, these results are what I have.

Probability of not getting a 37 in 2.2k samples with the above setup if damage is not floored is 3.5%. I think that's enough to conclude that the flooring step exists.

Also, my test data plus Rena's instance of a max crit at 1.625 cRatio pretty much solidifies +0.375 as the cap value to add for max pDif.



On the other end, we got one instance of a value of 95. That requires a pDif between 1.55738 and 1.57377. Given the rarity, it's probably quite close to the upper end. 1.5625 (2 - 448/1024) would predict 3 instances in 3036 samples (probability of 0.00100). Confidence interval of 1 in 3036 with this sample size could allow for up to 6.4 instances in 3036 samples, so 1.5625 is within the confidence interval. A 1.55 min pDif would predict 13.4 instances, which is well outside the confidence interval.

As such, the minimum pDif is almost certainly higher than 1.55. 1.5625 is quite possible, but it could conceivably go as high as 2 - 440/1024 (1.5703125). That seems like a somewhat unlikely number, though.


Edit: moved the distribution graph to the next post. Incorporated some crit damage calculations in this one.


Crit damage:

Continuing from the above data just to see if anything can be gleaned from it, looking at min crit value.

Min crit seen was 160, which means a pDif of between 2.62295 and 2.63934. That's between +638/1024 and +654/1024. It does not match 1 + min non-crit pDif (1.5625).

Relative to 1 + cRatio (1 + 2.0 = 3), it's -0.36066 to -0.37705, or -370/1024 to -386/1024. It's conceivable it might be using the familiar -384/1024 (-0.375).

Motenten
01-15-2012, 05:42 PM
Here's a graph of the probability distribution for non-crits:

http://img692.imageshack.us/img692/4374/normd61at20cratiou.png

You can see the familiar difference in average frequency between the lower half and the upper half. Average frequency for damage values 100 through 121 (so past the 1.05 spread of the lowest range) is 56.3; average for damage values 122 through 144 (so not including the trailing 1.05 spread) is 63.5. Overall it's a 53:47 split.



pDif Distribution:

Overall average crit pDif was 2.974, 0.875% below 3.0.

Frequency of sub-3.0 and 3.0+ is 364 to 564, giving 3.0+ 60.8% of all crits.

With the 1.05 secondary spread, and accounting for flooring, approximately 15% of all points that originally landed below 3.0 would be pushed above 3.0.

If evenly distributed, the area of the lower half (0.4375) should have 16.67% more points than the upper half (0.375), with a balance of 53.85% to 46.15%.

If you shift 15% of 53.85% to the upper half, you end up with 45.77% to 54.23% for the lower and upper half, respectively.


If we take the observed imbalance in the non-crits, with an average frequency difference of 53:47, and apply it to the crit range:

53% of all points land in 0.375.
47% of all points land in 0.4375, and 15% of those are shifted to the upper half by the secondary spread.
Thus: 39.95% of all points land in the lower half, and 60.05% land in the upper half.

That's very close to matching the observed split of 60.8%/39.2%.


It would appear that two factors were implemented to compensate for the damage spread factor. Implemented on its own, the 1.05 secondary multiplier would increase all damage by 2.5%. So, they created an imbalance in the upper and lower half of the distribution to bring the average back close to cRatio. Unfortunately that imbalance was a bit too large, so they added an additional weight that favored the upper half of the pDif range.

Overall result is something that's very close to, but not exactly, an average pDif equal to cRatio.

Motenten
01-16-2012, 10:45 AM
Min crit from the collection of data points from my and Masa's test data seems to be flatly linear relative to cRatio, between +0.6230 and +0.6303 relative to cRatio (between 638/1024 and 645/1024).

http://images.bluegartr.com/bucket/gallery/36bc7c13ecdb6b711a48496acd3dec2c.png


That continues to support the idea indicating that min crit is -0.375 from the cRatio+1 line. cRatio + 1 - 0.375 = cRatio + 0.625 (640/1024).


Other evidence continues to support the idea that a crit is cRatio + 1, which we can define as the term critRatio. As such, we can say that min critRatio is critRatio - 0.375.


On the max crit side, it's a bit messier. Here's what I did.

First, plot max crit pDif range. As expected, this shows us approximately where max crit is hitting its cap. The highest cRatio we want to consider is ~1.625.

http://images.bluegartr.com/bucket/gallery/e6fcc07c5a4d747b91a618fe13096742.png

Next, plot the range of valid pDifs for max values relative to cRatio. Could have also been relative to critRatio, but this is what I already had in the spreadsheet. This shows us that max crit appears to be a flat offset.

http://images.bluegartr.com/bucket/gallery/734b05c3cfcf19e1f3a50120c4ccf4eb.png

Next we need to figure out what the primary max crit was. We know that there's a flooring step between primary and secondary multipliers, so we can pick values that we know can validly generate the numbers seen.

Here's the chart of confirmation steps:



Base D Max D Max/1.05 Ceil Ceil*1.05 Diff
31 90 85.71428571 86 90.3 0.3
31 90 85.71428571 86 90.3 0.3
31 90 85.71428571 86 90.3 0.3
31 90 85.71428571 86 90.3 0.3
31 89 84.76190476 85 89.25 0.25
31 91 86.66666667 87 91.35 0.35
31 90 85.71428571 86 90.3 0.3
31 90 85.71428571 86 90.3 0.3
31 91 86.66666667 87 91.35 0.35
31 93 88.57142857 89 93.45 0.45
58 175 166.6666667 167 175.35 0.35
59 179 170.4761905 171 179.55 0.55
59 182 173.3333333 174 182.7 0.7
31 94 89.52380952 90 94.5 0.5
58 180 171.4285714 172 180.6 0.6
31 96 91.42857143 92 96.6 0.6


This confirms that the ceiling values are valid for the max damage seen. So next we want a new set of max pDif values (relative to critRatio) for these calculated max primary damage values.

http://images.bluegartr.com/bucket/gallery/7ea36015bfd6d40de303921b2ae268a5.png

Min valid value would be 0.3552 (+364/1024). Max appears to be 0.3613 (+370/1024), however all of these are subject to low sample sizes, so max could conceivably be as high as 0.3800 (+389/1024).

Given that Rena observed a fully max crit at 1.625 cRatio, it seems likely that max crit is generally critRatio + 0.375, nicely mirroring min crit. A couple large sample sets at less than 1.6 cRatio would be needed to really help confirm it, though.

Motenten
01-16-2012, 10:56 AM
Additional note on secondary spread:

Max crit damage from my d61 test was 192. We can thus verify that, assuming calculations are done in /1024 units, the secondary multiplier range has to be 0-51, not 0-50.

50/1024 = 0.048828125
3 * (1 + 0.048828125) = 3.146484375
3.146484375 * 61 = 191.935546875, floored to 191

51/1024 = 0.0498046875
3 * (1 + 0.0498046875) = 3.1494140625
3.1494140625 * 61 = 192.1142578125, floored to 192

Masamune
01-16-2012, 11:36 AM
Those last posts' conclusions are pretty interesting Motenten.

Before posting additional info that might confirm your thoughts/findings, i have one question:

For a given cRatio, regarding the Crits Range (compared to normal hits range), is there a proof that it's not constant w/e cRatio is ? (i have no faith in my regression lines for CritMaxs and crit mins due to low sample sizes and even no data at low cRatios).
I'm asking this because i might have a demonstration showing crits are simply a translation on the left of normal hits...

Motenten
01-16-2012, 12:03 PM
Those last posts' conclusions are pretty interesting Motenten.

Before posting additional info that might confirm your thoughts/findings, i have one question:

For a given cRatio, regarding the Crits Range (compared to normal hits range), is there a proof that it's not constant w/e cRatio is ? (i have no faith in my regression lines for CritMaxs and crit mins due to low sample sizes and even no data at low cRatios).
I'm asking this because i might have a demonstration showing crits are simply a translation on the left of normal hits...

Technically, yes, you could just say that min crit is cRatio + 0.625 and max crit is cRatio + 0.625 + 0.750, but there's really no point when conceptually it's easier to consider it cRatio + 1, and then +/- 0.375.

Also, while not proof, there's still the issue of the imbalance in frequency results above vs below the central line (either cRatio or critRatio). As such, it's better to consider it as critRatio = cRatio +1, and then working with above and below that line. You can't really analyze the frequency imbalance if you treat it purely as a shift from cRatio.

And, while I'm not entirely sure you're implying this, no, it's not possible that crits are simply using min/max normal pDif + 1. Those lines have entirely different slopes.

Masamune
01-16-2012, 12:10 PM
Ok thanks.

BTW, by "imbalance in freqs each side of central line", do you mean the pDIF=3 line ?
If yes, i think there is an explanation (which is similar for the generation of the pDIF=1 spike): as cRatio increases, more and more values goes above pDIF=3, so the cap function interferes, putting those values back at pDIF=3+randomizer, hence yu see thse freqs above 3 barely slightly higher than those below when cRatio just passed above 1,65; but then yu starting to see them really noticeable when cRatio goes above 1,8ish+, that's proof of the effect of the cap function.

Motenten
01-16-2012, 01:29 PM
Ok thanks.

BTW, by "imbalance in freqs each side of central line", do you mean the pDIF=3 line ?
If yes, i think there is an explanation (which is similar for the generation of the pDIF=1 spike): as cRatio increases, more and more values goes above pDIF=3, so the cap function interferes, putting those values back at pDIF=3+randomizer, hence yu see thse freqs above 3 barely slightly higher than those below when cRatio just passed above 1,65; but then yu starting to see them really noticeable when cRatio goes above 1,8ish+, that's proof of the effect of the cap function.

No, I mean this:

http://img692.imageshack.us/img692/4374/normd61at20cratiou.png

This is frequency of damage values for normal hits at 2.0 cRatio. Base damage is 61, so central point is 122 damage.

(Check post #58 in this thread for more details, and post #12 in Rae's thread for more graphs.)

Raelia
01-17-2012, 04:54 PM
Max crit damage from my d61 test was 192. We can thus verify that, assuming calculations are done in /1024 units, the secondary multiplier range has to be 0-51, not 0-50.

50/1024 = 0.048828125
3 * (1 + 0.048828125) = 3.146484375
3.146484375 * 61 = 191.935546875, floored to 191

51/1024 = 0.0498046875
3 * (1 + 0.0498046875) = 3.1494140625
3.1494140625 * 61 = 192.1142578125, floored to 192

This can also be interpreted that your /1024 complication isn't necessary here, and it's just 5%. Rena hitting a perfect 3.15 hints to that as well.

I still think it's a huge red herring, but that's for you to decide.

Motenten
01-17-2012, 11:02 PM
Good point. It's almost certainly not a /1024 unit, then.

It's mainly an issue with trying to determine the random range, though. 50/1000, say, gives you 50 possible increments off the base value. 21/20 doesn't give you much to work with. This assumes we're still dealing with integer math, since there's no evidence that anything in game deals with floating point math.

Motenten
01-20-2012, 06:26 PM
Just recording a bit of info dealing with some math I'm going through right now, on the ratio of total damage resets out of all results from the lvl 82 Greater Colibri parse (warp cudgels).




Motenten
Melee
17: 14
18: 26
19: 22
20: 16
21: 18
22: 25
^ 23: 79
+ 24: 81
25: 14
26: 21
27: 17
28: 17
29: 14
30: 14



avg below 1.0 (except d17): 21.4
Excess at 23/24: 118
Total below 1.0: 121
Fraction reset: 118 / (118+121) = 49.4%

cRatio: 1.03
min pDif: 0.75
If that covers ~50% of generated pDifs, lowest min pDif before resets should approx. equal 1.03 - 0.75 = 0.28; so, 0.75 - 0.28 = 0.47
Effective total subtraction: 1.03 - 0.47 = 0.56

min pDif offset using 152/752 equation:

1.03 * 152/1024 - 752/1024 = -0.5815


This assumes that the upper half and lower half of the damage ranges are calculated separately. All excess results at ~1.0 pDif come from the lower half exceeding the limit of ~0.75 and being reset to 1.0.

This implies damage should fall below 1.0 at about 1.28 rather than the assumed 1.25 (guesstimating 1 + 288/1024, or 1.28125). Masa's data has data points at 1.281 and 1.249, with damage falling below 1.0 in the 1.249 sample set. There's no conclusive evidence that it can't fall below 1.0 at a slightly higher cRatio, though.

Motenten
01-21-2012, 02:10 AM
410 att vs greater colibri

cRatio:
Lvl 81: 1.27329
Lvl 82: 1.25382


Want to find out if it's possible to get a damage value of less than 1.0 at either of those cRatios.

Setup: 99 thf/dnc, no spellcast, no gear swaps

300 skill in club

warp cudgel/warp cudgel/raider boom//
AF3/Agasaya/Brutal/Aesir
AF3/AF3/Dark/Epona
Atheling/Twilight/AF3/Skadi

Total attack: 410
Str: 90+12 = 102
Max fStr: 9, reached at 99 str; capped fStr

Total base damage: 15+9 = 24

Test if damage below 24 is ever seen. If it -is- possible, it should not be terribly uncommon (one in a few dozen to one in a few hundred).


Results:

1042 hits, 300 crits, so 742 non-crits. Minimum damage: 24.

Appears that 1.25 is likely the limit on cRatio for when minimum pDif can start dropping below 1.0.


Minor aside: 11 TH procs in 1042 hits, putting proc rate without SATA at about 1%. Had to fix parsing of the TH message, since it changed since it was first introduced.


Am concerned about the probability distribution aspects of the 1.05 multiplier after the apparent floored primary damage amount.

Lvl 81 birds:
24 dmg: 88
25 dmg: 108
26 dmg: 19

Lvl 82 birds:
24 dmg: 56
25 dmg: 57
26 dmg: 12

If floored at 1.0, the secondary spread should give a range between 24.0 and 25.2, or only about 1/6 of all values should fall on 25, with the vast majority on 24. Instead they're about even, or even favoring 25 damage in the case of the lvl 81 birds.

Not sure what to make of this yet.

Motenten
01-21-2012, 09:49 PM
Progressing on the idea that there's only a single set of equations for all Ratio values, whether normal or crit hits, I did some new sets of graphs.

Plotted all of my and Masa's data (108 total combinations of attack, defense and crit values, for both 1H and 2H weapons) against wRatio. wRatio (working Ratio) is equal to cRatio for normal hits, and equal to cRatio + 1 for crits. Therefore all crit data is plotted as if it were on the same base as normal hits, rather than having a separate set of lines for them.

http://images.bluegartr.com/bucket/gallery/34b08d449cfcced872e85ab071ce4f77.png

As you can see, it fits together perfectly. Along with the limits I've been seeing in the calculation estimates, I'm convinced that there's only two sets of equations (one for above wRatio and one for below wRatio), and not separate equations for crits vs non-crits, or 1H vs 2H.

I'm refining my model now to build a complete description in as simple a set of equations as I can. At the moment it fits extremely well for 1.25 wRatio and higher, but fails a bit for values below 1.25.

Motenten
01-21-2012, 11:13 PM
Notes for changes to my calculations. Posting for reference, but you probably won't care about the details.

Adjustments:

Original:
Max upper pDif limit = wRatio * (1 + 240/1024)

Found sample where 240/1024 is insufficient.

BD: 97
Att: 337
Def: 235
cRatio = 1.4340
Max damage: 180
Max damage without 1.05: 172
pDif required for 172 damage: 1.7732

Multiplier required to reach 1.7732: 1.7732 / 1.4340 = 1.2366

.2366 = at least 243/1024

Cross-checking, found several other failure points at 240/1024. It's a good match for almost everything from 1.4 on upwards, but clearly isn't fully correct.

250/1024 is a good fit for everything at 1.2 wRatio or higher, and even 256/1024 works. However there appears to be a minimum cap of about 0.3 (300/1024 is too low; 304/1024 would work).

Apparent formula:

wRatio * 0.25, minimum of 0.3, maximum of 0.375




Minimum lower limit:

The required difference between wRatio and minimum output pDif for wRatios below 1.25 has to be -at least- 0.2632 (270/1024). I had left it uncorrected at the 0.25 difference implied by the test which showed that min pDif didn't seem to drop below 1 at 1.26 or 1.27 cRatios.

If the min limit is 272/1024 (34/128), that's 0.265625. If that were the case, the level 81 birds on my test still wouldn't have dropped below 1.0, though the lvl 82 birds should have still had a chance to, though with only about a 60% chance of showing up.

It's difficult to tell given the limited data points at the low end range, but it appears that the minimum damage limit still keeps the 152/1024 slope of its higher counterpart, just not offset as much. If that's so.... rather than a hard cap on the difference between wRatio and minimum damage, it may be another equation:

1.25 * (1 + 152/1024) - x/1024 = 1
x = 446
Going to use 448

So the lower limit on damage is the lesser of:

1 - wRatio
and
wRatio * 152/1024 - 448/1024

And that fits the data pretty well.

Motenten
01-21-2012, 11:24 PM
My current model (full description):


Abbreviations:
BD = base damage
HPL = high pDif limit (highest possible pDif)
LPL = low pDif limit (lowest possible pDif)
HPR = high pDif range (from cRatio to HPL)
LPR = low pDif range (from cRatio to LPL)

Standard stuff:

Ratio = Att/Def
Ratio is capped at [0 .. 2.0] for 1H and H2H weapons, and [0 .. 2.25] for 2H weapons.

LC = Level Correction = Mob level - player level (minimum of 0) * 0.05
cRatio = Ratio - LC


Algorithm:



wRatio = working Ratio

Check crit rate.

If crit:
wRatio = cRatio + 1
else
wRatio = cRatio
endif


Hi/Low pDif range check (HLR)

If High:
Basic Limit = wRatio * 0.25
Basic limit cannot be greater than 0.375 or less than 0.3
Output limit (not defined for low wRatio values, yet)
Random value (pDif) is generated between 0 and the basic limit.
If pDif is greater than the Output limit, set final pDif to 1.0
Otherwise add pDif to wRatio to get final pDif.
else if Low:
Initial limit = wRatio * 152/1024 - 752/1024
Initial limit cannot be greater than (closer to 0 or positive) -384/1024 (-0.375)
Output limit = 1 - wRatio
Output limit cannot be greater than (closer to 0 or positive) wRatio * 152/1024 - 448/1024
Random value (pDif) is generated between 0 and the initial limit.
If pDif is less than the output limit, set final pDif to 1.0
Otherwise add pDif to wRatio to get final pDif.
endif

Primary damage = BD * final pDif, floored.

Secondary randomizer = random(0 .. 0.05) (possibly 0..50 out of 1000)
Multiply the primary damage by the secondary randomizer, floor the result, and add to the primary damage.






Critical parts simplified and written in more mathematical/excel terms:




If High:
Initial Limit = MIN(MAX(wRatio * 0.25, 0.3), 0.375)
Output limit (undefined)
Random value (pDif) is generated between 0 and the initial limit.
pDif = Rand(0 .. Initial Limit) + wRatio
If pDif > Output Limit, pDif = 1.0
else if Low:
Initial limit = Min(wRatio * 152/1024 - 752/1024, -0.375)
Output limit = Min(1 - wRatio, wRatio * 152/1024 - 448/1024) + wRatio
pDif = Rand(0 .. Initial Limit) + wRatio
If pDif < Output Limit, pDif = 1.0
endif






Equations used in the excel spreadsheet to generate the Min Calc and Max Calc lines:


Min Calc:

A = wRatio + MIN(wRatio*(152/1024) - (752/1024), -0.375)
B = wRatio + MIN(1-wRatio, wRatio*(152/1024) - (448/1024))
Min Calc = MAX(A, B, 0)

Max Calc:

A = wRatio + MAX(MIN(wRatio * 0.25, 0.375), 0.3)
B = undefined
Max Calc = MIN(A, 3.0)



Graph showing how the above equations match the observed data. Calculated predictions for each cRatio are given orange lines, with the max pDif having cyan markers and the min pDif having blue markers (may be a bit difficult to see). These are generated with the 5 spreadsheet formulas in the above spoiler.

I do not yet have a proper definition to generate the 1.0 cap of the max pDif for cRatios below 1.0.

http://images.bluegartr.com/bucket/gallery/668405832795b5c3c79296c235055ee8.png

Masamune
01-22-2012, 03:10 AM
Superb Mot^^ Finally someone going same direction as me ^^

But there are 2 things i don't understand :
- When i asked you if your previous studies were more suggesting toward saying crits and normal pDIF had same range, you answered they definitely different due to different slopes... but here you now writing both crits and normal use same HPR and LPR ???
Kinda contradicting the answer you gave me in previous post (http://www.bluegartr.com/threads/108161-pDif-and-damage?p=4995582&viewfull=1#post4995582) isnot it ?
EDIT: so the RANGE = wRatio +/- 0.375 ?
- 2 floorings ? Is it possible to generate a distribution showing "holes" (missing numbers) from a formula which 1st floored part generates only integers ?
(refering to that parse with THFknife piercing bonus showing missing numbers ending with "4" and "7")

Great idea to put both crits and normal pdif in same graph, much easier to pinpoint the RANGE's equation ^^ (Did you check my PM?)

EDIT: check PM also for a possible answer to:

I do not yet have a proper definition to generate the 1.0 cap of the max pDif for cRatios below 1.0.

Byrthnoth
01-22-2012, 03:44 AM
The plateau would be a natural outgrowth of Motenten's formula, I think.

I have still been unsuccessful finding a Raphael's Rod. Is a Warp Cudgel good enough for the low pDIFs? I thought that low base damage + low multiplier would result in very low resolution relative to what we want.

Masamune
01-22-2012, 04:35 AM
Yea best to use highest possible basedmg weapon to get best resolution, but will have to parse longer since more dmg values will be generated. You have an idea to parse @ LowRatios ?
(Personnally im leaning toward Bluffalos Abyss-Uleg, they r pld and seems to have pretty high def and no "screwing TPmoves", but i'm getting troubles finding a way to get their levels "on the fly")
EDIT: i see on BGwiki those Bluffalo's levels caps @ 100, any proof doesnot go higher ? if yes, then would be easy: i d just have to target all the T ones since i'm lvl99.

For Motenten:
I think i understood your reasoning for RANGE: you first calculate both crits and normal pdif range as if they have same range, then if it is crits you apply some capping conditionals ?

Motenten
01-22-2012, 11:41 AM
- When i asked you if your previous studies were more suggesting toward saying crits and normal pDIF had same range, you answered they definitely different due to different slopes... but here you now writing both crits and normal use same HPR and LPR ???
Kinda contradicting the answer you gave me in previous post isnot it ?

First, how I arrived at the conclusion:

crit pDif range min and max have constant value HPR/LPR values. Normal pDif range min and max have sloped values.

However I already know that normal max pDif has a cap of 0.375 (this shows up around 1.6 cRatio). I had not considered it to be the same formula before because I hadn't worked out that max crit pDif was also 0.375. It was the fact that they were the same that led me to the second half of the observation.

Min crit pDif is constant at -0.375 for a large chunk of the observed data. Min normal pDif is sloped. However min normal LPR size is always larger than 0.375, but is constantly decreasing. It makes sense to consider that it -also- has a cap of -0.375, which then eventually shows up when wRatio moves into the range of the crits we've been looking at.

Essentially, LPR has a 'minimum safe distance' of 0.375, while HPR has a 'maximum safe distance' of 0.375. LPR reaches 0.375 (min pDif of -0.375) at about 2.42 wRatio.


As for contradicting my previous post, no it does not. Because of the confused way that you worded your post, I guessed that you were asking if max crit pDif = (max pDif of cRatio + 1), which it does not. What I've asserted with this model is that max crit pDif = max pDif of (cRatio + 1), which is a different thing entirely. Same for the minimums.



EDIT: so the RANGE = wRatio +/- 0.375 ?

Only for certain values of wRatio. The above only holds above 2.42 wRatio (when min pDif is capped at -0.375), though you can also say (depending on your exact definition of RANGE, which you didn't specify) that it also only holds for up to 2.625 (when max pDif is capped at 3.0).



- 2 floorings ? Is it possible to generate a distribution showing "holes" (missing numbers) from a formula which 1st floored part generates only integers ?
(refering to that parse with THFknife piercing bonus showing missing numbers ending with "4" and "7")

If you mean that the final output value of certain numbers don't show up at all, I don't think so. The second multiplier isn't a flat addition like the 25% piercing damage bonus, or 14% crit damage bonus or whatever. It's an entire random range itself, between 1.00 and 1.05. As such, since every original value was there before the first flooring, every value must also be there after the second multiplier.

However if you mean that certain numbers in the final output have extremely low frequency, maybe. I don't have a means (though I suppose I could write something) of generating sample distribution handy, so I haven't looked into it myself, yet.



(Did you check my PM?)

Yes, but it's enough of a mess that I just don't know how to respond to it yet.


I think i understood your reasoning for RANGE: you first calculate both crits and normal pdif range as if they have same range, then if it is crits you apply some capping conditionals ?

First part: maybe (I'm not sure you mean what I think you mean; please define 'range', since it can apply to several different parts of the formulas)
Second part: No. The -only- thing a crit does is add 1 to cRatio (which becomes wRatio). Everything else is based on a value relative to wRatio. The caps are inherent in the formulas themselves; otherwise the min and max ranges would get too close to or too far away from wRatio.



EDIT: i see on BGwiki those Bluffalo's levels caps @ 100, any proof doesnot go higher ? if yes, then would be easy: i d just have to target all the T ones since i'm lvl99.

Well, it's known that mobs in Visions zones (La Theine, Konschtat and Tahrongi) cap at level 90, and that mobs in Scars zones (Misareaux, Vunkerl and Attohwa) cap at level 95. It makes sense to assume that mobs in Heroes zones (Altepa, Uleguerand and Grauberg) cap at level 100.

Masamune
01-22-2012, 01:06 PM
Ok sorry if my wordings didnot sound clear, here some clarifications what i meant:

In terms of building a randomized step as defined on wikipedia.org (Y = START + INT(RANGE * Generator)), i've worded "range" as simply as width between max and min parsed values, ie the number of generated values between max and min. I'm not thinking at all, at this point, about wRatio lines.

Then i tried to reproduce the "behavior" of frequencies as shown in parses (Note there i'm still not looking at particular values yet, except for example cRatio=1 must yields DMG=BaseDMG with a spike litterally centered within the distrib). I did this with what wiki calls "Generator".

Once this done, i'm trying to find/combine my approach from frequencies study with your observations on particular numbers. That i hope to do it within what wiki calls "RANGE". So not surprising i didnot specify anything since it's yet to be determined XD

Now, about my question the floorings: check the triple parses with THFknife Attack343, the sample size is enough to rule out the arguement "missing numbers ending with 4or9 must be superlow freq" and the regularity of those holes also, it's clearly an artifact from the term * (1+12.5%) of piercing bonus (AND unfloored base value in my opinion). Take for example the parse on Lcoli65: missing numbers 49 54 59 64 69 ... 79, while parsed all single other value within the range.
So if we assume there are 3 floorings ie DMG= Floor(Floor(Floor(OriginalDMG)*(1+5%*2ndaryRand))* (1+12.5%)), that means those holes can only be generated if the original function before the 1st floor() has also holes.
That could be possible to implement but honestly it's much easier to simply assume there is only one single floor() ie the last one. That's why i brought up this when thinking about fine tuning your observations.

Regarding the explantions i gave yu in PM, i discovered a mistake: the base function generates semi-correctly the different frequency spikes but their width arenot varying with the 2ndary randomizer, which they should. So i'm reworking the conditionals, but the general graphically reasoning stays the same.

Thanks for the Bluffalos answer, i'll take some time to get their stats assuming EM and T ones = 2 levels range (resp. 99 and 100). I need to reparse at cRatios=1.5, 1.25, 1, and 0.75, to better see the proportion between the range of normal and crit PDIFs, currently all parses have way unsufficient sample size for crits so can't compare their range with the range of normal hits.

Motenten
01-22-2012, 02:08 PM
In terms of building a randomized step as defined on wikipedia.org (Y = START + INT(RANGE * Generator))

Aside: I've actually not been able to find what page you got that formula from. Can you please provide the article link?

The main problem (from which many other problems derive) is that you're assuming you can create a custom Generator function that will give shape to all of the observed output, whereas the intrinsic understanding of that function (why it's written that way on the wiki in the first place) is that Generator is an abstraction/placeholder for the computer's Rand() function. In virtually all cases, Generator will output one of two things: a flat, even distribution of values between 0 and 1, or a statistical "bell curve" distribution of values between either 0 and 1 or -1 and +1. Even then, there are almost no general cases of the latter; the default assumption is -always- a flat, evenly distributed randomization, and the only question is whether it's a "true" random or a "pseudo" random (because it's difficult for computers to generate "true" random numbers).

The reason it uses RANGE * Generator is that that formula can generate can any sequence of evenly distributed numbers within that range, since the values that Generator creates are between 0 and 1 (greater than or equal to 0, less than 1). Multiply Rand() by 50 and you get random values between 0 and 49; multiply Rand() by 87 and you get random numbers between 0 and 86; etc, etc. You can add the Start value to that if you want to offset the result. For example, 100 + 50 * Rand() generates values between 100 and 149 instead of 0 and 49.

All that is doing is giving you the basic formula for how to make a simple, evenly and randomly distributed set of numbers within a specific range of values. It's such a basic and low-level tool that I don't even touch on it in my model; it's assumed that if you're dealing with this sort of math you understand such a fundamental concept, and it's everything that you build *on top* of that that matters.


So, the difficulty in responding to your PM is that you're not even working in the same problem space that I am.



i've worded "range" as simply as width between max and min parsed values, ie the number of generated values between max and min. I'm not thinking at all, at this point, about wRatio lines.

I should note that I'm not considering "range" in the same way. For me, the distance between wRatio and max, and the distance between wRatio and min, are two separate entities. While they can be combined to give a total min-to-max range, there are peculiarities in the output that I want to examine in a more detailed fashion, and that requires that they be kept separate. It's also easier to generate the 1.0 pDif spikes if they're kept separate.



it's clearly an artifact from the term * (1+12.5%) of piercing bonus

(1 + 25%), actually, but yes.


(AND unfloored base value in my opinion)

This, on the other hand, no. Simple example:



Base value (floored) Piercing bonus dmg
40 50.00 => 50
41 51.25 => 51
42 52.50 => 52
43 53.75 => 53
44 55.00 => 55 *
45 56.25 => 56
46 57.50 => 57
47 58.75 => 58
48 60.00 => 60 *
49 61.25 => 61
50 62.50 => 62


Here you can clearly see that final damage values 54 and 59 were skipped. Now do the same thing without flooring the base value (say between 43 and 44)



Base value (unfloored) Piercing bonus dmg
43.0 53.750 => 53
43.1 53.875 => 53
43.2 54.000 => 54
43.3 54.125 => 54
43.4 54.250 => 54
43.5 54.375 => 54
43.6 54.500 => 54
43.7 54.625 => 54
43.8 54.750 => 54
43.9 54.875 => 54
44.0 55.000 => 55


Here you can clearly see that if the damage before applying the piercing bonus was not floored then we would see 54 damage results in the output. Since we do not, clearly we cannot be dealing with unfloored damage values before this step.


that means those holes can only be generated if the original function before the 1st floor() has also a hole.

No, it does not.


That could be possible to implement but honestly it's much easier to simply assume there is only one single floor() ie the last one.

No. It's simplest to assume that it's floored in 3 separate stages. The number of tricks that would ne necessary to generate an output that would leave holes only after the final flooring step while not flooring anything prior to that is staggering, and makes no sense whatsoever.

Motenten
01-22-2012, 02:21 PM
The plateau would be a natural outgrowth of Motenten's formula, I think.

I have still been unsuccessful finding a Raphael's Rod. Is a Warp Cudgel good enough for the low pDIFs? I thought that low base damage + low multiplier would result in very low resolution relative to what we want.

I think as long as you have a sufficient number of cRatio/wRatio values it should work. A small handful of set points would be difficult to pin down, but a dozen or more would be far easier.

Raelia
01-22-2012, 05:03 PM
Remember: It's much easier in actual programming of the game for that plateau to be caused by a separate function than for it to be any explicit part of pDif randomization. The 'set to 1.0 below 1.0' and 'add 0.25 below 0.75' is a bitch to model mathematically, but comes out easily in programming language.

Trying to cram every artifact in mathematically when in reality it's probably two lines of code (one for a good coder, but this is SE) after the main calculation/randomization is just going to cause problems. Need to be looking at programming a simulation in Python or Matlab that can handle such relatively simple conditionals.

Masamune
01-22-2012, 05:11 PM
Ok for the floorings examples i thought your last example would actually help pindown possibilities (like saying only 1 "43.x" can generate 54 after piercing bonus), but well indeed there is a risk to make things more difficult ...

Yes i were searching for that PseudoRandomGenerator on wiki but it's actually from a french pdf speaking about statistical discrete math. The basics is exactly like you explained and sound like completely different approach but...

Since i guessed a bit how you work from our work together last year on that topic, i was pretty sure you would skip/avoid the frequencies study (except the "imbalance" thingy within a given cRatio range), pretty much like CDF and Raellia also, assuming that getting a close approximation of the min and max for normal and crit pdifs should be enough.
Fair enough, np ... except one problem i discovered just before dropping those studies: those frequency spikes are actually what skew/control all the PDIF averages, especially at caps and plateaux, which is the main thing everyone need (alongwith mob's stats)!

Sure could always implement like 5 different pieces of functions replicating each parts of cRatio with all their corresponding freq spikes, but honestly, as a dev yourself, does that make sense compared to a single unique function generating everything ?

That's why i went into that, hoping i could then share here my findings on freq study so can later COMBINE your thorough observations posted here, and a valid freq model. So yea i tried to explain simply with each reasoning step, hoping that would help you in some directions. Apparently, that's the case given last posts where you start to think about a unique function for both crits and normal pdifs, as a "translation" like Rena mentioned earlier in this thread.

Now this is getting to the point with :

I should note that I'm not considering "range" in the same way. For me, the distance between wRatio and max, and the distance between wRatio and min, are two separate entities. While they can be combined to give a total min-to-max range, there are peculiarities in the output that I want to examine in a more detailed fashion, and that requires that they be kept separate. It's also easier to generate the 1.0 pDif spikes if they're kept separate.
That "imbalance" effect you noted is indeed a signature, but i think it's provoked from something else within the function so i left that for the end, when other main signatures are reproduced.
While putting my nose again into my freq study, i had to came back to the original function i built "on top" of the basic formula you described above, which is composed of 2 separate conditionals within the "generator". These allow to generate and position a spike within a random distribution whose range is known. I didnot put it in the PM to simplify the explanation but here it is :

DMG = Floor((START + Floor(RANGE * Generator)) * (1+RAND()*5%))
START: let's be simple lol = BaseDMG
RANGE = to be determined at the end with your observations here, and yes i'm aware you consider it actually as HPR+LPR.
Generator = IF(MIN+RAND1>0;0;MIN+RAND1) + IF(MAX+RAND1<0;0;MAX+RAND1)
RAND1 = RAND()+IF(RAND()<CritRate;CritCoef;0)
RAND() is the basic excel randomizer, uniformly generating within [0;1[
MIN = a*cRatio+b; MAX = c*cRatio+d; see below.
CritCoef is what separates crits from normal, will be finetuned later like RANGE...

Put that generating 5k values and plot the freqs for a given cRatio, then manually play different cRatio to see the graphic showing a huge freq spike at exactly DMG = BaseDMG.
That spike's width is also controlled by 2ndary randomizer: if 0% it boost the freq of a single value (BaseDMG here), but at 5% it boosts 3 values (BaseDMG and also BaseDMG+1 and BaseDMG+2), conform to signatures.
That spike appears only if cRatio=pdif is within the range of generated values, we'll see below with MIN and MAX.

At this point, which parameter to start determination for? There i don't remember how i ended up to this, but i started with this observation: freq spike at cRatio=1 must be centered. That's where i chose the coefs a b c d to obtain:
MIN=MAX= cRatio-1.5

So i simplified into Generator=cRatio-1.5, from there the reasoning is already in the PM but... i discovered that simplification actually "broke" the observation italicized above.

So i'm now trying to re-work MIN and MAX 's coefs and i'm getting already tons of "HPR/LPR imbalances" just with this formulation. Just need time to get proper simple coefs...

I'll stop there, don't want to pollute your topic while actually the only common problem to solve from our approaches is RANGE (or HPR+LPR in your case).

I'm not sure to understand your explanations about HPR and LPR, i just wanted to know if they are functions of cRatio or just constants...

P.S. if you need more explanations/formulas, i can send you my Excel files.

Motenten
01-24-2012, 11:51 AM
Update on the max pDif calculation. Can generate the 1.0 cap on pDif at lower wRatios with:

Max Calc:

A = wRatio + MAX(MIN(wRatio * 0.25, 0.375), 0.3)
B = wRatio + MIN(1-wRatio, 0.5)
Max Calc = MIN(MAX(A, B), 3.0)


This generates a 1.0 cap for wRatios between 0.5 and 0.7. 0.7 at the high end because that's the point that the A line intercepts 1.0. 0.5 at the low end because that's roughly where it's presumed that max starts falling below 1.0 again.

Note that this is linear below 0.5, with a max pDif of 0.5 at 0.0 wRatio. I don't know how accurate that is, since we have no real data in that region.

Here's a graph of what the full extent looks like, now:

http://images.bluegartr.com/bucket/gallery/df79c839d68acd2c6e7948735411ab1e.png

Masamune
01-25-2012, 03:57 AM
- Did you check if this generates actually a freq spike WHENEVER the point {cRatio;pDIF}){1;1} is generated ? (and static, not "moving" with max and min)

- Those plateaux must also have a spike with increasing freq intensity: highest @ cRatio=1.25 (same intesity as the one from 0.7~<cRatio<1.25), reducing until none at all @ cRatio=1.5.
Despite lack of data, i think the opposite should also be observable at other plateau: highest @ cRatio=~0.75, to none at 0.5.

In the end, i think that spike is what produces the skewed average pDIF=0.8*cRatio+0.2 on the range 0.5<cRatio<1.5.

Motenten
01-25-2012, 01:05 PM
- Did you check if this generates actually a freq spike WHENEVER the point {cRatio;pDIF}){1;1} is generated ? (and static, not "moving" with max and min)

These formulas only define the limits of the values that can be generated, not how those values are generated. As such, it can not and does not generate any spike. In fact, at the moment it can't generate any value between the min and max at all.


Those plateaux must also have a spike with increasing freq intensity: highest @ cRatio=1.25 (same intesity as the one from 0.7~<1.25), reducing="" until="" none="" at="" all="" @="" cratio="1.5.<br"> Despite lack of data, i think the opposite should also be observable at other plateau: highest @ cRatio=~0.75, to none at 0.5.<1.25),>

At the moment we know that there is a spike in the 1.25-1.50 range, however we don't actually have any data on the 0.5-0.7 range, so can't assert that there is a spike there as well. I can't complete a definition for the random distribution until some more points are solidified.

Rena claims to have data in that region, but has not actually provided any numbers. Byrth has started testing at the extreme low end. I'm considering some testing in the middle-low range.

Masamune
01-25-2012, 03:07 PM
I have a parse coming too at cRatio=~0.51 on EM Bluffalos, so far it confirms crits "eats" into the plateau of normal hits, but sample size still too low to confirm with certainty if the spike disappeared...
Other interesting thing i discovered is.... dmg is no longer floored at 0: min i did so far is 11.

Yea i asked rena too about this data in this same thread if i remember correctly...

IMHO i think the 2 most important slopes to determine are:
- the one @ 1.5 < cRatio < 2 (pretty much determined now)
- the one @ 0 < cRatio < 0.5 ...
.... because i think the RANGE term within the PseudoGenerator is simply the range between those 2 slopes ... the term Generator defining how to "reset" values generated above/below plateaux, into 1 (making spikes appear)...

EDIT: also little correction:

At the moment we know that there is a spike in the 1.25-1.50 range, however we don't actually have any data on the 0.5-0.7 range, so can't assert that there is a spike there as well.
Look at graphs in last sheet of my excel sheet with all distributions plotted into freq graphs. If you look closer you will notice that spike is basically present ALWAYS whenever the value pDIF=1 is expected within the expected range, ie the spike is present at ANY cRatio < 1.5, not just 1.25 < cRatio < 1.5 ...
Yea there is missing data below 0.73 but the parses shows that most likely spike continues all the way down to cRatio=0.
I think this spike even "transfers" to crits when pDIF=1 goes into crit pdifs @ cRatio < 0.5

Motenten
01-26-2012, 12:51 AM
Look at graphs in last sheet of my excel sheet with all distributions plotted into freq graphs. If you look closer you will notice that spike is basically present ALWAYS whenever the value pDIF=1 is expected within the expected range, ie the spike is present at ANY cRatio < 1.5, not just 1.25 < cRatio < 1.5 ...

Ah, I missed the Brass Jadagna data; forgot about that. Added that in to see how things match up.

Min pDif: still a near-perfect match. Am pretty certain that this is correct.

Max pDif: Mine predicts values that are a bit higher than observed. From looking at the values, I'm pretty sure my estimate is not fully correct.


Edit: Also, out of curiosity, what damage weapon are you using for that test? Is it a (total) ~d75?

Masamune
01-26-2012, 02:26 AM
er... which test: the one i'm doing atm, or the brass jadagna one ? The BJ one is d45, i don't know what you mean by "(total) d75".

For max pDIF values parsed bit higher than predicted, imho you shouldnot care about because i'm not sure those are the true absolute maxs, despite the sample size...
i'll also planning a parse @ cRatio=1, the ones i have already have insufficient sample especially for crits, but now with GnarledHorn+DarkDepths = 50/50 parsed crits/normals :p The goal of this parse will be to check the proportion of generated values between crits and normals, then can compare it with another parse @ cRatio=0.75.
Those 3 parses (cRatios=0.5, 0.75 and 1) should provide 3 clean points for the crit min/max slopes.

Motenten
01-26-2012, 09:02 AM
The one you're doing at the moment. Obviously I can just look up the base damage on the brass jadagna one, but you haven't provided any info about the setup of the one you're currently doing except for the target. (total) means including fStr, but you may not know that, so just the weapon is fine.

Motenten
01-26-2012, 11:56 AM
Just for clarification on an earlier statement I made, here's the chunk of the graph showing the Brass Jadagna min/max data:

http://images.bluegartr.com/bucket/gallery/9a077b4b95f5bb05f423d7882d053ad1.png

As you can see, the min pDif line appears to be rock solid. I feel fully comfortable in considering it 'complete' as far as any estimated calculations are concerned, though the final verdict will have to wait for the remaining low-cRatio tests.

The max pDif line, however, appears to have some issues. In particular, the last of the upper set of connected observation points requires a max pDif of at least +304/1024 over cRatio. However it's not feasible to intercept that point in a general sloping calculation (eg: 1.25 * cRatio), as it usually ends up below that minimum. Likewise, leaving it as a flat addition (eg: min capped at +0.3) -also- puts it a bit high for the lower Brass Jadagna points.

The extra fly in the ointment is of course the 1.05 secondary multiplier: there's nothing guaranteeing that the max observed values (cyan+yellow paired lines) are actually a full 1.05-ish away from the base primary damage. As such, the two brown lines -could- be a bit higher up, fitting into the predicted max pDif line.

If I do some tweaking to max values (eg: fixing a max damage on a higher cratio that's lower than one for a lower cRatio) and assume a 1.04 multiplier, the results are pretty close. Still, I'm not entirely sure about it, so will just leave it as 'tentative' for now.

Motenten
01-26-2012, 12:54 PM
Verification of min damage formula:

Took current complete data set of min values (136 wRatio points) and worked on testing the limits of my formula's validity.

Means:

1)

Calculate predicted primary min damage value based on wRatio. Subtract the predicted value from the observed min value. If the result is ever negative, the formula fails (ie: data was observed that can't be generated by the formula).

@slope of 152/1024, minimum offset is 750/1024. 749/1024 generates a negative test check.

2)

Check average values of wRatios between 1.5 and 2.4 (min is capped at 1.0 below 1.5, and is capped at -0.375 above 2.4). Look for the combination of slope and offset that generates the lowest overall average (closest to getting perfect matches at all wRatios).

Minimum was at slope 153/1024 and offset of either 751/1024 or 752/1024 (750/1024 creates negatives), with an average difference value of 0.288. Slope 152 was very close to that at 0.365. As slopes varied, and offsets adjusted to keep them out of the negative, the overall average always went up significantly.

Also of note: sets that had a positive value on the difference with the prediction were almost invariably for data sets with high D weapons. That is, with more possible values to hit, the chance of hitting the true minimum was lessened. The vast majority had a difference of 0, 1 or 2, and most of the non-0 results came from crit sets, which have far fewer sample points than the non-crit sets.

Conclusion:

152/1024 is divisible by 8. 153/1024 is the closest match (without going over) one can get to 0.15 in units of /1024. Either one could reasonably be chosen.

I've decided to go with 153/1024 as the slope instead of 152/1024. That way it can reasonably be explained as a 0.15 multiplier. I'll stay with -752/1024 (0.734375) as the offset, as there are no other values that stand out as suitable choices.

Though.. one can perhaps use 0.7333 as the decimal value, as that would roughly match 751/1024 (and doesn't generate failure tests). 0.7333 would be 1 - (1/3.75). Given that 0.375 comes up elsewhere a few times, I would not be surprised if there's a formula that ends up with 10x its inverse in it.

Right, I'll go with 751/1024 for the offset. For now, the formula can be shown decimally as:

wRatio * 1.15 - 0.7333
or
wRatio * 1.15 + 1/3.75 - 1

Masamune
01-26-2012, 03:39 PM
The one i'm doing atm is completely different than the jadagna one.

I'm on PLD99 with IronRamLance(d70) STR112 (but dunno yet BaseDMG=fSTR+d since i didnot get EM Bluffalos' VIT), while BJtest were on lvl75 STR85.

Here are current parse results:


Melee Damage
Player Melee Dmg Abs'd.Dmg Net Dmg Melee % Hit/Miss M.HR % M.Acc % M.Low/Hi M+0.Avg M-0.Avg
Masamunai 103926 0 103926 93.94 % 1383/557 71.29 % 71.29 % 11/73 42.04 42.04

Melee Crit Damage
Player #Crit C.Low/Hi C-0.Avg Crit%
Masamunai 755 71/136 102.69 54.59 %

Other Physical Damage (Counterattacks and Retaliations)
Player CA.Dmg CA.Hits-0 CA.Low/Hi CA-0.Avg
Masamunai 6280 81 14/133 77.53

Masamunai
Melee
11: 9
12: 11
13: 13
14: 6
15: 14
16: 15
17: 5
18: 9
19: 12
20: 4
21: 17
22: 11
23: 4
24: 13
25: 13
26: 6
27: 8
28: 4
29: 13
30: 14
31: 13
32: 7
33: 5
34: 7
35: 12
36: 16
37: 7
38: 10
39: 9
40: 6
41: 8
42: 10
43: 10
44: 10
45: 13
46: 5
47: 13
48: 3
49: 14
50: 11
51: 18
52: 5
53: 15
54: 12
55: 10
56: 9
57: 7
58: 8
59: 14
60: 9
61: 9
62: 5
63: 11
64: 16
65: 13
66: 12
67: 11
68: 16
69: 11
70: 10
71: 6
72: 10
73: 1
Melee Crits
71: 1
72: 5
73: 9
74: 10
75: 13
76: 13
77: 12
78: 10
79: 9
80: 10
81: 12
82: 13
83: 11
84: 20
85: 12
86: 11
87: 12
88: 20
89: 15
90: 12
91: 9
92: 18
93: 10
94: 10
95: 15
96: 12
97: 16
98: 16
99: 15
100: 8
101: 7
102: 12
103: 8
104: 16
105: 14
106: 14
107: 12
108: 9
109: 14
110: 11
111: 10
112: 12
113: 15
114: 13
115: 16
116: 13
117: 11
118: 16
119: 11
120: 13
121: 14
122: 9
123: 8
124: 11
125: 10
126: 9
127: 16
128: 6
129: 14
130: 13
131: 9
132: 11
133: 9
134: 8
135: 1
136: 1
Counters
14: 1
16: 1
17: 1
22: 2
23: 1
29: 1
30: 1
31: 1
32: 2
33: 1
34: 1
36: 1
37: 1
38: 1
40: 1
43: 1
46: 1
47: 2
50: 1
51: 1
52: 1
54: 2
55: 1
57: 1
58: 2
59: 1
63: 2
64: 2
70: 2
72: 1
73: 1
74: 2
78: 1
83: 1
84: 1
87: 1
90: 2
91: 1
92: 2
94: 1
95: 1
96: 1
97: 1
98: 1
100: 3
103: 2
107: 1
111: 1
115: 1
116: 1
119: 1
120: 1
121: 2
124: 1
125: 2
126: 1
127: 1
128: 1
129: 1
130: 1
131: 2
132: 2
133: 1


Testing conditions were: EM Bluffalos @ Abyssea-Uleguerand with atmas GnarledHorn + DarkDepths, Attack 360 dropped to 270 with constant Defender.

BTW, i dunno who tested GH counter but currently it looks lot more around 5%, not 10%...

EDIT: there are also 2 other parses i did on Steelshells lvl73/74 with ironRamLance Attack264 (so cRatios 0.746 and 0.733). Check the xls. The crit samples are very low tough to be exploitable.
What is important to note tough from those 2 parses is that despite low sample i hit for 0s and a lot, while on bluffalos with much lower cRatio i hit for 11 grand minimum... New cap? I doubt since if there were a "hard cap" there would be frequency spike, which isnot the case currently so far...

Motenten
01-26-2012, 06:21 PM
The one i'm doing atm is compeltely different than the jadagna one.

I know. That's why I'm asking...


Anyway, random thoughts on the preliminary data:


Did you have an exact defense value for the buffloes? You mentioned 0.51 cRatio, so with 270 attack I assume about a 530 defense?

Min damage of 11 implies (using my formulas) a base damage between 75 and 80. Weapon damage is 70, so fStr between 5 and 10.

Factoring out the 1.05 damage spread, max primary damage appears to be in the range of 70-71 (70*1.05 = 73.5, 71*1.04 = 73.84).

Since you have a 0.51 cRatio, that also implies a 1.51 critRatio, which is interesting in that that's about the point where min damage just barely touches 1.0. Since your min crit damage was 71, we can assume that that's what the total base damage is (70 weapon + 1 fStr).

+1 fStr would mean a dStr of around -7 to -8. With 112 str, that implies a vit of about 120. A lvl 99 Galka pld/mnk would have a 104 vit. It's certainly within the realm of possibility that buffaloes can maybe have a bonus that pushes them up a bit beyond that (or maybe count the full level of the subjob instead of only half? don't remember the exact method for mobs right now). Obviously you'll need a set of data with a 1.0 spike to tell for sure.

Still, that doesn't match what I'd predict for the minimum, which would be ~10.5 (floored to 10) on a d71 base damage. 11 would be the minimum with 524 defense (.515 cRatio). That would still yield a 71 min crit damage value.


Also of interest is that the max pDif appears to support that you're still hitting 1.0 as a max (possibly slightly below, but very close). This is in contrast to the data Byrth has gotten so far, which had implied a max of about +0.4375, whereas yours implies a max of at least +0.485. So there's probably another sloped equation on the max pDif side to work out.


EDIT: there are also 2 other parses i did on Steelshells lvl73/74 with ironRamLance Attack264 (so cRatios 0.746 and 0.733). Check the xls.

I'll look for that when I get home.

Yugl
01-26-2012, 06:41 PM
I've heard Buffalos are PLD, which grants them critical defense bonus. I haven't heard any confirmations otherwise, but if that is true, that would be worth noting.

Motenten
01-26-2012, 06:53 PM
I've heard Buffalos are PLD, which grants them critical defense bonus. I haven't heard any confirmations otherwise, but if that is true, that would be worth noting.

Ugh, yeah. That has the potential to screw with some of the calculations. Thanks for bringing that up.

Motenten
01-26-2012, 08:25 PM
EDIT: there are also 2 other parses i did on Steelshells lvl73/74 with ironRamLance Attack264 (so cRatios 0.746 and 0.733). Check the xls. The crit samples are very low tough to be exploitable.
What is important to note tough from those 2 parses is that despite low sample i hit for 0s and a lot, while on bluffalos with much lower cRatio i hit for 11 grand minimum... New cap? I doubt since if there were a "hard cap" there would be frequency spike, which isnot the case currently so far...

Sorry, am unable to find any Iron Ram Lance data in the spreadsheet.


And in addition:

Rather than keep bugging you about details, did a quick check of EM bluffalos in Aby-Uleg.

516 att vs EM: neutral defense
515 att vs EM: high defense

Mob Defense: 516

Att: 270

cRatio: 0.5233 (or 0.5225 if floored /1024 units)


Predicted minimum damage:
0.5233 * 1.15 - 0.4375 = 0.164295
0.164295 * 71 = 11.664945, floored to 11 -- match (and would match for base damage up to 73)

Min crit would be predicted to be 72, but with Crit Defense Bonus we can't consider that reliable.

Putting off any analysis of max pDif for now.

Motenten
01-26-2012, 08:51 PM
Testing for vit:

651 att so that min damage is 1.0 pDif
Using a pair of Thokchas, d47 daggers

111 str: min damage is 47, so fStr is 0

112 str: min damage is 47, so fStr is 0

113 str: min damage is 48, so fStr is 1

dStr to pass threshhold for 1 fStr on rank 5 weapon: -5

So 113 + 5 = 118 Vit

Edit: bad math....

Masamune
01-27-2012, 04:12 AM
o god thanks Yugl, i forgot about that trait against crit dmg... well despite that + their paralyze that can cancel my defender, Bluffalos + crit atmas are still best test subjects imho.

Yes Motenten, i intended to check for their def this morning but you went faster, thanks. For their vit, yes i intend to use my planned pDIF=1 parse.

Regarding the 2 IRL parses i mentioned, sorry i thought they were on the v1.1 xls, but actually they newer. I'll post an updated xls soon...
Also, while normalizing my graphs, i noticed spike freq intensity varies depending what weapon d used: the lower d is, for given sample size and cRatio, the higher the spike intensity will be.
Example: 2 parses around pDIF=1, 1st with a cudgel and other with great sword, the spike for cudgel will fly really fast at 15% + probability of appearance compared to other generated pDIFs, while on the GS parse, at same sample size.... spike will be barely noticeable or much less intensity.
If you are wondering why i'm posting this, it's because i'm trying to figure at which cRatio spike has highest intensity so can know this cRatio is when the whole range*generator term reset the most values to 0.

Byrth: can you post your parse please ? I'm interested.

Byrthnoth
01-27-2012, 10:52 AM
Both tests use Raph Rod

Level 81 Colibri x3 with 128 attack, 105 STR, and 11% Crit damage bonus:
Byrth
Melee
0: 4
1: 6
2: 8
3: 6
4: 5
5: 5
6: 5
7: 6
8: 12
9: 8
10: 8
11: 6
12: 6
13: 5
14: 8
15: 9
16: 12
17: 8
18: 1
19: 9
20: 2
21: 6
22: 18
23: 7
^ 24: 11
25: 6
26: 8
27: 9
28: 8
29: 3
30: 9
31: 9
32: 5
+ 33: 19
34: 9
35: 12
36: 12
37: 7
38: 6
39: 7
40: 10
41: 7
42: 11
43: 7
44: 8
45: 3
Melee Crits
55: 6
56: 3
+ 57: 7
58: 2
59: 4
61: 2
63: 2
64: 4
65: 1
66: 4
69: 3
71: 1
^ 72: 3
73: 4
74: 2
75: 1
76: 2
77: 2
78: 2
79: 2
81: 1
83: 4
84: 1
85: 2
86: 3
88: 4
91: 1
93: 2
94: 2
95: 2
96: 2
98: 1
99: 1

Level 82 Colibri with 128 attack, 105 STR, and 11% Crit damage bonus:
Byrth
Melee
0: 1
+ 1: 7
2: 1
3: 4
4: 1
5: 6
6: 1
8: 3
9: 2
10: 3
11: 4
12: 1
13: 2
14: 3
15: 1
16: 3
17: 4
18: 2
21: 2
22: 2
23: 1
^ 24: 1
25: 1
26: 3
27: 1
28: 4
29: 1
30: 1
31: 5
32: 2
33: 5
34: 3
35: 2
36: 3
37: 4
38: 3
39: 1
40: 1
41: 5
42: 2
43: 1
44: 5
Melee Crits
55: 2
+ 57: 5
61: 1
63: 1
64: 2
66: 1
68: 1
73: 1
^ 74: 3
75: 1
81: 2
82: 1
83: 1
84: 1
85: 1
87: 1
89: 1
91: 1
92: 2
93: 1
94: 1
95: 1
96: 1


Two Level 81 Colibri with 54 Attack, 93 STR, 16% Crit damage bonus (Trait + Feather):
Byrth
Melee
+ 0: 73
1: 3
2: 2
3: 8
4: 5
5: 3
6: 3
7: 2
^ 8: 8
9: 5
10: 3
11: 3
12: 5
13: 8
14: 6
15: 4
16: 2
17: 7
18: 2
19: 4
20: 1
21: 2
22: 5
23: 10
24: 3
25: 9
26: 3
27: 3
28: 4
29: 5
Melee Crits
51: 2
52: 2
53: 2
54: 3
+ 55: 7
56: 4
^ 57: 1
58: 1
60: 1
63: 2
64: 1
66: 1
68: 1
69: 1
70: 1
73: 3
74: 1
75: 1
76: 2
77: 2
80: 1
82: 1




Byrth
Melee
+ 0: 68
1: 4
2: 9
3: 8
4: 7
^ 5: 4
6: 6
7: 4
8: 7
9: 4
10: 2
11: 5
12: 3
13: 5
14: 7
15: 3
16: 6
17: 3
18: 4
19: 5
20: 2
21: 4
22: 4
23: 5
24: 3
25: 6
26: 3
27: 2
28: 4
29: 1
Melee Crits
48: 1
51: 1
52: 2
54: 5
55: 5
+ 56: 8
58: 1
^ 59: 3
62: 1
63: 2
64: 1
66: 3
67: 2
68: 2
70: 3
73: 1
74: 1
75: 3
76: 1
77: 1
78: 1
80: 1

Level 82 Colibri with 54 attack, 93 STR, and 16% Crit damage bonus:
Byrth
Melee
+ 0: 39
1: 6
2: 3
3: 3
4: 4
5: 5
7: 2
8: 4
9: 2
10: 4
11: 1
^ 12: 8
13: 2
14: 3
15: 4
16: 5
17: 3
18: 5
19: 5
20: 5
22: 6
23: 8
24: 4
25: 8
27: 7
28: 2
29: 4
Melee Crits
48: 1
53: 1
54: 2
55: 10
+^ 56: 14
58: 1
59: 2
60: 2
61: 1
62: 1
63: 2
64: 1
66: 1
68: 1
69: 1
70: 1
71: 1
73: 2
74: 1
75: 1
77: 1
78: 2
81: 1

Masamune
01-27-2012, 11:37 AM
O.O how can you get that low attack ?

Also kinda low sample size :s

Byrthnoth
01-27-2012, 12:37 PM
DNC doesn't have club skill. For the 54 sample, I did DNC/DNC with no attack gear (just a little STR). For the 128 sample, I did DNC/11PLD and put on some attack gear.

And yeah, it's a low sample size. It takes me an hour per bird at really low attack, though. 20% hit rate and many of my hits are for zero, haha.

Masamune
01-27-2012, 01:42 PM
Got same hitrate problem, me too.... i was at about 45% on 1st Bluffalo, so added some accu gears to bump it to 70% :S

To get a rough idea when sample size start to become decent is to check if current parse results fulfill the 2 conditions :
- about 10 frequency minimum per parsed damage value
- not a single missing damage value
... especially on crits outside Abyssea.

Byrthnoth
01-27-2012, 02:07 PM
I can't get off the Acc floor with such low skill. Also, unless I'm missing something, we're looking for this data to potentially break our model because it is so far out of the realm of any data that we have. The above parses show a 1.0 frequency spike in the crit distribution (54~56) as we would predict but (as far as I know) had no confirmation of.

Level 81 Greater Colibri x3, 129 Attack, 106 STR (11% Crit damage bonus):
Byrth
Melee
1: 5
2: 6
3: 9
4: 8
5: 2
6: 7
7: 10
8: 10
9: 4
10: 7
+ 11: 12
12: 3
13: 5
14: 8
15: 11
16: 5
18: 4
19: 7
21: 5
^ 22: 10
23: 6
24: 4
25: 7
26: 5
27: 3
28: 7
29: 5
30: 7
31: 2
32: 2
33: 6
34: 8
35: 6
36: 9
37: 6
38: 3
39: 3
40: 2
41: 6
42: 3
43: 10
44: 6
45: 3
46: 2
Melee Crits
+ 55: 9
56: 5
57: 6
58: 4
59: 2
61: 4
63: 4
64: 2
65: 2
66: 4
68: 1
69: 1
71: 2
73: 3
74: 3
75: 4
^ 76: 5
77: 3
78: 2
79: 1
81: 4
82: 1
83: 6
84: 2
85: 4
86: 6
87: 1
89: 1
91: 7
92: 3
93: 5
94: 4
95: 3
96: 1
97: 1
98: 1

Level 82 Greater Colibri, 129 attack, 106 STR (11% Crit damage bonus)
Byrth
Melee
1: 2
2: 2
3: 2
4: 1
5: 1
6: 4
7: 1
8: 1
9: 4
10: 1
11: 1
12: 3
13: 1
14: 2
15: 2
16: 1
17: 3
18: 1
19: 3
20: 1
21: 1
22: 4
23: 2
25: 3
^ 26: 3
27: 2
28: 3
29: 3
30: 3
31: 2
32: 3
33: 1
+ 34: 5
35: 1
+ 36: 5
37: 3
38: 3
39: 3
40: 2
41: 2
42: 1
43: 4
Melee Crits
56: 2
+ 57: 3
59: 1
63: 1
67: 1
69: 1
71: 1
72: 2
73: 1
74: 2
75: 2
^ 76: 1
78: 2
79: 1
82: 1
83: 1
84: 2
87: 1
88: 1
89: 1
92: 2
93: 1
94: 2
99: 1

Motenten's working model predicts that 128 Attack is the highest value where you can still hit for 0. These last two sets have shown hits for 0 at 128 attack but not at 129. It took approximately five hours of afking to collect the data.

Now it is nighttime and I want to do something!

Motenten
01-27-2012, 02:56 PM
Ah, good to know. To illustrate, current model for min pDif below 1.0 should result in:

Weapon: d40
Str: 105-106
fStr: 10
BD: 40+10 = 50

wRatio * 1.15 - 0.4375
or, in /1024 units:
wRatio * (1 + 153/1024) - 448/1024

For the lvl 81 birds (3 samples in each config)

wRatio at 128 is 128/322 = 0.3975
or, if flooring with /1024 units:
128*1024/322 = 407/1024 = 0.3974609375

wRatio at 129 is 129/322 = 0.4006
or, if flooring with /1024 units:
129*1024/322 = 410/1024 = 0.400390625


Possible min pDifs for 128 att (using varying calculation steps):
(128/322) * 1.15 - 0.4375 = 0.01964
(407/1024) * 1.15 - 0.4375 = 0.01958
(128/322) * (1 + 153/1024) - 448/1024 = 19/1024
(407/1024) * (1 + 153/1024) - 448/1024 = 19/1024

Which, for BD 50 yields:
50 * 0.01964 = 0.9820 => 0
50 * 0.01958 = 0.9790 => 0
50 * 19/1024 = 0.9277 => 0


Possible min pDifs for 129 att:
(129/322) * 1.15 - 0.4375 = 0.02321
(410/1024) * 1.15 - 0.4375 = 0.02295
(129/322) * (1 + 153/1024) - 448/1024 = 23/1024
(410/1024) * (1 + 153/1024) - 448/1024 = 23/1024

Which, for BD 50 yields:
50 * 0.02321 = 1.1605 => 1
50 * 0.02295 = 1.1475 => 1
50 * 23/1024 = 1.1230 => 1


I used multiple calculation types to show where flooring can cause a loss from the 'ideal' result, however in all cases the final floored value matched what was observed.


Using this model, you actually 'hit' 0 at 390/1024 attack ratio (0.3809), however you'll start seeing 0 slightly above that, with the threshold depending on the damage rating of the weapon. EG: anything below 0.4150 for a d25 weapon, or below 0.3877 for a d125 weapon. A usable general rough estimate would be that you can hit 0 at 0.4 wRatio and below.

Motenten
01-27-2012, 03:44 PM
max pDif estimates.


The secondary randomizer makes this estimate annoying, but will try to make a rough guess based on what we have.

Using the lvl 81 target sets since they all have more samples. Getting up to 5 of each bird level for each attack config would be nice.

@54 att
cRatio = 0.1677 (or 171/1024)
max observed: 29
lowest primary: 28

@128 att
cRatio = 0.3975 (or 407/1024)
max observed: 45
lowest primary: 43

@129 att
cRatio = 0.4006 (or 410/1024)
max observed: 46
lowest primary: 44


Assuming the values are valid, this generates a slope between 29% and 37%. It also requires an offset.

An offset between 0.33 and 0.365 is feasible. Will choose an offset of 360/1024 for now (0.3515625).

That would require a multiplier between 32.0% and 32.9%. Will choose 32% for now.

So, v2.0 max pDif = wRatio * 1.32 + 360/1024

At what point would that allow the max pDif to hit 1.0?

504/1024 = 0.4922 wRatio

Very close to the presumed 0.5 lower limit for 1.0 max pDif. That would also mean Masa's IRL buffalo data should be hitting 1.0 at the top end. Initial estimates indicates that that was possible (assuming BD=71, and secondary multiplier not going above 1.042 for the observed sample set), but a larger data set is needed to see if it's hitting absolute max.

This would also mean that at 0.75 wRatio (a commonly referenced inflection point), the multiplier for max pDif would put it at 0.99 (not counting the offset).

If I backtrack based on that and choose a 33% multiplier (putting total multiplied value at 0.75 wRatio at 0.9975), the offset needed would need to be between 0.348 and 0.351.

Adjusting to that for the moment, then.

v2.1 max pDif = wRatio * 1.33 + 0.35 [~358/1024]

That would also place the lowest wRatio that could hit 1.0 at 500/1024 = 0.4883

Masamune
01-27-2012, 05:57 PM
need more sample size for my 0.523 IRL parse ? (currently standing @ 628normal/755crits)

also, i'm hesitating which cRatio i should parse next :
- cRatio=0.752 (388Attack on EM)
- cRatio=0.7447 (388Attack on T)
- cRatio=1 (516Attack on EM)

I were thinking also about Olyphants at Abyssea-Uleg, i think they arenot PLD but WAR right ? might be better to parse on them instead of Bluffalos because of their unknown critdefbonus? Nvm... Olyphant has some Barrier Def TPmove that would make parses much annoying to filter than on Bluffalos...

Last question is How to determine PLD critdefbonus to "save" all those crits i just parsed...

Byrthnoth
01-27-2012, 06:00 PM
Once we have an accurate model of pDIF, we can simply divide by what they should have been and find out what crit defense bonus is.

Motenten
01-27-2012, 06:14 PM
628 hits sounds like enough to work with for now, so go ahead and post those data points.

I'd say the 0.752 config is probably the best next option.

If you can get the proper cRatio on them, go ahead on the olyphants. However their defense is probably in the ~440 range (at a guess, just dropping the pld Defense Bonus and a few points of vit), so you'd have to use the Defender trick again to get down below ~0.8.

However, would also be useful to know the effect of the crit defense bonus, so may want to stay on bluffalo regardless.

Raelia
01-28-2012, 09:19 AM
Once we have an accurate model of pDIF, we can simply divide by what they should have been and find out what crit defense bonus is.

Don't even really need to do that. Just get into the 3.0-3.15 cap range on a job up to snuff on Attack (read: DRK, lolSig) and work from there. I could turn out some relevant data if asked, and perhaps even get a good grasp of how it interacts with critical attack bonus (separate multipliers or additive first).

With your VIT figure I only need 170 STR to cap fSTR for my standard 76 base damage and easy comparison to my G.Colibri crit data. Handy. 1161 attack to cap Ratio? Challenge accepted.

Masamune
01-28-2012, 01:49 PM
huh? can't go past attack999 ?

if want capped cRatio i would just go on Uleg King Buffalos lvl79-82 (since crit def bonus is PLD79).

Motenten
01-28-2012, 02:03 PM
Attack can go higher, the game just doesn't display it. But yeah, regular Uleg buffalos would probly be easier to manage.

Edit: Caveat -- we don't know if there are multiple tiers of the trait, like crit attack bonus, though, so just stick with the challenge of the 99's :)

Masamune
01-28-2012, 02:59 PM
where is the proof Attack can go higher than displayed 999 ?

Byrthnoth
01-28-2012, 03:04 PM
It's implied in all of the tests here. (http://www.bluegartr.com/threads/68018-Yuki-Gekko-Kasha-Attack-bonus-Testing)

Masamune
01-28-2012, 03:18 PM
Ahemm.... all i'm reading is that attack AFTER Yuki/Gekko/Kasha innate attack boost can go above 999... that's not the same at all than basic attack yu have just from STR and attack gears. Maybe atmas can push attack above 999 too but i dunno...
Also he didnot say on which steelshellS he did that test...
Honest i don't buy it.

Byrthnoth
01-28-2012, 03:21 PM
Well, there are plenty of Dark Knights who sub Warrior and disagree with you. It's purely a display limitation.

Also, those tests show that the game has no issue at all working with Attack values over 999, at least. His findings were either replicated or preceded by similar JP findings.

Masamune
01-28-2012, 03:58 PM
Yea it's the kind of test i d expect for this :
Find a mob with def 600(for example), parse enough sample size with attack850+Berserk(so theoritically Attack should be 1062 if not floored @ 999)
Then, if the hypothesis is correct, parse should show maxs and mins corresponding to cRatio=1062/600=1.77, otherwise parse will show min/max of cRatio=999/600=1.665

prob to do so yu need the pdif formula... Yarko tested after the pdif revamps so...

Raelia
01-29-2012, 02:27 AM
It's been fairly apparent to 90% of DRKs since Heroes was added and Bluffalo became our favorite e-peen pubstomp parse mobs (because everyone else would WS for ~600, tops, and the aforementioned critical defense bonus soft-nerfing crit jobs); attack certainly does not cap at 999 in much the same way a PLD/BLU was shown to not hit a cap on defense at 999 either. That I can still drop a nigh 5k Reso on these Bluffalo with proper atma and Last Resort up is proof enough of that.

Seriously, attack capping at 999 would just be silly. This game was, purportedly in some olde interview, originally balanced to go to level 200+ (if just in scope of stat progression).

This (http://www.bluegartr.com/threads/104509-Voidwatch-Discussion?p=4971021&viewfull=1#post4971021) is why I have this silly signature, because one-handers are clueless and think >800 attack is rare (which is LR alone on DRK). Consider that my 2.25 2-hander Ratio cap testing was on level 82 Colibri with no buffs, just some raw attack pieces normally in my WS sets. Throw a decent DRK their namesake Chaos Roll and they can push 1500 attack in their WS set, easy. It's almost a farce that the job tied to Chaos Roll almost never needs it.

Darkmagi
01-29-2012, 02:31 AM
I thought SE said crit def bonus was only a player trait? Also unrelated, but did you ever confirm resolution having a chance to DA/TA off of all hits?

Yugl
01-29-2012, 02:36 AM
You may be right, but I think you're remembering the part about VIT affecting critical hit rate.

Raelia
01-29-2012, 03:31 AM
I thought SE said crit def bonus was only a player trait? Also unrelated, but did you ever confirm resolution having a chance to DA/TA off of all hits?

What Yugi said. You're remembering the part about VIT not affecting player crits, just mob crits, but the test is worth doing anyway just to see how CDB and CAB interact.

Pretty solid that Reso/Entropy don't run DA/TA chance on all hits once I tacked down a few variables and paid better attention to TP returns, namely that a three hit entropy was giving me 20tp while a four hit was giving me 22tp due to decimals. It was a fun speculation anyway, but would have been painfully more obvious.

Masamune
01-29-2012, 04:28 AM
Ok thanks for confirming Attack Bonus from a buff/WSbonus/TempItem can go over 999. (still no proof about base attack - just with STR and attack gears - can go over 999)


VIT not affecting player critsDamn i completely forgot this, any tests done on this?
Does this mean if a crit is rolled, mob's VIT =0 in fSTR ?

Byrthnoth
01-29-2012, 04:36 AM
No, it means that VIT affects Monster -> Player critical hits differently than before. It is probably something similar to dAGI, but you would have to let a monster hit you for a long time for a substantial amount of damage/hit with different VIT values (keeping defense constant) in order to find out.

I have considered testing it in the past, but all-in-all I feel it's not really justified considering monsters have like a 1% critical hit rate on a player with 4/5 Enemy Crit -% merits.

Masamune
01-29-2012, 04:42 AM
That would also mean Masa's IRL buffalo data should be hitting 1.0 at the top end. Initial estimates indicates that that was possible (assuming BD=71, and secondary multiplier not going above 1.042 for the observed sample set), but a larger data set is needed to see if it's hitting absolute max.

Mmmm if i follow BGwiki correctly, i get:
DeltaSTR=112-118= -6, so have to use (DeltaSTR+9)/4 formula
which gives fSTR=0.75
=> BaseDMG=70.75

Raelia
01-29-2012, 05:22 AM
Ok thanks for confirming Attack Bonus from a buff/WSbonus/TempItem can go over 999. (still no proof about base attack - just with STR and attack gears - can go over 999)

Not sure what difference you're trying to imply. Of course you need gear/STR/buffs to get over 999 attack. It's the fact that the display limit is easily surpassed that is seemingly in strange contention here. If attack capped at 999 then Resolution would be doing a definite 20% less damage to Bluffalo (7% attack penalty on 999 attack over 516 defense is 1.8 Ratio, 80% of 2.25) than to other 'softer' targets no matter what attack buffs I put up, but the fact that I do the same rough 5.0-5.2k at the top end with Reso, SA/VV/Echoes, on Bluffalo that I do on piddly Tahrongi mandies should be enough, and when LR wears and I drop 15% of my attack I fall to around 4.5k damage while still playing with a 999 displayed attack. Attack goes past the 999 display limit, full stop and hands down.

Can you understand why I never really cared about cRatio below ~1.5 now?

Masamune
01-30-2012, 07:37 AM
The difference is i'm thinking about base attack UNBUFFED, since we are speaking about pdif determination here. That means to avoid any attack boosting in testing to stay the most objective as possible... (and yea in before pointing at my parses using defender on mobs with crit def bonus: i'm even about to delete them if Motenten didnot need them)
When i wondered if can actually be capped @ 999, i werenot aware that currently a player can't reach 999 just with his base attack and gears/merits. Using Attack buffs or attack boosted WSs doesnot prove anything on that topic and i'd even say is offtopic here.

Byrthnoth
01-31-2012, 04:32 AM
I think I have gotten lost in the last few pages. Do we have a model that contains the two main footprints (1.0 frequency spike and slightly uneven distribution between high and low randomizers?) If so, could someone summarize it?

Raelia
01-31-2012, 08:43 AM
I think I have gotten lost in the last few pages. Do we have a model that contains the two main footprints (1.0 frequency spike and slightly uneven distribution between high and low randomizers?) If so, could someone summarize it?

Mine generates the 1.0 spike, both as high and low and inbetween, by taking pre-secondary pDif between 0.75 and 1.0 and setting it to 1 and pre-secondary pDif below 0.75 and adding 0.25. This can be dialed in a bit more just based on where the ceiling and floors start and end, but nobody but Masa publishes their data.

I don't believe Primary to be nonuniform. Put it this way: If you have 100 'pre-secondary' values evenly distributed from 101-200, and then these are multiplied up by 1.00-1.05, you end up with 'more hits' above 150 (What a simple 1.0 multiplier would be) than you might expect, coming out with 57 above a '1.0 primary' and 43 below... You might see that as '32.75% more hits above a 1.0 multiplier' and easily make the wrong conclusion that said multiplier isn't evenly distributed. Dig into this too far that you even correct each side for being uneven in width and you're just asking to see something going on that looks like an imbalance but probably isn't.

Masa is really pushing my buttons with the "You can't prove attack goes over 999 because you're using buffs to get there" stance. I might grant him that WS attack bonuses might function differently (still a long standing mystery if they're applied before or after level correction because of some SAM vs Kirin data), but he's being obtuse about 999 being purely a display cap for no ready reason. It is certainly NOT irrelevant to the testing here because targets where knowing your cRatio is important are the ones that may require >1000 attack to cap. If attack truly capped at 999 there are plenty of targets that would require this consideration be added to spreadsheets and calculations therein, Bluffalo not being the least of them, because it would vastly affect what maximum Ratio would be as I already pointed out (and these aren't even NMs).

Byrthnoth
01-31-2012, 08:47 AM
I would like to believe the entire thing is one linear equation applied to wRatio with a piecewise equation stacked on top of it to make the frequency spike, but I think Motenten's model precludes that possibility.

Raelia
01-31-2012, 08:58 AM
I would like to believe the entire thing is one linear equation applied to wRatio with a piecewise equation stacked on top of it to make the frequency spike, but I think Motenten's model precludes that possibility.

Think of it in a programming sense rather than a mathematical sense. In my model the main randomization is not piecewise, nor does any function upon it need to refer back to Ratio, instead all work upon Intermediate or Final pDif and would come out to simple if-then statements really.

It's easy to say "Is this value low but not too low? set it to this. Is it even lower than that? add something to it" in programming. FFXI is a program, not a set of linear functions. It gets more fitting when you start thinking about lazy programming (The best programmers are the lazy ones!), and that any piecewise deal is going to be a huge stack of conditionals that is too much of a pain to write and even worse to edit. Just remember: Programmers are lazy, especially the good ones. If it takes more than three lines of code (like a piecewise anything probably would) you can maybe give it a second thought.

But nooooo... whenever I appeal to simplicity or sensibility in game design the regressionists and statisticians all scoff that such things are unnecessary and not relevant and don't belong in mathematically analysis of a game programmed by humans.

Byrthnoth
01-31-2012, 09:06 AM
What I was suggesting is ultimately the simplest way to generate a function with the form we observe.


wRatio = cRatio + (crit > rand) + rand*windowsze

pDIF = m*wRatio + b

if 1 < pDIF < 1.2; pDIF = 1
if pDIF > 1.2; pDIF = pDIF - .2;


There, you artificially create a distribution that looks like what we observe (minus the up/down frequency distribution) using four statements. I just wish that was how it works.

Motenten
01-31-2012, 10:57 AM
I think I have gotten lost in the last few pages. Do we have a model that contains the two main footprints (1.0 frequency spike and slightly uneven distribution between high and low randomizers?) If so, could someone summarize it?

I'm not entirely comfortable with the max pDif limit below the point where it hits the cap of 0.375, but it seems to be a reasonably good fit, so I'm willing to let it stand for now. I'm pretty confident in the min pDif limit. I have not yet settled on a means of generating the 1.0 spike, which of course also implies that I don't have a complete model for a distribution formula, though I'm pondering a few ideas.


but nobody but Masa publishes their data.

Yeah, I need to put all my parse data into a spreadsheet and post it on Google Docs. Won't be as fancy as Masa's, but at least the raw data will be out there.


I don't believe Primary to be nonuniform.

I mostly agree with you here (one set of equations for entire wRatio value range), though I'm still uncertain about the distribution for above vs below wRatio.


Put it this way: If you have 100 'pre-secondary' values evenly distributed from 101-200, and then these are multiplied up by 1.00-1.05, you end up with 'more hits' above 150 (What a simple 1.0 multiplier would be) than you might expect, coming out with 57 above a '1.0 primary' and 43 below... You might see that as '32.75% more hits above a 1.0 multiplier' and easily make the wrong conclusion that said multiplier isn't evenly distributed. Dig into this too far that you even correct each side for being uneven in width and you're just asking to see something going on that looks like an imbalance but probably isn't.

Not entirely sure if this is related to the prior mentioned "above vs below wRatio", but I'll note that it's not that there are "more hits" above wRatio, it's that "the frequency of each damage point is higher" above wRatio. There may in fact be the same number of total hits above and below wRatio, but with more possible damage values below wRatio they end up getting spread a bit thinner, ending up with lower frequencies.

If they had equal frequencies across all damage values to begin with, then the secondary multiplier would have no effect on most of the value range (obviously ignoring the leading and trailing edges); in fact the lower-end primary damage values should have a minutely higher frequency than the higher end values because the secondary multiplier spreads the results across fewer values (eg: d100 gets spread between 100 and 105; d190 gets spread between 190 and 199).


If attack truly capped at 999 there are plenty of targets that would require this consideration be added to spreadsheets and calculations therein, Bluffalo not being the least of them, because it would vastly affect what maximum Ratio would be as I already pointed out (and these aren't even NMs).

Completely agree with this. A few years ago there might have been some valid concern that attack capped at the actual displayed value, before anyone really investigated it or had the means to easily surpass it. However, given that it's clear that it -does- go above that value, there is no reason to expect that buffs that affect attack result in anything that is at all different than if you added that attack with gear or skill (just as you could say with gear vs magical haste when considering total haste, or haste and dual wield when considering total delay reduction). If the attack that you gain from Berserk is different from the attack that you gain from skill, then attempting to model the effects of that attack become mostly nonsensical.


I would like to believe the entire thing is one linear equation applied to wRatio with a piecewise equation stacked on top of it to make the frequency spike, but I think Motenten's model precludes that possibility.

Well, you inherently have two equations anyway: one to define the upper boundary and one to define the lower boundary (both of which are single sets of equations across the entire length of wRatio, though technically that means that neither of them represent a 'single equation', either). The only real question (in my model, anyway) is whether the randomization picks a value from either [wRatio .. upper bounary] or [lower boundary .. wRatio], or whether it's a single spread between [lower boundary .. upper boundary].


FFXI is a program, not a set of linear functions.

You make it sound like those are two different things :)


Just remember: Programmers are lazy, especially the good ones.

I thought we were talking about SE here? >.>


If it takes more than three lines of code (like a piecewise anything probably would) you can maybe give it a second thought.

Actually, not strictly true. It's fine for combat calculations to be relatively complex. The primary limiter is whether the computer can process all the attacks from a zone full of people (~750), both for and against those players, within a bounding time span (eg: 1 second). If they're all dual-wielders, and they all double attack, and all the mobs get two attacks, that's 4*750 + 2*750 = 4500 attacks to be processed within 1 second.

So the restriction in programming terms is to make sure you can handle all the calculations for a single combat swing within about 0.2 milliseconds (200 microseconds). The most expensive part of the equation is likely to be the call to rand(), so you want to minimize the number of times it can be called (once for crit, once for additional effect on weapon (with additional rolls for magic resistance), once for primary pDif, once for secondary modifier, etc). But beyond that you probably have a fair bit of wiggle room.

Of course that same time interval has to handle other things as well: delay to next round, special immunities or absorbs or additional effects (eg: Treasure Hunter), etc., so you don't get all of that time dedicated to just calculating the damage. And it doesn't mean you need to force complexity into things; you still want to make the results as simple and straightfoward as possible. However even a few dozen lines is not necessarily completely unfounded.



But nooooo... whenever I appeal to simplicity or sensibility in game design the regressionists and statisticians all scoff that such things are unnecessary and not relevant and don't belong in mathematically analysis of a game programmed by humans.

Well, you were the one that originally really brought statistics into this. It was definitely an important point to make, but don't pretend you had nothing to do with it when some of the results run counter to your own predictions.

Also, while simplicity is good, one must remember that the goal is to find "the simplest equation that can fully explain the phenomenon", not merely "the simplest equation". There can be a pretty large gap between those two points.


wRatio = cRatio + (crit > rand) + rand*windowsze

pDIF = m*wRatio + b

if 1 < pDIF < 1.2; pDIF = 1
if pDIF > 1.2; pDIF = pDIF - .2;


However windowsize is dependant on the upper and lower boundaries, and those boundaries are dependant on wRatio, so that function is circular.

Personally, I'm trying very hard to come up with a mechanism for generating the 1.0 spike without chopping a hole in the pDif range.

Raelia
01-31-2012, 11:14 AM
Personally, I'm trying very hard to come up with a mechanism for generating the 1.0 spike without chopping a hole in the pDif range.

My way doesn't. It logically 'continuous' and a way to give a +0.25 pDif 'bonus' when it rolls low without making a weird jump in minimum happen. There is definitely a middle range of pDif being set to 1.0 to be generating the 1.0 spike while pDif can still range above and below it, and my method does precisely that. My graphing program just can't handle the conditionals to show it (or rather, can't handle the conditionals without rerolling it's rand function at each step -_-). What I really need is data at low enough values and large enough volumes to see what portion of damage is falling into that spike and if it corresponds with my 0.25 section being set to 1.0, not to mention it controls where the celing/floor start and end as well.

Hell, I'll just use a real-world example: It only takes my 4ghz box, using only one core because I had Speedfan open and watching mind you, about 12 seconds to run off the (whoops, missed a zero!) 1,000,000 randomized hits I was making histograms of, so would take 0.054 seconds for those 4500 hits. This stuff is hilariously trivial for a computer and you're sorely overestimating the workload. There's probably an orders-of-magnitude larger load issue involved in sending out the packets to each player about all the other players' attacks. For a person writing code it's generally true that what can be done in three lines instead of thirty will be, but asking a computer to do math isn't such a big deal.

Masamune
01-31-2012, 11:31 AM
Here 2 simple examples (https://skydrive.live.com/redir.aspx?cid=b6d57af7f87efec4&resid=B6D57AF7F87EFEC4!1274&parid=B6D57AF7F87EFEC4!226)

The basic principle to generate a spike is to follow the basic form of a randomized step:

Y = START + INT(RANGE*Generator)

... and set conditionals inside the function Generator (or RANGE up to yu)so that Generator*RANGE=0, resulting in whole randomized step = START (ie pDIF=1).
In the 2 examples above, i set START=RANGE=BaseDMG and put conditionals inside Generator... but there are other possible formulations...

Raelia
01-31-2012, 11:44 AM
Here 2 simple examples (https://skydrive.live.com/redir.aspx?cid=b6d57af7f87efec4&resid=B6D57AF7F87EFEC4!1274&parid=B6D57AF7F87EFEC4!226)

Cannot display in browser.

I don't mean to reflect this upon you, but please stop using proprietary trash software -_-. It doesn't even work in the standalone excel I found because, again, my version is 'too old', and I can't be the only one hesitant to install (let alone purchase ;D) a full version of Office.

Anyway, examples of what for that matter?

Motenten
01-31-2012, 01:50 PM
Well, yes, obviously there's a lot more going on than that simplistic little example. The system has to handle pathing and decision making (eg: updating hate decay, current target, etc) for all mobs in the zone, monitor all buffs and debuffs for all players and mobs, compose the network message, accept player input, pass through chat text, etc.

But yes, you're right, network bandwidth is probably the primary limiting factor in terms of actions per zone. But then that implies that you have far more room to mess around with complex calculations, as long as it doesn't broach that limit.


My way doesn't.

Actually, yes, it does. It resets everything between 1.0 and 0.75, and then shifts stuff below 0.75 up. That's what I meant by 'chopping a hole' in the data. The reset portion is fine, but I don't want to be shifting data around after the fact.



The basic principle to generate a spike is to follow the basic form of a randomized step:

Y = START + INT(RANGE*Generator)

... and set conditionals inside the function Generator (or RANGE up to yu)so that Generator*RANGE=0, resulting in whole randomized step = START (ie pDIF=1).

Very nitpicky point: It's not that Generator*RANGE is 0, which inherently implies that either Generator or RANGE must be 0 (which should never occur in RANGE, and almost never occur in the Generator, though certain setups would allow it to be possible), but rather that the product of those values may be set to 0 before being added to START, either through their own values or due to an additional function being applied to the result.

Masamune
01-31-2012, 02:56 PM
i never wanted to say that but only to set generator*range=0 to generate a frequency spike at exactly Y=START, nothing else...

So knowing that definition, you can "play" with either generator and/or range terms to achieve that.
Logically, as you pointed out, Range can't be =0 (unless you meet the condition fSTR=-1 with a dmg1 weapon), so i naturally played with generator term only, setting range arbitrarily to = BaseDMG, but this could be whatever you think suits best.
The demonstration is simple:
If you put range*generator=0 for a particular cRatio range, the formula becomes Y=(Start+INT(0))*(1+5%*2ndaryRand)=BaseDMG*(1+5%*2 ndaryRand)
The bolded result means that whenever cRatio is inside that range, all generated values will be inside [BaseDMG; BaseDMG*1.05], which is observable with a spike for the damage values = BaseDMG, BaseDMG+1 and BaseDMG+2.

For Raellia, here is a quick manual conversion of the 1st example, on a googlesheet (https://docs.google.com/spreadsheet/ccc?key=0Ai1bYhrlM-J5dHZRV0hyNTVUVnpsZUVCU0xGRGZWTkE).
Select an empty cell and hit DELETE key to "reroll" all RANDs.
I didnot find either how to link together points with a line...

Raelia
02-01-2012, 12:05 AM
Actually, yes, it does. It resets everything between 1.0 and 0.75, and then shifts stuff below 0.75 up. That's what I meant by 'chopping a hole' in the data. The reset portion is fine, but I don't want to be shifting data around after the fact..

I meant that there's no gap or jump in the values. From a programming perspective, which we just discussed, it would be maybe one or two lines of code intended to shore up the bottom end of cRatio for fewer hits for zero. Show me that min pDif below 1.2xx cRatio where the 1.0 floor ends isn't parallel to min pDif above 1.5 cRatio. Put plainly it's actually in the same step as if you use a flat +1.0 for criticals (which has actually been a good validation to tweak my Primary in, because it can be made to fit...)

Motenten
02-01-2012, 01:14 AM
Well, the min pDif slope below ~1.25 does appear to be exactly parallel to the min pDif above ~1.5, with the slope of 1.15..

However, I just had a vague thought in how your idea would work in my model.. min pDif is (wRatio * 1.15) - n, with some other little trickery in there. Above 1.5 wRatio, n appears to be 751/1024. Below 1.25 I've been using -448, though the actual regression supplied a value of 446 (448 seemed a nicer value to use since it fit other known values, and the regression is of course not exact). An interesting point, though, is that 751/1024 - 0.3 (307/1024) is 444/1024, very close to that regression value. Or, put the other way:

wRatio * 1.15 - 751/1024 at 1.5 and higher
wRatio * 1.15 - 751/1024 + 0.3 == wRatio * 1.15 - 444/1024 at 1.25 at lower

I'll have to give it some thought as to whether that would make sense overall. And actually, 755/1024 (448/1024 + 0.3) is a valid offset for the minimum pDif when using 153/1024 as the slope (ie: 1.15), and maintains fairly solid results up til crit territory, where lower sample sizes start making the extremity values more rare. That's also easier to reconcile than (1 - 1/3.75).

In any case, it's +0.3 instead of the +0.25 of yours, but I wonder if the general idea can be reconciled.

Still haven't worked out a proper emergent form for the 1.0 spike, though (ie: one that doesn't explicitly rely on checking whether the pDif range can include 1.0).

Raelia
02-01-2012, 01:51 AM
In any case, it's +0.3 instead of the +0.25 of yours, but I wonder if the general idea can be reconciled.

I don't disagree in the slightest with adjusting the value. 0.3 was actually my original guess, then altered to 0.25 to make the floors start and end at certain values on top of my Primary model as it stood at the time, so if you've got a definite show here that it's a 0.3 bump then I'll go back and rework my Primary model instead to make the floors fit as a starting point, then readjust from there.

Masamune
02-01-2012, 04:37 AM
Still haven't worked out a proper emergent form for the 1.0 spike, though (ie: one that doesn't explicitly rely on checking whether the pDif range can include 1.0).

How are you trying to do it?

For Raellia, i always wondered why i never managed to make your proposal work: please check the googlesheet 2nd sheet plz (and last post in your thread) and can you tell me what i forgot? the problem is that it doesnot generate any spike.

EDIT: nvm, i made it but had to add one more column for the conditionals on primary pdif.

Byrthnoth
02-01-2012, 04:45 AM
However windowsize is dependant on the upper and lower boundaries, and those boundaries are dependant on wRatio, so that function is circular.

Personally, I'm trying very hard to come up with a mechanism for generating the 1.0 spike without chopping a hole in the pDif range.

You could add another letter to Ratio and make it:


wRatio = cRatio + (crit > rand);
lolRatio = wRatio + windowfunc(wRatio)*rand;

pDIF = m*lolRatio + b;

if 1 < pDIF < 1.2; pDIF = 1;
if pDIF > 1.2; pDIF = pDIF - .2;

My main problem with it is that the slopes of the max and the min lines are (if I am looking at your graphs correctly) not parallel. The simplest way to generate the frequency spike is to chop a hole and there isn't anything I'm aware of that indicates it is done a different way.


Well, the min pDif slope below ~1.25 does appear to be exactly parallel to the min pDif above ~1.5, with the slope of 1.15..

However, I just had a vague thought in how your idea would work in my model.. min pDif is (wRatio * 1.15) - n, with some other little trickery in there. Above 1.5 wRatio, n appears to be 751/1024. Below 1.25 I've been using -448, though the actual regression supplied a value of 446 (448 seemed a nicer value to use since it fit other known values, and the regression is of course not exact). An interesting point, though, is that 751/1024 - 0.3 (307/1024) is 444/1024, very close to that regression value. Or, put the other way:

wRatio * 1.15 - 751/1024 at 1.5 and higher
wRatio * 1.15 - 751/1024 + 0.3 == wRatio * 1.15 - 444/1024 at 1.25 at lower

I'll have to give it some thought as to whether that would make sense overall. And actually, 755/1024 (448/1024 + 0.3) is a valid offset for the minimum pDif when using 153/1024 as the slope (ie: 1.15), and maintains fairly solid results up til crit territory, where lower sample sizes start making the extremity values more rare. That's also easier to reconcile than (1 - 1/3.75).

In any case, it's +0.3 instead of the +0.25 of yours, but I wonder if the general idea can be reconciled.

Still haven't worked out a proper emergent form for the 1.0 spike, though (ie: one that doesn't explicitly rely on checking whether the pDif range can include 1.0).

Are the max pDIF lines parallel to each other as well? what if you took the above and used different m/b values for above and below wRatio?

Raelia
02-01-2012, 05:34 AM
Are the max pDIF lines parallel to each other as well? what if you took the above and used different m/b values for above and below wRatio?

Not sure anyone has data low enough in cRatio to see that. You gotta be well below 0.5 cRatio to stop hitting 1.0s, so getting low enough to see a slope is even crazier. Definitely time to look at doing it backwards: let a mob hit you, determine it's base damage and attack, then boost defense to get it's Ratio low, assuming it's found that mobs have the same 1.0 flats (which is questionable, but won't stop us from finding out if pDif max slope is the same as above the flat)

Masamune
02-01-2012, 07:16 AM
Ok i fixed Raellia model in this googlesheet (https://docs.google.com/spreadsheet/ccc?key=0Ai1bYhrlM-J5dE9rM3pVZVVQNEJMTXB3TC1pQ215V0E).

Time to compare with parses...

EDIT: on test "218BJ63", normal min/max and crit min generated from model are OK, but crit max=126 while parsed up to 128...

Motenten
02-01-2012, 11:03 AM
I don't disagree in the slightest with adjusting the value. 0.3 was actually my original guess, then altered to 0.25 to make the floors start and end at certain values on top of my Primary model as it stood at the time, so if you've got a definite show here that it's a 0.3 bump then I'll go back and rework my Primary model instead to make the floors fit as a starting point, then readjust from there.

The difference in the current offsets (751 to 448) is 0.2959, and takes very little to make it almost exactly 0.3. I'm pretty certain that can be treated as the difference in the offsets.

Double-checked the verification tables, and the offset for the lower values of min pDif cannot be less than 448/1024 when using a slope of 153/1024. -447/1024 starts giving values that fail vs observed data. Since the lower half cannot be 444, but the upper half can be 755, will go with the 448&755 combo.



Still haven't worked out a proper emergent form for the 1.0 spike, though (ie: one that doesn't explicitly rely on checking whether the pDif range can include 1.0).
How are you trying to do it?

My current thought is that the gap between the lower and upper offsets (ie: the space that would have been filled if the -755/1024 offset was kept the entire way down) is being taken and forced to 1.0. However that doesn't work once you get down below 0.48 cRatio since there's no 1.0 to reset those values to. Need to review the strength of the spike values across all cRatios to get a better idea.


Are the max pDIF lines parallel to each other as well? what if you took the above and used different m/b values for above and below wRatio?

Max pDif slopes are -not- parallel. The upper half (above 1.0) has a slope of about 1.25 (there's some slight uncertainty on the exact value, there), though that reaches cap of +0.375 pretty quickly. The lower half (from your parse data) has a slope multiplier of about 341/1024 (1.333), significantly different.

Motenten
02-10-2012, 01:47 PM
Test for mob level correction. Not really any better threads to put this in, so here we go.

Target: Abyssea-Uleguerand Bluffalo (already have their defense, so can pick out exact level on lower level job)

Gear:

99 Nin/dnc:
Iga+2///
Iga+2/Iga+2/Shelter/Pagu
Atheling/Thunder/Iga+2/Iga+2

402 def, 83 vit


95 Sam/dnc:
Unkai+2///Thew
Unkai+2/Orcish/Rajas/Pagu
Lamia+1//Unkai+2/Unkai+2

402 def, 80+3 vit


Sam needs to be able to identify lvl 99 bluffalo. They have 516 def, so..
Attack using above gear and Kiku: 515
Add Warwolf: 519

If mob has high defense without Warwolf and neutral defense with Warwolf, it's lvl 99


Additional buffs:
No vit cruor, only HP
Mounted Champion (50 vit)
Vicissitude (30 def)
Sea Daughter

+55 def = 457 def total
Expected attack: somewhere around 417+50 = 467

Should be right around 1.0 cRatio, give or take

Should see general damage spike at 1.0

Damage taken on nin (~30 minutes' worth):




Melee
82: 1
83: 1
85: 2
86: 2
87: 5
88: 6
89: 1
90: 4
91: 2
92: 1
93: 3
94: 3
95: 4
96: 5
97: 5
98: 4
99: 4
100: 2
101: 3
102: 1
103: 5
104: 1
105: 16
106: 15
+^ 107: 19
108: 15
109: 17
110: 18
111: 3
112: 2
113: 3
115: 1
116: 3
117: 2
118: 3
119: 2
120: 2
121: 4
122: 2
123: 1
124: 2
125: 1
126: 2
127: 5
128: 2
129: 3
130: 1
131: 2
132: 2
133: 2
135: 1
136: 1
138: 1
139: 1



1.0 spike at 105 damage, gives us the bluffalo's base weapon damage value after fStr adjustment.

82 min damage is a pDif of ~0.781 to 0.790. Implied cRatio between 1.060 and 1.067, thus an attack between 485 and 487.



Damage taken on sam (~30 minutes' worth):




Melee
105: 18
106: 16
107: 15
108: 17
+ 109: 23
110: 18
111: 2
112: 3
113: 6
114: 4
115: 3
116: 2
117: 4
118: 6
119: 4
120: 5
121: 4
122: 4
123: 6
^ 124: 4
126: 4
127: 3
128: 4
129: 3
130: 6
131: 3
132: 3
133: 3
134: 5
135: 4
136: 4
137: 4
138: 1
139: 4
140: 3
141: 1
142: 4
143: 4
144: 4
145: 2
146: 2
147: 5
148: 8
149: 2
150: 2
151: 4
152: 4
153: 4
154: 2
155: 4
156: 7
157: 5
158: 3
159: 2
160: 3
161: 1
162: 4
163: 1
164: 4
165: 7
166: 3
167: 1
168: 3
169: 2
170: 3
171: 1



As you can see, minimum damage was 105, the 1.0 spike. That means cRatio needed to be at least 1.25.

Maximum damage seen was 171. Predicted max at 1.26 cratio would be 165~173, depending on secondary spread.

We can thus conclude a high likelihood of cRatio being +0.2 relative to what it was when the mob was EM. Given that sam was 4 levels lower than nin, that would be +0.05 per level.



Final test for existance of 1.0 cRatio floor. Given approximated mob attack of 485-487, want 500+ defense on nin (impractical to get sufficient defense on sam for a solo test with level correction).

Got Protect V, and had Sheltered Ring on so gained +70 def. Final def with atmas: 527

Unfortunately mobs reset, so had to waste some of the time killing them to respawn higher, so total duration isn't as long as other parses.

If there's a 1.0 cRatio floor, cRatio should be 1.0, and minimum damage should be 74.

If there's no 1.0 cRatio floor, cRatio should be around 0.92, and minimum damage should be about 65.




Melee
73: 1
75: 7
76: 4
77: 2
79: 1
80: 1
81: 5
83: 2
84: 1
86: 1
88: 2
89: 2
90: 1
91: 2
93: 1
94: 1
95: 1
96: 2
98: 1
99: 1
100: 2
101: 2
102: 2
103: 1
104: 3
+^ 105: 12
106: 9
107: 9
108: 5
109: 8
110: 4
111: 2
112: 1
113: 3
114: 1
116: 1
117: 1
120: 1
122: 2




And this is rather interesting.

Minimum damage observed: 73 once, and mostly 75+. Conclusion: cRatio is 1.0.
Maximum damage observed: 122. This implies a max primary damage of 117-122, which implies a cRatio of between 0.89 to 0.93.

So the lower pDif range is capped using 1.0 cRatio, while the upper pDif range is not. Maybe.

Motenten
02-10-2012, 06:12 PM
Followup test on the 1.0 cRatio cap.

Pld/dnc

honor/seignur//
Hero's/Apathy//
Twilight/Creed+2/Solemn/Pagu
Atheling/Warwolf/Creed+2/Creed+2

There's 5% PDT in there, so I expect the 1.0 pDif spike to be 99 damage. (wrong; also need to adjust for vit)
Engaged but facing away, so no shield procs.

Total defense with Protect V with Sheltered Ring bonus + atma: 702

Nominal cRatio: ~0.692

Total vit: 189

Aside:
Total vit for nin & sam tests: 133, so an extra 56 vit, which will change base damage.
+56 vit should be about -14 base damage (d91), unless we hit a cap.
Preliminary view of data seems to be showing the 1.0 cap at 87 damage. Factoring out the PDT, that's 92 base damage (so we have a net -13 fStr).


If damage is based off of nominal cRatio:
Estimated min pDif damage: .358 * 92 = 32 * 95% = 30
Estimated max pDif damage: 1.0 * 92 = 92 * 95% = 87 * 1.05 = 91


If damage is based off of capped 1.0 cRatio:
Estimated min pDif damage: .7125 * 92 = 65 * 95% = 61
Estimated max pDif damage: 1.25 * 92 = 115 * 95% = 109 * 1.05 = 114



Defense 702 (Protect V):



Melee
-23: 1
-6: 1
0: 2
42: 3
43: 4
44: 4
45: 7
46: 7
47: 3
48: 5
49: 3
50: 7
51: 4
52: 5
53: 5
54: 5
55: 3
56: 5
57: 1
58: 3
59: 1
60: 3
61: 3
62: 7
63: 2
64: 6
65: 2
66: 3
67: 10
68: 8
69: 4
70: 3
71: 5
72: 2
^ 73: 5
74: 4
75: 2
76: 4
77: 5
78: 4
79: 2
80: 4
81: 6
82: 5
83: 5
84: 8
85: 6
86: 6
+ 87: 17
88: 15
89: 14
90: 10
91: 15



Ignoring set procs:
Min: 42
Max: 91

Max damage confirmed as being at 1.0 pDif, which supports the idea that cRatio is *not* capped.
Min damage is significantly higher than expected for the nominal cRatio.

Factoring out the PDT, min damage was 45, which is a pDif between 0.489 and 0.5.

Second assessment:
Changed Creed+2 legs to Staunch Cuisses (to avoid dealing with PDT; really shouldn't have used them in the first test), and Protect V to Protect. Total defense: 644, total vit: 194.

1.0 spike @ 91
Base damage: 91

Nominal cRatio: 0.755

No indications of any damage above 1.0. 92 damage primary value could have generated a 96 dmg max with the secondary modifier, but max observed was 95.

Minimum damage: 48

That's slightly higher than the minimum seen in the prior test (difference range is within acceptable bounds), and still significantly higher than corresponding damage of players against mobs.

This indicates that the cRatio for min damage calculations is moving with expected cRatio, however the calculated value is different than it is for players.

Defense 644 (Protect I):


Melee
-53: 1
48: 1
49: 4
50: 2
51: 3
52: 4
53: 3
54: 1
55: 3
56: 3
57: 5
58: 1
59: 3
60: 3
61: 2
62: 3
63: 2
64: 4
65: 2
66: 7
67: 2
68: 4
69: 6
70: 7
71: 4
72: 6
73: 5
74: 1
75: 3
76: 4
77: 1
78: 5
79: 4
80: 5
81: 3
^ 82: 2
84: 2
85: 9
86: 2
87: 5
89: 3
90: 6
91: 18
92: 12
+ 93: 28
94: 16
95: 17



Defense 678 (Protect III):


Melee
-34: 1
46: 3
48: 3
50: 3
51: 2
52: 7
53: 1
54: 8
55: 7
56: 3
57: 3
58: 3
59: 5
60: 3
61: 4
62: 3
63: 3
64: 1
65: 5
66: 6
67: 3
68: 2
69: 7
70: 5
71: 5
72: 2
73: 4
74: 2
75: 4
76: 3
77: 3
78: 5
^ 79: 3
80: 1
81: 3
82: 3
83: 7
84: 5
85: 7
86: 1
87: 2
88: 5
89: 3
90: 5
+ 91: 18
92: 15
+ 93: 18
94: 13
95: 15





Att: ~486

Def: 527
- cRatio: 0.922
- Min pDif: 0.696 - 0.704

Def: 644
- cRatio: 0.755
- Min pDif: 0.528 - 0.538

Def: 678
- cRatio: 0.717
- Min pDif: 0.506 - 0.516

Def: 702
- cRatio: 0.692
- Min pDif: 0.490 - 0.499


For Defenses 527, 644 and 678, min pDif appears to be about (cRatio - 0.22). Alternatively, for defenses 644, 678 and 702, min pDif appears to be cRatio * 0.71.

Combined, could be cRatio * 0.71, with a max difference of 0.22.


Regardless, cRatio is clearly not capped at a low of 1.0, though the range of possible damage is clearly tightened up compared to the player formulas (and thus we can't use this as a shortcut for figuring out the player pDif formulas).

Raelia
02-11-2012, 02:13 AM
Does still show that the 1.0 spike still ranges above 1.0 when it's forming the 'upper limit' of damage, which supports the 'set 0.7-1.0 to 1.0 and add 0.3 below 1.0' method.

The mechanics are plainly the same, a 1.0 spike being generated and whatnot, so I'd like to know what data from which you're drawing the conclusion that the range is too narrow. It should be narrowed by that 0.3 anyway, so to what are you comparing to say it's too narrow?

Not to say mobs shouldn't have a different formula from a design standpoint, but lazy coders...

Masamune
02-11-2012, 04:58 AM
- cRatio: 0.922
- Min pDif: 0.696 - 0.704

- cRatio: 0.755
- Min pDif: 0.528 - 0.538

- cRatio: 0.717
- Min pDif: 0.506 - 0.516

- cRatio: 0.692
- Min pDif: 0.490 - 0.499

For comparisons, i raise you this:

Test name: 218BJ64
- cRatio: 0.92766
- Min pDif: 0.61111

218BJ65
- cRatio: 0.9045
- Min pDif: 0.5849

218BJ71
- cRatio: 0.8015
- Min pDif: 0.48077

218BJ72
- cRatio: 0.787
- Min pDif: 0.4615

218BJ73
- cRatio: 0.773
- Min pDif: 0.4423

Those tests shows the min pdifs you got should actually be lower... unless i missed something ?

Motenten
02-11-2012, 09:08 AM
The mechanics are plainly the same, a 1.0 spike being generated and whatnot, so I'd like to know what data from which you're drawing the conclusion that the range is too narrow. It should be narrowed by that 0.3 anyway, so to what are you comparing to say it's too narrow?

By 'narrow', I mean the difference between cRatio and min pDif (ie: lower range = cRatio - min pDif) is much smaller for the mob data than it is for players. See Masa's samples for a few illustrative points. For players, it's about 0.3 or a bit more; for mobs it's about 0.22 or less. The upper range doesn't seem as affected, but can't be sure; would need to get down to around 0.5 cRatio to see if it drops the max pDif below 1.0 at about the same point as for players.


Those tests shows the min pdifs you got should actually be lower... unless i missed something ?
Nope, that was one of the items of note: min pDif for mobs hitting players is significantly higher than min pDif for players hitting mobs.

Raelia
02-11-2012, 01:05 PM
I followed the conclusion, just wondered what data supported it. Just to cover all bases, what's the base damage on the data given by Masa to determine the flooring range? I'd take a stab that it was some multiple of 18 because of the first pDif, but the rest doesn't match.

We'd need >1.5 cRatio mob data to know if it's a difference in equation or just a larger floor/ceiling factor, like just bumping the set-to-1.0 range to a 0.5 width. This would be very visible in a hitcount of Moten's test.

Masamune
02-11-2012, 02:46 PM
I think the cause of this discrepancy is simply too low sample size Motenten... For example the parse at def678 shows 2 missing values at lower end (while dmg formula should produce each value like the rest of the parse)
Maybe with higher sample size you would have more chance at hitting BOTH primary and secondary randomizers = 0 ? (and then reach same min pdif as for player).

Motenten
02-11-2012, 04:40 PM
I think the cause of this discrepancy is simply too low sample size Motenten... For example the parse at def678 shows 2 missing values at lower end (while dmg formula should produce each value like the rest of the parse)
Maybe with higher sample size you would have more chance at hitting BOTH primary and secondary randomizers = 0 ? (and then reach same min pdif as for player).

While I don't doubt that there's the possibility of not quite hitting the true extremes, there's no way that that can explain the formula difference here. It would imply an 8-10 point gap where -no- values showed up, and that just isn't believable given the frequencies shown on other values.

Motenten
02-11-2012, 04:49 PM
I followed the conclusion, just wondered what data supported it. Just to cover all bases, what's the base damage on the data given by Masa to determine the flooring range? I'd take a stab that it was some multiple of 18 because of the first pDif, but the rest doesn't match.

We'd need >1.5 cRatio mob data to know if it's a difference in equation or just a larger floor/ceiling factor, like just bumping the set-to-1.0 range to a 0.5 width. This would be very visible in a hitcount of Moten's test.

The BJ tests were Brass Jadagna, and were d53 for the lvl 65, d52 for lvls 71-73.

Raelia
02-11-2012, 07:20 PM
And d54 for the level 64 then.

So after flooring the 0.773 cRatio could be anywhere from 23 to 23.999 for a min pDif anywhere between 0.4423 to 0.4615. Extrapolate the mob results to an equal cRatio and you get 0.556, or +0.1 higher. We've chewed on the 0.3 gap width for players plenty, so a 0.4 gap width would be necessary to do the same if base pDif calculation didn't change, so the hitcount of the spike should be huge (>50% of total hits) else we can then suspect a change in base formula.

Pro 3: 163 non-spike to 79 spike, 30% but this may be low enough to be not covering the whole gap width.

Pro 2: 148 non-spike to 91 spike, 38%, suggesting that the whole gap width is definitely not being covered.

So going back up to some earlier data, 105 base damage somewhere around 1.0 cRatio, it's got 61 non-spike to 47 spike, or 43.5%, suggesting either:

A. 0.95 width and 0.4 gap
or
B. 0.7 width and 0.3 gap

to the approximately 0.95 width and 0.3 gap of player data. It's definitely different from player functions in one way or another.

The earlier SAM data gives a ~0.40-0.45 'post-gap' width, so a 0.7 width and 0.3 gap is certainly possible, while the 0.95 width and 0.4 gap would give a wider range and doesn't fit the SAM parse data.

This gives the ~0.1 higher min pDif and suggests heavily that mobs indeed have a different set of basic pDif generation. Per my system RAE and LIA would each be reduced by 0.1 for mobs then.

grevenilvec75
02-15-2012, 01:20 AM
http://forum.square-enix.com/ffxi/threads/19793-dev1069-Phantom-Roll-Effect-Adjustments-feedback?p=279423&viewfull=1#post279423

Ig-Alima is lvl 120 and has 1059 ATK.

Slycer
02-15-2012, 10:45 AM
Ig-Alima is lvl 120 and has 1059 ATK.

The only significant information in the whole thread. Good pull, lol, I probably would have just glossed over it.

diasetsu
02-15-2012, 11:06 AM
I was very surprised to see that Ig'Alima is level 120, I was guessing more like 110 with defense over 800, so perhaps his defense is closer to the 600 area. I'll parse again whenever I next fight him and see if I can get a better estimate using level correction for a 120 mob. Consequently from the ADLs my group has been doing I don't think he is higher than level 100 as my low regular hits are where you'd expect them for a 2.0 cRatio, but I will pay more attention to what my exact attack is when LS does another run tomorrow to try to pinpoint a possible defense max for him.

Masamune
02-16-2012, 03:52 AM
I was very surprised to see that Ig'Alima is level 120, I was guessing more like 110 with defense over 800, so perhaps his defense is closer to the 600 area. I'll parse again whenever I next fight him and see if I can get a better estimate using level correction for a 120 mob. Consequently from the ADLs my group has been doing I don't think he is higher than level 100 as my low regular hits are where you'd expect them for a 2.0 cRatio, but I will pay more attention to what my exact attack is when LS does another run tomorrow to try to pinpoint a possible defense max for him.

... if you think you can keep all your stats constant during the whole zerg, then yes the parse might be exploitable... which i doubt.
Same problem for checking its defense: given all the debuffs your ls members will throw at it, and all the buffs it can use on himself, sound near impossible to me to keep its defense constant so you get time to compare with your attack...

Lastly, knowing a mob level is borderline relevant to this thread, while knowing its attack is litterally irrelevant.

grevenilvec75
02-17-2012, 09:11 AM
... if you think you can keep all your stats constant during the whole zerg, then yes the parse might be exploitable... which i doubt.
Same problem for checking its defense: given all the debuffs your ls members will throw at it, and all the buffs it can use on himself, sound near impossible to me to keep its defense constant so you get time to compare with your attack...

Lastly, knowing a mob level is borderline relevant to this thread, while knowing its attack is litterally irrelevant.

You could just do it on the test server.

Equip X defense gear, let him pound on you until you die.

Repeat with X + Y defense gear.

EDIT: or fana at start and just melee him until you wipe. (if you wanted to test mobs defense)

use hundred fists and a bring a friend or two.

Masamune
02-17-2012, 03:04 PM
a yes maybe on test server, i don't know as i don't haev access, but still need to control each variable used in the test... usually way too much in a zerg.

Masamune
03-02-2012, 08:18 AM
New data collected from Pchan posted on Official Forum (http://forum.square-enix.com/ffxi/threads/20989-defense-attack-damage?p=288426&viewfull=1#post288426).

He has also another way to modelize frequency behavior of dmg formula, bit debatable imho...

Maybe something in there will help community ?

Byrthnoth
07-19-2012, 02:53 AM
I accidentally closed the tab on a longer post I was writing, so this will be shorter as it's 3AM and I'm sleepy.


Still haven't worked out a proper emergent form for the 1.0 spike, though (ie: one that doesn't explicitly rely on checking whether the pDif range can include 1.0).

Any progress on this front? Currently we have min/max equations, but that doesn't gives us a clear way to calculate average pDIF, the only relevant quantity.

Here is what I extracted from your Min/Max equations (I don't know if they were written clearly somewhere, and I think I used your updated constants):

Max:
<table cellpadding="0" cellspacing="0" height="74" width="281" border="0"><colgroup><col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:4132;width:85pt" width="113"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">Zero to 0.5:</td> <td class="xl65" style="width:85pt" width="113">wRatio + .5</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">0.5 to 0.7</td> <td class="xl65">1</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">0.7 to 1.2</td> <td class="xl65">wRatio + .3</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">1.2 to 1.5</td> <td class="xl65">wRatio + wRatio*.25</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">1.5 to 2.625</td> <td class="xl65">wRatio + 0.375</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">2.625 to 3.25</td> <td class="xl65">3</td> </tr> </tbody></table>

Min:
<table cellpadding="0" cellspacing="0" height="93" width="318" border="0"><colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt;width:48pt" height="20" width="64">Zero to 0.38</td> <td class="xl65" style="width:48pt" width="64">0</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">0.38 to 1.25</td> <td class="xl65">wRatio*(1+152/1024)-448/1024 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">1.25 to 1.51</td> <td class="xl65">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">1.51 to 2.44</td> <td class="xl65">wRatio*(1+152/1024)-755/1024</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl65" style="height:15.0pt" height="20">2.44 to 3.25</td> <td class="xl65">wRatio - 0.375</td> </tr> </tbody></table>

Now! I still think chopping a hole in pDIF is the easiest way to solve our pDIF problem. We already know that they cap it to 3.0 and apply a secondary randomizer, so one more processing step before that isn't really a big deal. The flow would be something like this:
1) Calculate Ratio
2) Calculate cRatio (account for level correction)
3) Calculate wRatio (account for crits)
4) Choose High/Low, randomize it, and calculate qRatio (account for the 1.0 spike)
5) Set the limits at 3.0 and 0.
6) Apply the secondary randomizer.



Attack=50;
Defense=100;
CritRate=0.50; % 50% crit rate
dLVL=24;
LVLscale = 0.05; % 2H weapon

wRatio = Attack/Defense - dLVL*LVLscale + (rand < CritRate);

if rand > 0.5 % Up state
qRatio = wRatio + rand*( 0.5 + 0.25*(wRatio - 1.2)*(1.2<wratio<1.5) -="" 0.125*(wratio=""> $lt; wRatio $lt; 1.5) + 0.075*(wRatio>1.5) );
if qRatio > 0.5
pDIF = max(qRatio - 0.3,1);
end
else % Down state
qRatio = wRatio + rand*( (wRatio<2.44)*wRatio*152/1024 - 448/1024 + (wRatio>2.44)/16 )
if qRatio > 1.25
pDIF = max(qRatio - 267/1024,1);
end
end

pDIF = min(pDIF,3)
pDIF = max(pDIF,0)

pDIF = pDIF*(1+rand*0.05)
I don't have MATLAB installed on this computer, but the above should give a function with a maximum of 3, minimum of 0, frequency spike at 1, and the bounds described (assuming my math isn't messed up, which it might be at 3AM).

Did I use the right constants? Did you already make a model for the distribution?

Edit: Trying to do this in excel, the numbers don't quite match up. I have something wrong with the way I correct for the lower range's window.

Edit2: Actually, there might be something wrong with the basic concept. I'm going to have to think about this some more.
</wratio<1.5)>

Motenten
07-19-2012, 04:17 PM
Yes, you got the right constants (though I've played around with +/-1 for the 152 and 755 values). Everything in your table is correct, though I usually express it in calculation limits rather than input limits.

No, I haven't made more progress on this. pchan had some interesting ideas in his posts in the official forum, but they were incomplete, insufficient for a full model. I'll see if I can get some time tonight to poke at the numbers again.

Motenten
07-19-2012, 10:42 PM
Fraction of 'spike' hits compared to total remaining hits (rounded to two significant digits). 'Spike' hits excludes average non-trailing count on the supposition that those hits would have occurred normally anyway.


Format:
AttWeaponLvlColibri (ie: 254DG65 == 254 att, Daea Gratia, lvl 65 lesser colibri) (wRatio)

254DG65 (1.0539): 900 normal, 400 spike (30.77%)
254DG64 (1.0809): 650 normal, 350 spike (35.00%)
254DG63 (1.0996): 640 normal, 320 spike (33.33%)
284DG65 (1.1784): 720 normal, 360 spike (33.33%)
284DG64 (1.2085): 570 normal, 330 spike (36.67%)
284DG63 (1.2294): 450 normal, 220 spike (32.84%)
301DG65 (1.2490): 570 normal, 250 spike (30.49%)
301DG64 (1.2809): 1220 normal, 460 spike (27.38%)
301DG63 (1.3030): 1120 normal, 320 spike (22.22%)
322DG65 (1.3361): 1220 normal, 300 spike (19.74%)
322DG64 (1.3702): 1120 normal, 210 spike (15.79%)
322DG63 (1.3939): 1080 normal, 150 spike (12.20%)



Note that the wRatios of the above data are gradually increasing, down the list, to where min damage is right on 1.0 at the end. 301DG65 is the last one that has a min below 1.0, and it's only barely below (3 counts).

It appears that when min/max are above and below 1.0, the spike comprises approximately 1/3 (33.33%) of all hits. As wRatio increases, and min gets capped, the potency of the spike decreases until it fades entirely once min pDif rises above 1.0.

Graph of the ratio of spike hits vs wRatio:
http://images.bluegartr.com/bucket/gallery/f4c42605848586e0a60f2bce8f55f88f.png

Pink line is for the downtrending portion of the graph; it's clearly linear. The trendline intercepts the X axis at a wRatio of about 1.49.


Working out a formula for it...

Want to know how far away from 1.0 wRatio is. We know that min pDif is 1.0 at 1.5 wRatio, and max pDif is 1.0 at 0.5 wRatio, so we can consider it a mirror effect.
Abs(wRatio - 1)

The maximum value this can reach is 2.0 (wRatio of 3.0). We see something pretty close to that in the trendline formula in the graph, where it hits 1.9. So, will use 2.0

2.0 - Abs(wRatio - 1)

The trendline slope is -1.28, or 1.28 if inverted with the Abs() formula. Looking over valid slope ranges, 1.3 seems to be a reasonably solid choice.

1.3 * (2.0 - Abs(wRatio - 1))

An offset can then be subtracted to yield a fractional value that pretty much matches up with the observed values. 1.96 appears to be the best choice (alternatively, anywhere from 500/256 to 502/256).

1.3 * (2.0 - Abs(wRatio - 1)) - 1.96

And then this is capped between 0 and 33% (0.333). This becomes our U variable.

U = Max(0, Min(0.333, 1.3 * (2.0 - Abs(wRatio - 1)) - 1.96))




If Rand() < U then
pDif = 1.0
Else
pDif = Gen(min, max)



Put together a spreadsheet to run these numbers, and figure out net average pDif. (See: https://docs.google.com/open?id=0B0A0wGYYRRdaV0drSHpZM3RLSFE)

Compared with observed averages from the test data (weapon damage of 43 with fStr):



wRatio Obs. Avg Calc Avg. Diff
1.0539 44.978 45.8338 -0.8558
1.0809 47.036 46.6861 0.3499
1.0996 47.902 47.2763 0.6257
1.1784 49.064 49.7877 -0.7237
1.2085 51.263 50.8484 0.4146
1.2294 52.445 51.5849 0.8601
1.249 51.973 52.3833 -0.4103
1.2809 54.019 53.5727 0.4463
1.303 55.097 54.4075 0.6895
1.3361 55.182 55.7232 -0.5412
1.3702 57.261 57.1609 0.1001
1.3939 58.546 58.2091 0.3369

Avg Diff: 0.1077


As you can see, on average it comes very close to observed results.

Overall, it looks like a pretty reasonable rough model.

pchan
07-21-2012, 06:00 PM
Yes, you got the right constants (though I've played around with +/-1 for the 152 and 755 values). Everything in your table is correct, though I usually express it in calculation limits rather than input limits.

No, I haven't made more progress on this. pchan had some interesting ideas in his posts in the official forum, but they were incomplete, insufficient for a full model. I'll see if I can get some time tonight to poke at the numbers again.

My model is complete and modelize everything accurately.... I'll refer you to the wiki page on pdif.
I'll summerize it here.

given a cratio r, the game computes a and b, the min and max pdif (not the ingame ones). It rolls a uniform variable on [a,b]. There is a bernouilli variable whose parmeter is only dependent on r that makes your damage equal to either the uniform variable or 1 (which rolls your weapons damage, hence the spike), then everything is multiplied by the "randomizer" and the usual stuff (damage..). In other words the game returns

( 1*U+(1-U)*V)*W where

V=uniform on [a,b], U=bernouilli of parameter p=5/6-(b-a), W=uniform on [1,1.05]

More precisely

a(r)=1+(10/9)x(p(max(r,0.5)-1.5)-n(max(r,0.5)-1.25))
b(r)=1+(10/9)x(p(r-0.75)-n(r-0.5))

are the formulas defining max and min pdif with p(x)=max(x,0) and n(x)=max(-x,0) which gives
for b


Ratio Range 'r' Function Value Observed maximum
0 ≤ r < 0.5 b= 1+(10/9)x(r-0.5) 0.467+1.167xr
0.5 ≤ r ≤ 3/4 b= 1 1.05
3/4 < r ≤ 2 b = 1 +(10/9)x(r-3/4) b=0.175+1.167xr

for a


Ratio Range Function Value
r ≤ 0.5 a = 1/6
0.5 ≤ r < 1.25 a= 1 + (10/9)x(r-1.25)
1.25 ≤ r ≤ 1.5 a = 1
1.5 < r ≤ 2 a= 1 + (10/9)x(r-1.5)

a is always the the observed value while b must be multiplied by 1.05.

Given those values of a and b, you can define the value of the paramater p of the bernouilli variable
p=5/6 - (b'-a')
generally b'=b and a'=a except for r<0.5 where is set to 0.

From a programing point of view, this is easily done ;


if rand[0..1] < p then return rand[1,1.05]
else return rand[a,b]*rand(1,1.05)
end if;

This model gives accurate average values


r ≤ 0.5 m = .2182870370+.3796296294*r+.7592592591*r^2
0.5 ≤ r < 0.75 m=-.0822530866+1.676697531*r-.6327160494*r^2
0.75 ≤ r ≤ 1.25 m = .2024691355+.8225308644*r
1.25 < r ≤ 1.5 m=1.309722223-.8541666666*r+.6327160494*r^2
1.5 < r ≤ 2 m=-.2562500002+1.138888889*r
( 1 handed weapons only)


PS : even though I did not test it, for crits it's probably the same except a is replaced by a+1 and b by b+1, in which case a crit has no spike at pdif=1 and ends up being

min(1+V,3)*W with the above notations (V uniform on [a,b], W uniform on [1,1.05]).

In a program it simply reads


min(1+rand[a,b],3)*rand(1,1.05)

pchan
07-27-2012, 05:56 PM
U = Max(0, Min(0.333, 1.3 * (2.0 - Abs(wRatio - 1)) - 1.96))


If Rand() < U then
pDif = 1.0
Else
pDif = Gen(min, max)



Well that basically the same as my model except your function U is what I call p, it's the parameter of the Bernouilli. What's weird with your model is that the lines break at 1.492 and 0.507 (probably makes sense in 1024 system ? Otherwise it's 0.5 and 1.5..). The huge difference is that I don't cap it at 0.33 (for you it breaks at r=1.236 and 0.763). I cap it at 5/18=0.2777... This because I want your "U" to be directly a function of the difference max pdif / min pdif. In other words max pdif and min pdif have the same slopes when they both increase ( before the modifier). Based on this I found out that fractions of 9 and 18 were matching for max,min and your "U".

Also your 0.33 come kinda out of nowhere. The spike frequency (your definition) is not exactly p.

pchan
07-28-2012, 03:13 AM
Compared with observed averages from the test data (weapon damage of 43 with fStr):



wRatio Obs. Avg Calc Avg. Diff
1.0539 44.978 45.8338 -0.8558
1.0809 47.036 46.6861 0.3499
1.0996 47.902 47.2763 0.6257
1.1784 49.064 49.7877 -0.7237
1.2085 51.263 50.8484 0.4146
1.2294 52.445 51.5849 0.8601
1.249 51.973 52.3833 -0.4103
1.2809 54.019 53.5727 0.4463
1.303 55.097 54.4075 0.6895
1.3361 55.182 55.7232 -0.5412
1.3702 57.261 57.1609 0.1001
1.3939 58.546 58.2091 0.3369

Avg Diff: 0.1077



As you can see, on average it comes very close to observed results.



With our model, the expectation is easily calculable (the full model, aka the one with 1.05 randomizer) : with your notations
E(model)=1.025*(U+(1-U)*(min+max)/2)=1.025*(1+(1-u)*( (min+max)/2 -1 ) )
Using a regression on your observed data I find
36.9709943398719360*wratio+6.51618448985013199
For r between 0.75 and 1.25, my model gives me that the common slopes of min & max is 10/9 therefore

1.025*(10/9)*(1-u)*43=36.9709943398719360
==> u=0.245

not 0.333

(It could be due to you taking another slope value)

pchan
08-06-2012, 02:37 AM
I went back to the crit pdif formula, and my model gives that b=2 for r=1.65 so the choice of fraction of ??/9 seems good and consalidate its validity. Anyway assuming crit are generated through

min(rand[a+1..b+1],3)*rand[1..1.05] with a and b being what I said in post 163 I am getting the following formulas for crit pdif average


r ≤ 0.5 mc = 1.338194445+.5694444444*r
0.5 ≤ r < 0.75 mc=1.338194444+.5694444444*r
0.75 ≤ r ≤ 1.25 mc = .9111111111+1.138888889*r
1.25 < r ≤ 1.5 mc=1.622916667+.5694444444*r
1.5 < r ≤ 1.65 mc=.7687499999+1.138888889*r
1.65 < r ≤ 2 mc=-1.298333333+3.644444444*r-.7592592593*r^2


(averages to 2.95 @ capped ratio or 46% more damage than a non crit)

PS : again, note that the model for crit has not been tested.