-
defense, attack, damage
I didn't know where to put this so I put it here as it's battle related. I did a bunch of test on the test server to express the distribution of melee hits between min damage and max damage, assuming they are given.
Let r=(your attack)/(mob's defense) [not bothering with level correction]
First case 0.75< r <1.25
Call a and b min and maximum damage, DMG your total weapon damage (incl fstr for those that know what it is). If you know what the 5% "randomizer" is those are values before accounting for this randomizer. The law of the random damage generated by the game is
d=((1-U)*V1+U*DMG)*(1+e)
e= unfiorm between 0 and 0.05; this is the so-called randomizer.
DMG= your weapon damage
U= a bernouilli variable which parameter is unknow so far, taking 2 values, 0 or 1
V1=uniform on [a,b]
In other words
IF U=0 THEN d=DMG*(1+e) ELSE d=V1*(1+e) END IF;
is a simple code that give this random variable.
Notes : this is obtained through data. When fighting EM sandsweepers in aby-altepa, if your def is in the correct range then there is a fixed interval of values (it's the same interval regarless of your attack) that have high frequencies, and they are always DMG->DMG+5%. For instance I was on pup and had 104 total damage including fstr, then I would find that the values 104,105,106,107,108,109 happen nearly 30-50% of the time.
This implies the following form for the distribution of the random damage 'd'
http://i189.photobucket.com/albums/z...104_ATT429.jpg
The average damage is therefore
d*=(1-q)*1.025*(b+a)/2+q*DMG*1.025 where q is parameter of the Bernouilli U
The proportion of numbers lying is the interval [DMG,DMG*1.05] seems constant equal to about 35% and doesn't seem to vary much with attack values. This proportion is , with the above model,
q+(1-q)*ln(1.05)*DMG/(b-a) .
Can provide data if needed.
second case 0.75> r > 0.5
In this case of DMG is equal to b we still have:
d=((1-U)*V1+U*(DMG)*(1+e)
The frequency spike happens at the upper bound of the damage range (b=DMG so the actual maximum observed is DMG*1.05).
second case case r>1.5
In this case DMG is still outside of [a,b] (DMG<=a) there are not high frequency values, so it's natural assumption that the roll U is equal to 1. It means that the parameter of the bernouilli U is likely zero when ratio>=1.25
exemple
http://i189.photobucket.com/albums/z...nterstance.jpg
(only the shape of the graph is relevant)
How to find a mob's damage
Easy. Get hit a a couple of times with a non retarded def and examines is the lowest value of the frequency spikes. Exemples, the chigoes in caedaerva mire have about 70 damage as "weapon"
**asuming mob's pdif works the same**
How to find a mob's VIT
Check what is the minimum frequency spike you are getting and reverse the fstr formula.
-
Edited the previous post as the behavior is changing for 1.25<r<1.5 and 0.5<r<0.75
second case case r>1.5
Same as above, d=(1+e)*V1
So it's roughly uniform
third case 1.5>r>1.25
In this case the equation still holds
d=((1-U)*V1+U*DMG)*(1+e)
because in this case the true min pdif equals weapon DMG, therefore the distribution has a spike at its lower bound
However the frequency is decreasing if r grows towards 1.5 at which point there is no more spike (assuming therefore that the parameter of the bernouilli is equal to 0 at 1.5 pdif)
What remains is to examine the variation of the parameter of U with r. i'm suspecting that this parameter p is 0 for r>1.5 and r<0.5 which is basically when the weapon DMG doesn't appear in the hits values, making the formula still hold. However monster vs player seem to indicate that at very low pdif a frequency spike appear at the lower bound of the damage values so something else could happen at this point (flooring).
-
Sorry... I didn't see where you define a and b, as well as p. Mind elaborating those points?
The model offered seems plausible to generate the spiking behavior.
-
I'm not interested in findind a,b. For this look at the threads on BG. Knowing a and b, aka the min and max pdif values (more or less 5%) isn't going to help you modelize damage.
P is the parameter of the berouilli it is unknown what exactly it is dependant from, though likely a function of ratio. It is 0 at 1.5 pdif and decreasing between 1.25 and 1.5. I need larger samples per data point to estimate it correctly. p is responsible for the "spike" around the DMG value +0~5%.
-
Which Samples do you need at which cRatio ? i made a large number of parses which may help you ?
I have questions about your reasoning:
- what tells you the primary pdif (before the 5% randomizer is applied) follows a Bernouilli-type law ? (and not a uniform or gaussian law for example)
- what tells you the "thresholds" are 0.5 0.75 ? (and not 0.43 or 0.71?). 1.25 and 1.5 were already known so np.
- can you post your "data" somewhere please ? (because sansweepers using berserk can screw things)
-
The primary pdif is not a Bernouilly and honestly I don't trust SE for generating anything but uniform laws. The primary pdif is
(1-U)V1+U*DMG, V1 uniform on [a,b] and U a bernouilli. Why ? because It's not a bell curve basically and outisde of the spike the frequencies look about the same. Also all the spikes happen between DMg and DMG*1.05 whatever you do so it's not gaussian. The reason the frequencies of the spike are not equal is because of flooring, which makes certain values less or more likely.
Also I posted this comparison on the wiki :
http://images3.wikia.nocookie.net/__.../Pdif_r094.jpg
All the data between 0.75 and 1.25 follow the same trend except for the position of spike due to a & b changing.
Under <0.75 is only assumption on my part since data is had to get, the lowest I have is 0.59 pdif. For me it's clear that the limits are determined by ratio values at which min pdif=1 (assuming 1.5) and maxpdif=1 (assuming 0.5 since it's before randomizer).
-
data under 0.75 pdif, everything is done on PUP without any AF3 or close to naked THF
(format : melee hit value : frequency, H2Hskill_strvalue_attvalue_damagevalue on H2Hwpn)
H2H300_STR94_att273_D0:= [[9,11],[10,15],[11,9],[12,13],[13,17],[14,21],[15,21],[16,18],[17,20],[18,25],[19,15],[20,10],[21,22],[22, 8 ],[23,28],[24,15],[25,13],[26,20],[27,20],[28,24],[29,19],[30,18],[31,24],[32,19],[33,14],[34,25],[35,19],[36,12],[37,35],[38,30]]:
H2H300_STR134_att288_D0:=[[17,1],[18,8],[19,3],[20,4],[21,5],[22,7],[23,7],[24,5],[25,7],[26,5],[27,4],[28,9],[29,7],[30,4],[31,12],[32,5],[33,10],[34,11],[35,6],[36,7],[37,4],[38,7],[39,2],[40,11],[41,5],[42,7],[43,10],[44,26],[45,15],[46,19]]:
data 0.75<r<1.25 pdif,
H2H404_ATT350_STR91_D0:=[[20, 7], [21, 17], [22, 36], [23, 39], [24, 36], [25, 35], [26, 35], [27, 34], [28, 41], [29, 40], [30, 36], [31, 48], [32, 32], [33, 37], [34, 44], [35, 33], [36, 33], [37, 42], [38, 50], [39, 33], [40, 38], [41, 28], [42, 47], [43, 36], [44, 33], [45, 37], [46, 39], [47, 211], [48, 186], [49, 187]]
H2H404_ATT360_STR116_D39:=[[45,6],[46,2],[47,7],[48,3],[49,6],[50,3],[51,2],[52,6],[53,9],[54,2],[55,6],[56,1],[57,2],[58,4],[59,2],[60,2],[61,3],[62,3],[63,2],[64,4],[65,2],[66,3],[67,2],[68,7],[69,4],[70,4],[71,7],[72,3],[73,3],[74,5],[75,6],[76,3],[77,3],[78,2],[79,4],[80,5],[81,5],[82,4],[83,2],[84,6],[85,2],[86,5],[87,5],[88,4],[89,3],[90,4],[91,19],[92,19],[93,27],[94,21],[95,19],[96,2],[97,2]]
H2H427_ATT399_STR176_D42:=[[59, 2], [60, 5], [61, 4], [62, 3], [63, 14], [64, 6], [65, 5], [66, 9], [67, 5], [68, 6], [69, 4], [70, 9], [71, 4], [72, 4], [73, 6], [74, 7], [75, 4], [76, 5], [77, 4], [78, 12], [79, 4], [80, 3], [81, 5], [82, 4], [83, 5], [84, 5], [85, 9], [86, 9], [87, 9], [88, 4], [89, 8], [90, 7], [91, 6], [92, 8], [93, 6], [94, 10], [95, 9], [96, 15], [97, 5], [98, 7], [99, 3], [100, 8], [101, 3], [102, 10], [103, 6], [104, 45], [105, 46], [106, 44], [107, 37], [108, 29], [109, 43], [110, 8], [111, 12], [112, 10], [113, 13], [114, 7], [115, 6], [116, 4], [117, 8], [118, 5], [119, 6], [120, 9], [121, 7], [122, 0], [123, 2]]
H2H427_ATT429_STR176_D42:=[[67,3],[68,6],[69,6],[70,13],[71,9],[72,7],[73,9],[74,10],[75,14],[76,16],[77,5],[78,4],[79,7],[80,4],[81,12],[82,8],[83,8],[84,12],[85,6],[86,7],[87,7],[88,8],[89,12],[90,8],[91,10],[92,9],[93,7],[94,7],[95,7],[96,9],[97,16],[98,8],[99,15],[100,8],[101,12],[102,13],[103,4],[104,56],[105,48],[106,46],[107,54],[108,61],[109,52],[110,10],[111,7],[112,8],[113,7],[114,7],[115,10],[116,10],[117,12],[118,11],[119,9],[120,4],[121,10],[122,9],[123,10],[124,9],[125,3],[126,6],[127,5],[128,5],[129,3]]:
H2H404_ATT467_STR91_D0:=[[34,9],[35,28],[36,38],[37,29],[38,40],[39,31],[40,37],[41,22],[42,41],[43,33],[44,42],[45,41],[46,32],[47,205],[48,190],[49,158],[50,35],[51,30],[52,33],[53,28],[54,26],[55,34],[56,30],[57,31],[58,26],[59,37],[60,33],[61,29],[62,16],[63,13],[64,9]]:
H2H427_ATT572_STR176_D42:=[[104, 88], [105, 88], [106, 108], [107, 104], [108, 110], [109, 113], [110, 19], [111, 20], [112, 20], [113, 26], [114, 7], [115, 25], [116, 18], [117, 26], [118, 9], [119, 20], [120, 15], [121, 13], [122, 13], [123, 20], [124, 17], [125, 16], [126, 24], [127, 24], [128, 16], [129, 28], [130, 13], [131, 16], [132, 17], [133, 16], [134, 21], [135, 15], [136, 17], [137, 33], [138, 30], [139, 22], [140, 19], [141, 11], [142, 12], [143, 15], [144, 15], [145, 17], [146, 20], [147, 21], [148, 27], [149, 33], [150, 23], [151, 9], [152, 26], [153, 22], [154, 17], [155, 19], [156, 24], [157, 19], [158, 13], [159, 13], [160, 28], [161, 18], [162, 17], [163, 20], [164, 12], [165, 22], [166, 10], [167, 5], [168, 7], [171, 5]]:
data above r=1.5
H2H427_ATT715_STR176_D42:=[[112,2],[113,1],[114,7],[115,9],[116,8],[117,6],[118,7],[119,17],[120,8],[121,14],[122,9],[123,9],[124,5],[125,6],[126,8],[127,5],[128,9],[129,6],[130,9],[131,8],[132,9],[133,17],[134,11],[135,5],[136,4],[137,6],[138,11],[139,12],[140,9],[141,4],[142,6],[143,11],[144,11],[145,7],[146,6],[147,4],[148,8],[149,11],[150,10],[151,6],[152,4],[153,12],[154,7],[155,9 ],[156,13],[157,5],[158,7],[159,10],[160,9],[161,8],[162,11],[163,8],[164,6],[165,4],[166,4],[167,12],[168,9],[169,7],[170,6],[171,8],[172,13],[173,8],[174,9],[175,11],[176,8],[177,11],[178,5],[179,13],[180,7],[181,16],[182,9],[183,7],[184,6],[185,3],[186,5],[187,8],[188,15],[189,8],[190,7],[191,10],[192,11],[193,4],[194,8],[195,8],[196,5],[197,11],[198,9],[199,10],[200,15],[201,8],[202,9],[203,3],[204,6],[205,4],[206,5],[207,3],[208,2]]:
Got other data for high pdif but it's monter vs player.
-
Nice !
Thanks for the explanations and data (where are crits?).
What are SandSweeper's Defense and VIT ? How you filtered out hits landed during their Berserk ?
Did you get a look at tests done @ Mathy BG forum ? some data might help ? You didnot answer my 1st question: which test do you need (at which cRatio) ?
-
EM sandsweepers have 457 def idk about their vit but it should be easy to get from the data itself. The first data set for H2H=300skill, no weapon, 94 str gibes you a base damage of 37. As 0.11*300+3=36, you are @ +1 fstr. Now the data H2H404_ATT350_STR91_D0 gives 47 damage, while 404*0.11+3=47 so that's +0 fstr. Thy have between 101 and 104 VIT I guess ? The exact value doesn't matter as your total damage can be read on the graphs.
Berserk is not a problem, you just move to the next mob.
I would need data between 0.5 and 0.75 to confirm the variations of the paramater 'q', namely that it is zero @ r=0.5 (vanishing spike). I have good approximations @ r=0.75, 1, 1.25, 1.5.
Also in order to maximize the data I removed all crit atma/merit/dex w/e so their data is too small. I could do that later to examine how a crit is obtained.
-
For crits in abyssea, i parse with 50% critrate using atmas GnarledHorn and DarkDepths, yielding 40% together on top of your own ~10% base critrate. So a parse of 3k hits should have about same sample size for normal or crit damage.
Regarding generation of a crit, it's easy:
On the formula, particularly the term V1, instead of using a simple RAND(0;1), you add another term to it:
+ IF(RAND(0;1)<=CritRate%;1.x;0) ,where x=the gap between crit mins and normal maxs.
Regarding thresholds below r<~0.8, we still trying to figure out if it occurs at 0.8 0.75 or 0.7, but not easy to discern because of the secondary randomizer... Same problem around r~0.5 or 0.45?
I forgot also to mention something fundamental about the way to consider this frequency modeling:
The frequency spike(s) is a "signature", ie i think is something original SE devs actually didNOT want. That means those spikes are INDIRECTLY generated from a formula "format" non determinist, ie can NOT model something like "30% of the time, when 0.75<=r<=1.25 we have pDIFa=1, and normal randomized shape otherwise"... and that's what you wrote basically :s
This particular signature also "transfers" to crits at low cRatios, when pDIFa=1 belongs to crit damage.