Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you calculate %xHKO?
#43
Sorry I know the thread is old, but perhaps I can help.

You can do Monte Carlos simulation as suggested if you're rusty on statistics. Or you can approximate it by using normal. If you want the exact probability, here's how it's done: (I think)

What you are looking for is the Irwin-Hall distribution: http://en.wikipedia.org/wiki/Irwin-Hall_distribution
You have to integrate each pdf to get the desired cdf value. Essentially, you are looking at the point where the area to the right of point x = your desired success rate

The general formula to normalize uniform random variable isSady-a)/(b-a) where Y is your random variable (damage), a is your lower range, b is your upper range.
You want to match that to the value of 1-F(X), or c.

(y-a)/(b-a) = 1-F(X) = c
=> b=(y+ac-a)/c

Note that we'll need a in order to solve for b, so here's where the approximation comes in, if you want exact, then you'll have to find a formula to express a in terms of b. It'll be the ratio of MIN/MAX = [(Primary Stat * 0.9 * Skill Mastery + Secondary Stat) * Weapon Attack / 100]/[(Primary Stat + Secondary Stat) * Weapon Attack / 100] Courtesy of Lucida
I just prefer to work with 0.9m, where m is mastery %, and call it d,

So we have:
b= y/(d + c(1-d))
where b is the total damage output range, not per hit/attack

Now, what's tricky about k-hitting is that the distribution differs as k changes, for one hit (k=1), c is just 0.05

If you want to one hit something with 20,000 hp, you'd need (working with 60% mastery)
b= 20,000/(0.9*0.6 + 0.05(1-0.9*0.6)) = 35523.979 upper range (d is approximated, remember you can use the exact ratio if you want)

For 2-hitting, you want c = 0.316227766/2 = 0.1581139 (integrate from 0 to 0.05, and divide by 2 to normalize to uniform(0,1))
b = 20,000/(0.9*0.6 + 0.1581139(1-0.9*0.6)) / 2 = 32640.67 / 2 = 16320.338 (you divide by k to get per hit range, instead of total damage)

The above examples are using attack with 100% base, so you're using cannon (400%), just divide your final answer by that. For multihit attacks, you have to treat each hit as an attack, so one hitting with cannon you have to work with k=4, 2-hitting with k=8, etc. Uniform is scalable so it wouldn't affect the distribution shape.

You do the same for k=3 and 4, but values of k and c will change. For example, c for k=3 will be 0.6694/3 for 95% chance, 1.046635/4 for k=4. If you want to find something like 50% chance, you have to make sure you're integrating the pdf correctly, but for the most part, if you're looking for high chance value, just integrating the first piece should be fine.

Some may want to find out with their existent range, what are their chance to 1,2,3-hit a mob. Instead of solving for b, you just solve for c, and then solve for x from the cdf.

If you want to incorporate critical, sorry, you're best off either approximating it by normal or Monte Carlos.

Note: b is calculated on several assumptions. One being the numbers being uniform generated in game. b is calculated with 0 monster def, so you can easily modify that in the end if you wish. Critical is not calculated, if you want to factor that in, best approach is to approximate it by normal or by simulation. That's about it, PM me if you need further clarification or examples.
Reply


