Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

Guide 2.0 Forgery Odds And You: A Mathematical Analysis

Discussion in 'Wynncraft' started by Sockmower, Sep 5, 2022.

Thread Status:
Not open for further replies.
  1. Sockmower

    Sockmower Be excellent to each other CMD CHAMPION

    Messages:
    182
    Likes Received:
    753
    Trophy Points:
    75
    Minecraft:
    Hey! It's Sockmower here with a serious thread for once. As I'm sure some of you are aware, in 2.0 the forgery odds are getting changed and a small bonus system is being added for when you complete a 7/7 run (8/8 when CGG comes out).

    If you enjoy running the forgery, maybe don't read any further if you do it for the mythics...

    I'm aware this is a text-heavy post for those of you with tiktok attention spans, so TL;DR: With the new forgery changes and 7/7 runs, before CGG releases, your chances of getting a mythic will roughly double on average compared to 1.20.

    I heard some people saying that the "bonus" wasn't really worthwhile and I'd like to show you that it makes a larger difference than you might expect.

    For clarity: the 7/7 mythic chance was changed from 1% -> 1.2%, and when you complete a full 7/7 run, your mythic chance gets multiplied by 1.01 provided you didn't get a mythic. This means that the formula for your mythic chance on any 7/7 run after n runs without a mythic is 1.2*(1.01^n).

    To help understanding here, I included a list of the first few odds increases below:
    1.20%, 1.21%, 1.22%, 1.24%, 1.25%, 1.26%, 1.27%, 1.29%, 1.30%, 1.31%, 1.33%, 1.34%, 1.35%, 1.37%, 1.38%, 1.39%, 1.41%, 1.42%, 1.44%, 1.45%

    The increases are quite small, so I understand why people think it doesn't have a particularly great effect. However, these small increases do much more than you might expect.

    Below you can see the cumulative probability of getting a specific amount of mythics in a certain number of runs.
    upload_2022-9-5_20-26-0.png

    Green is the old odds, 1% per run.
    Orange is the newer odds, 1.2% per run.
    Blue is the newer odds, 1.2% per run, with the new bonus.

    We can see with the old odds (green), we would've got around 4.3 mythics per 250 hours playing (skull)
    And with the newer odds (orange), we would've got around 5.1 mythics per 250 hours playing (still skull)
    However, with the small bonus that blue adds, we can see we now get around 7.9 mythics per 250 hours playing (a 54% increase over just the new odds alone)

    Furthermore, you can see with the old systems, with incredibly bad luck, it was actually possible to obtain 0 mythics after 250 hours. With the newer system, even with monumentally poor luck, the lowest number you could mathematically get is 2. This was one of my goals designing the boost formula (bad luck protection) and it does actually help a good amount.

    You can also see that the maximum possible number has increased (despite being monumentally unlikely)

    Hopefully now you can see that the new bonus is doing something (quite a substantial something, really) and keep in mind that when CGG releases these numbers will increase further. Also keep in mind that these are averages, and your luck may vary.

    Thanks for reading drop a like if you enjoyed and also drop a like if you didn't enjoy i somehow burned my old SSD making those graphs
     
    Last edited: Sep 5, 2022
    Coragon42, Melkor, Raw_Fish and 40 others like this.
  2. Flynn Taggart

    Flynn Taggart Would an omnipresent always vore you 24/7 VIP

    Messages:
    302
    Likes Received:
    1,877
    Trophy Points:
    91
    Guild:
    Minecraft:
    rip in pepperonis SSD
     
    MlecznyHuxel99 likes this.
  3. FelixTape

    FelixTape BRuh Item Team CHAMPION

    Messages:
    144
    Likes Received:
    498
    Trophy Points:
    69
    Guild:
    Minecraft:
    It's better than 1% so im kinda sold honestly
     
  4. NagisaStreams

    NagisaStreams Sertified idiot CHAMPION

    Messages:
    424
    Likes Received:
    1,337
    Trophy Points:
    91
    Guild:
    Minecraft:
    based sockmower
     
  5. Mayyheam

    Mayyheam Well-Known Adventurer

    Messages:
    105
    Likes Received:
    24
    Trophy Points:
    55
    Minecraft:
    So… is it worth it to run the forgery for mythics?
     
    FelixTape likes this.
  6. Etherweaver

    Etherweaver Overseer of the Realm

    Messages:
    389
    Likes Received:
    724
    Trophy Points:
    91
    Guild:
    Minecraft:
    Well..yes? If you run in groups and coordinate your forgery runs so they’re as efficient as possible, Forgery might become a viable low-tier money making method. (this really depends on what mythics you get and just your luck in general, though) It still pales in comparison to lootrunning but it seems a lot better now.
     
    FelixTape likes this.
  7. lemonalade

    lemonalade [insert misinformation here] CHAMPION

    Messages:
    952
    Likes Received:
    2,058
    Trophy Points:
    148
    Guild:
    Minecraft:
    You're guaranteed to get a mythic eventually so it's less luck dependent than lootrunning. Sure, it might take a long time but hey a guarantee is a guarantee
     
    FelixTape and Hexorcism like this.
  8. Alex1

    Alex1 Alex HERO

    Messages:
    209
    Likes Received:
    510
    Trophy Points:
    67
    Guild:
    Minecraft:
    I'm very intrigued by the math behind this analysis. Would you mind elaborating a bit more about how you made those graphs? I was able to re-create your results for the most part, but had a few specific questions:

    1) What did you use for to generate the continuous binomial distributions (green + orange)? I recreated them with binopdf but could only generate discrete outputs. I tried using the closed form equation for binomial distribution, but with that many runs, the required 428.5! (or gamma(428.5 + 1)) in the formula didn't work out too well for me haha

    2) How did you model the distribution with the pity rate (blue)?? It's no longer binomial since the probability changes (and is dependent on the result of the previous run), and I could only verify your outcomes with simulation. Is there a closed form probability density function for this? I would love to learn more

    EDIT: I spent a long time on this problem and ended up with a non-simulation solution using markov chains, still want to know how you did it
     
    Last edited: Sep 6, 2022
  9. MlecznyHuxel99

    MlecznyHuxel99 Fruman walls guy VIP+

    Messages:
    1,235
    Likes Received:
    2,999
    Trophy Points:
    164
    Guild:
    Minecraft:
    Wish I could use my forgery chains to get the bonus from pre 2.0 runs
     
    That_Chudley likes this.
  10. Androphonia

    Androphonia SON ARE YOU THROWING THE RAID AGAIN VIP

    Messages:
    445
    Likes Received:
    345
    Trophy Points:
    72
    Guild:
    Minecraft:
    let's go time to use my bank pages of runes on something
     
  11. BlueTheSniper

    BlueTheSniper Founder of Blue Builds CHAMPION

    Messages:
    1,481
    Likes Received:
    1,648
    Trophy Points:
    130
    Guild:
    Minecraft:
    As someone with over 200+ runs (Archangel on 25th & Oblivion on 180-something-th) this is truly based :praying:

    Wynncraft why can I only use white-skinned emojis? Kinda sus if you ask me
     
    FelixTape likes this.
  12. Crokee

    Crokee Nudist poking eyes CHAMPION

    Messages:
    1,306
    Likes Received:
    4,207
    Trophy Points:
    164
    Guild:
    Minecraft:
    Interesting analysis. However, why are you simulating 250 hours of forgery (428 runs) instead of a more clearer number of runs say 100 instead?

    I would also include the expected number of runs before getting a mythic with x% chance assuming starting at pity 0 (1.2% chance). This is a lot more intuitive and easier to understand the scope of the analysis.

    Also where is the analysis part? I only see a graph. How did you come to this conclusion (graph)?

    Markov chains make me shiver…

    (Could you provide your analysis as well please?)
     
    Alex1 and Namakobushi like this.
  13. Alex1

    Alex1 Alex HERO

    Messages:
    209
    Likes Received:
    510
    Trophy Points:
    67
    Guild:
    Minecraft:
    I agree, I was looking forward to learning something new when I saw this thread but all we got are graphs and OP hasn't responded unfortunately. The good thing is that I went and played around with the problem myself, the math here is surprisingly complicated so I'm not sure why OP didn't show off all the work they did...

    Here you go:

    This is a simple binomial distribution, which is the expected number of successes of a "bernoulli trial", which is just a yes/no question with constant probability of getting yes (p) or no (1-p).

    The binomial distribution itself is extremely common, and well known to people who study probability and statistics. Pretty much any modeling software (R, Stata, Matlab, Python...) will have the the density function for this distribution built in, as a function of probability and # of runs.

    In this case, the number of runs is ceil(250 * 60 / 35) = 429 (not sure why this specifically but idk), with p = 1% or 1.2%

    upload_2022-9-8_15-25-10.png

    The cool thing about binomial distribution is that the expected value (expected number of mythics after N runs) is literally just N * p, so ~4.3 for the old 1% chance and ~5.14 for the current 1.2% chance

    However, the interesting thing about OPs graphs is that they are continuous (smooth) not discrete. The binomial distribution is discrete, since getting "4.5" mythics after 428.5714 runs doesn't make sense in the context of repeated bernoulli trials. Therefore, we can't use the built in binomial distribution tools of most software to create the same graph as OP (this was my first question in my response above).

    The only other solution I could think of is to use the full equation for the binomial distribution:
    upload_2022-9-8_15-29-6.png
    ^ DISCRETE. Doesn't work for X that isn't a whole number

    upload_2022-9-8_15-29-34.png
    ^ Continuous. Now our total number of runs can be any real number, and we can get a smooth graph for our distribution. The Γ function is the extension of the factorial (!) to real + complex numbers. https://en.wikipedia.org/wiki/Gamma_function

    Okay, now that we have an equation, we can just plug numbers in. This is the main reason why 429 runs makes no sense, it requires finding (428)! This sucks because it is way above the ~1.8 x 10 ^ 308 max value for numbers in most software, so I had to find annoying workarounds like using symbolic variables

    upload_2022-9-8_15-33-59.png

    Now with that out of the way, we can finally plot the continuous equation as a function of k (num mythics)

    upload_2022-9-8_15-34-39.png

    But what about the blue graph? What happens if the probability is not constant. Well you'd think that wouldn't make the question too much more complicated, but it actually makes it like 100x harder for some reason.

    Just a disclaimer I actually gave up trying to find an analytical solution to this. If OP used analysis to create the blue plot then extreme kudos to them, this is a really annoying problem. It's infinitely easier to simulate with monte carlo methods (just use random numbers and simulate thousands of runs), but still getting a monte carlo simulation into a continuous plot is a challenge on its own.

    The problem is, we no longer have a constant probability, so binomial is out the window. Also, the probability isn't just (1.2) * (1.01) ^ n, because if you get "pity broken" (meaning you get a mythic) then you go back to the first probability (1.2). The only way I could think of analytically solving this is using markov chains, which starts with drawing out all of our states and their transitions:

    upload_2022-9-8_15-41-10.png

    Each state represents number of runs since you got a mythic. Every state can go back to state 0 (you can get a mythic at each state) with certain probability (1.2 * 1.01 ^ n). Every state connects to the next state by 1 - (1.2 * 1.01 ^ n), so that all probabilities add up to 1.

    Luckily, turning this into a transition matrix (https://en.wikipedia.org/wiki/Stochastic_matrix) is straight forward, and we get:

    upload_2022-9-8_15-43-51.png

    Which is actually really easy to create in software, since it's essentially just the (1.2 * 1.01 ^ n) column vector smashed next to a matrix where the diagonal entries are 1 - (1.2 * 1.01 ^ n), or:

    upload_2022-9-8_15-44-49.png

    (Where p0 is the initial probability, pr is the pity rate). The last thing we need is the total size of the matrix, which is based on the number of runs it would take to get to 100% mythic chance, which happens to be: floor( log(100/po) / log(pr) ), which is 445 in this case (also, OPs claim that it is mathematically impossible to get fewer than 2 mythics doesn't make sense, since there are 444 states before you are guaranteed 100% mythic chance, and only 429 runs....)

    Ok so now we have a 445 x 445 transition matrix, and the whole point of making it is that we can determine the probability distribution of each state (how many runs after getting a mythic you are) after N number of runs. For a sanity check, let's hand calculate the values for 2 runs and see if it matches what we get with markov.

    After 2 runs you either:
    Got 2 mythics (1.4400e-04) [final state = 0]
    Got 1 mythic, then failed (0.0119) [final state = 1]
    Failed, then got 1 mythic (0.0120) [final state = 0]
    Got no mythics (0.9760) [final state = 2]

    Prob (State = 0) = 1.4400e-04 + .0120 = .0121
    Prob (State = 1) = .0119
    Prob (State = 2) = .9760

    Or, instead of all that calculation, we can just do
    upload_2022-9-8_16-6-26.png

    Where π_0 is just a row vector with 1 (meaning we start with no mythic) then a bunch of zeroes.

    For N = 2 we get:
    upload_2022-9-8_16-8-14.png

    Which is exactly what was calculated, but without any of the effort!

    So what I did was raised the matrix to every N from 1 to 429, and grabbed the first element (probability that you're in state 0, or 'just got a mythic' state). The results are...interesting

    upload_2022-9-8_16-18-51.png

    Still not 100% sure how to interpret these results, all I can say that it's the probability of being in the "just got mythic state", as a function of run #.

    Interestingly, if we sum over all the values, we get 7.8622, which is the exact value for expected number of mythics after 429 runs....And while writing this I realized if we just sum that plot over a certain number of runs, we can find the expected number of mythics after X number of runs using cumsum (nice) of the output of our markov chain:

    upload_2022-9-8_16-30-53.png

    What's interesting about this output is that it's almost linear, which we would expect from a binomial distribution, but there's some nonlinearity at the start. What I find most interesting is that the pity rate doesn't seem to have too much of an effect, especially for large number of runs (which makes sense, you're very likely to be pity broken before getting to those large values).

    Overall, the effect is that for low number of runs (which is what most players do), there's a nonlinear effect that positively affects your mythic rate for lower # of runs.

    Unfortunately I don't know how to go from this to a probability density function (to make the 'bell curve - ish' looking plot that OP has. I could get it by fitting a curve over a simulation, but am still interested in an analytic solution.

    The closest thing I found was this: https://en.wikipedia.org/wiki/Poisson_binomial_distribution
    A named distribution for exactly what we're talking about, where the 'probability vector' would be what's plotted in the "probability of being in just got mythic state". However, the equation for the PDF of the poisson-binomial distribution is incredibly complicated and I couldn't find something built into matlab for it. Maybe I'll mess around another time on some other software, but for now this is what I came up with.
     
  14. Crokee

    Crokee Nudist poking eyes CHAMPION

    Messages:
    1,306
    Likes Received:
    4,207
    Trophy Points:
    164
    Guild:
    Minecraft:
    Ohhh yeah this is the stuff I came looking for.

    It’s good that you provided your methodology and also explained what each of the terms are. I didn’t need them but I’m sure others would have liked it.

    Yeah I figured the easiest way would be by brute forcing it for the blue line. Do you not have the statistics toolbox on matlab? You need that to do PDF. I’m like 99.99999% sure it exists.
     
    Alex1 likes this.
  15. Sockmower

    Sockmower Be excellent to each other CMD CHAMPION

    Messages:
    182
    Likes Received:
    753
    Trophy Points:
    75
    Minecraft:
    All of my results were obtained using simulation (primarily because I am lazy) with 5,000,000 simulations of 250 hours of playtime per graph. The continuous distribution is actually kind of a trick (you have been deceived!) it is actually just the linear points interpolated with cubic interpolation (although this does tend to follow the real distribution). I suck at maths so unfortunately I can't do it "properly" but this is reasonably accurate, especially with the overkill number of iterations I ran.

    Arguably, 100 runs is no less an arbitrary number than 428. It's just a human "instinct" that 100 looks "more clear" than some other number.

    For those curious: the code was written in Rust with some questionable multi-threading goodness. Unfortunately I lost the source after reinstalling windows though.

    Hope this clears things up (it probably didn't xd) and you can forgive me for using a simulation (albeit a highly accurate one)
     
Thread Status:
Not open for further replies.