Messages In This Thread
How do you calculate %xHKO? - by Dusk - 2009-08-14, 11:40 AM
How do you calculate %xHKO? - by Kortestanov - 2009-08-14, 12:45 PM
How do you calculate %xHKO? - by Shidoshi - 2009-08-14, 01:59 PM
How do you calculate %xHKO? - by Stereo - 2009-08-14, 02:00 PM
How do you calculate %xHKO? - by KaidaTan - 2009-08-14, 05:29 PM
How do you calculate %xHKO? - by Russt - 2009-08-14, 05:41 PM
How do you calculate %xHKO? - by modular - 2009-08-14, 06:59 PM
How do you calculate %xHKO? - by Russt - 2009-08-14, 07:01 PM
How do you calculate %xHKO? - by Shidoshi - 2009-08-14, 08:45 PM
How do you calculate %xHKO? - by singularity - 2009-08-15, 06:23 AM
How do you calculate %xHKO? - by Russt - 2009-08-15, 12:56 PM
How do you calculate %xHKO? - by Shady - 2009-08-15, 04:30 PM
How do you calculate %xHKO? - by singularity - 2009-08-18, 12:19 AM
How do you calculate %xHKO? - by Stereo - 2009-08-18, 12:29 AM
How do you calculate %xHKO? - by Russt - 2009-08-18, 12:39 AM
How do you calculate %xHKO? - by Dusk - 2009-08-18, 12:57 AM
How do you calculate %xHKO? - by modular - 2009-08-18, 12:57 AM
How do you calculate %xHKO? - by Russt - 2009-08-18, 01:03 AM
How do you calculate %xHKO? - by Dusk - 2009-08-18, 01:21 AM
How do you calculate %xHKO? - by Dusk - 2009-08-23, 01:45 PM
How do you calculate %xHKO? - by Russt - 2009-08-23, 01:56 PM
How do you calculate %xHKO? - by singularity - 2009-08-24, 10:38 PM
How do you calculate %xHKO? - by Russt - 2009-08-24, 10:51 PM
How do you calculate %xHKO? - by Noah - 2009-08-26, 04:38 PM
How do you calculate %xHKO? - by rainbowBean - 2009-12-14, 08:22 AM
How do you calculate %xHKO? - by KaidaTan - 2009-12-14, 09:07 AM
How do you calculate %xHKO? - by Stereo - 2009-12-14, 12:19 PM
How do you calculate %xHKO? - by KaidaTan - 2009-12-14, 04:19 PM
How do you calculate %xHKO? - by shouri - 2009-12-14, 04:42 PM
How do you calculate %xHKO? - by KaidaTan - 2009-12-14, 05:02 PM
How do you calculate %xHKO? - by Russt - 2009-12-14, 08:46 PM
How do you calculate %xHKO? - by shouri - 2009-12-14, 08:56 PM
How do you calculate %xHKO? - by Noah - 2009-12-14, 09:32 PM
How do you calculate %xHKO? - by Stereo - 2009-12-14, 09:33 PM
How do you calculate %xHKO? - by Russt - 2009-12-14, 09:40 PM
How do you calculate %xHKO? - by KaidaTan - 2009-12-14, 10:32 PM
How do you calculate %xHKO? - by rainbowBean - 2009-12-14, 11:01 PM
How do you calculate %xHKO? - by Russt - 2009-12-15, 03:50 AM
How do you calculate %xHKO? - by KaidaTan - 2009-12-15, 03:54 AM
How do you calculate %xHKO? - by Stereo - 2009-12-15, 03:51 PM
How do you calculate %xHKO? - by Noah - 2009-12-16, 09:28 PM
How do you calculate %xHKO? - by Stereo - 2010-01-18, 09:17 PM
How do you calculate %xHKO? - by Jellyflower - 2010-02-23, 08:30 PM
How do you calculate %xHKO? - by Jellyflower - 2010-02-23, 10:18 PM
How do you calculate %xHKO? - by KaidaTan - 2010-02-23, 10:34 PM
How do you calculate %xHKO? - by Russt - 2010-02-23, 10:42 PM
How do you calculate %xHKO? - by Noah - 2010-03-06, 06:51 AM
How do you calculate %xHKO? - by Russt - 2010-03-06, 09:08 AM
How do you calculate %xHKO? - by Shidoshi - 2010-03-06, 10:40 AM
How do you calculate %xHKO? - by Russt - 2010-03-06, 10:50 AM
How do you calculate %xHKO? - by Stereo - 2010-03-06, 11:42 AM
How do you calculate %xHKO? - by Noah - 2010-03-06, 12:39 PM
How do you calculate %xHKO? - by Russt - 2010-03-06, 02:57 PM
How do you calculate %xHKO? - by Noah - 2010-03-08, 12:00 PM
How do you calculate %xHKO? - by Kortestanov - 2010-05-03, 08:39 AM
How do you calculate %xHKO? - by Nikkey - 2010-05-03, 12:11 PM
How do you calculate %xHKO? - by Kortestanov - 2010-05-03, 02:16 PM
How do you calculate %xHKO? - by KaidaTan - 2010-05-03, 02:24 PM
How do you calculate %xHKO? - by shouri - 2010-05-03, 02:24 PM
How do you calculate %xHKO? - by Nikkey - 2010-05-03, 02:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)