Click to open network menu
Join or Log In
Mobafire logo

Join the leading League of Legends community. Create and share Champion Guides and Builds.

Create an MFN Account






Or

's Forum Avatar

Math. Lots of it.

Creator: Chandro October 16, 2011 4:33pm
1 2 3
Mastarwe
<Member>
Mastarwe's Forum Avatar
Posts:
421
Joined:
Dec 22nd, 2010
Permalink | Quote | PM | +Rep October 18, 2011 10:17am | Report
Nice, never thought of doing this (playing other things then carries). A great example to show people when they ask what you'll do with the knowledge.
I'm back!
Cervance
<Member>
Cervance's Forum Avatar
Posts:
56
Joined:
Feb 17th, 2011
Permalink | Quote | PM | +Rep October 18, 2011 12:42pm | Report
Chandro wrote:

Cervance, you've unfortunately been misled my the way I set up how we input the numbers. "Cd" in my equations represents +Crit damage. So if you have no items or masteries, it's 0, not 1. Bit of a remnant of when I originally wrote these equations strictly for input calculations.

Thanks for the clarification.
DPS=(S)(D)(1+(1+Cd)Cc))
DPS=(1)(100)(1+(1+0).1)
DPS=(100)(1+.1)
DPS=(100)(1.1)
DPS= 110
Huzzah, I can do Algebra!
Seeing this kinda stuff makes me wanna take better math courses. I wish I had something insightful to add here. Good luck with the project.
Pozsich
<Member>
Pozsich's Forum Avatar
Show more awards
Posts:
216
Joined:
Apr 18th, 2011
Permalink | Quote | PM | +Rep October 24, 2011 9:15pm | Report
-sigh-
That. Was. A. Hard. Read. I was with you up until the calculus. Master Equation - Simple enough. 11-D Hyper prism - Had to think about it. Calculus - What the -?!
Not all of us are that far into school yet >.>
.... By which I mean I'm in 9th grade, not that I'm a dropout XD
NinjaGinge
<Editor>
NinjaGinge's Forum Avatar
Posts:
1000
Joined:
May 28th, 2011
Permalink | Quote | PM | +Rep October 24, 2011 9:30pm | Report

LOL. I think Blydden just had a nerdgasm.

heck, i know i do whenever I see this thread
Thanks goes to JEFFY40HANDS for a gorgeous Karma sig
Hey, you should help me on acquiring Medieval Twitch!! :D
http://signup.leagueoflegends.com/?ref=507f1031d2ab3250817727
DePyro
<Member>
DePyro's Forum Avatar
Posts:
30
Joined:
Oct 25th, 2011
Permalink | Quote | PM | +Rep October 25, 2011 11:15pm | Report
I love what you've done. Now since I have more fun with AP nuke types, I want to know the calculations for that. for every stack of Ability Power how much total damage comes from a full burst nuke when you factor in all the skill being casted... I've done half-***ed math for this example the total burst you can do with talon before your combo skill all go on CD. That helps you build your champs, but doesn't help you be a better player. It's just optimum damage.
If you like a post
If a post helped you
If I made you laugh
Or if you just like me ;)
+ REP please and thank you
Rozsud3k
<Member>
Rozsud3k's Forum Avatar
Posts:
354
Joined:
Jun 29th, 2011
Permalink | Quote | PM | +Rep October 26, 2011 1:40am | Report
Ho-hum.

Well, there goes my brain; now I have to pick up exploded pink bits.


I don't even
DePyro
<Member>
DePyro's Forum Avatar
Posts:
30
Joined:
Oct 25th, 2011
Permalink | Quote | PM | +Rep October 26, 2011 12:33pm | Report
Bwahahaha that's awesome. Is this really a project for a program? If so are you using javascript c++ html? What's the plan for this?
If you like a post
If a post helped you
If I made you laugh
Or if you just like me ;)
+ REP please and thank you
Chandro
<Member>
Chandro's Forum Avatar
Posts:
53
Joined:
Jun 27th, 2011
Permalink | Quote | PM | +Rep October 26, 2011 1:56pm | Report
Actually no, all of this math is just getting rolled up into a "simple" excel spreadsheet. I have a separate thread in which we start to discuss that, but unfortunately it hardly went anywhere. Perhaps I should open the sheet up to the public...
Fox Rage
<Member>
Fox Rage's Forum Avatar
Posts:
1295
Joined:
Jun 24th, 2010
Permalink | Quote | PM | +Rep October 26, 2011 2:03pm | Report
Chandro wrote:

Hey all, Chandro here. For those of you who don't know me, I main AD carries; they've interested me since I started playing LoL in beta and, because I played a DPS class character in WoW, the math of their autoattacks has always interested me. As a math nerd roughly 1 year away from a B.A. in mathematics, I've always had a running rough math analysis of the game while playing it, and I wanted to share with you guys my general findings and open this stuff up to further discussion.

Note: As with most things I write about LoL, this is aimed for a slightly higher level. I will not take the time to explain the basics of what a carry is or the notion of farming up a BT (Bloodthirster), so if you are very new to the game, my work is not yet for you. However, if I am unclear to those of you with experience in the game, feel free to say so and I will do my best to clarify.

Note^2: The purpose of this specific thread is to open up the ground level of my work to those of you who are also mathy, and essentially show that I know what I’m talking about and have put a lot of work and thought into this. For the 99.9% of you who don’t want to hear the grueling specifics and would like practical applications, you’ll want to read my applications post which I hope to be able to publish within a week or so.

Introduction


After my first few games of LoL on an open server weekend of the private beta, it occurred to me that DPS in this game could be modeled by some function I could not yet find, DPS(x,y,z)=D(x)S(y)C(z), where the functions D, S, and C would represent some other functions detailing attack damage, attack speed, and critical strike {chance, modifier, coefficient}. Two years and several spreadsheet revisions later, I arrived at an equation involving far more variables than the original 3.

Glossary


DPS=Total Damage per second
D=Attack Damage
S=Attack Speed
Cc=Crit Chance
Cd=Crit Damage
A=Armor (of your target)
P#=Flat Armor Penetration
P%=Percentage Armor Penetration
M=Magic Damage on-hit
Mr=Magic Res (of your target)
Mr#=Flat Magic Penetration
Mr%=Percentage Armor Penetration


The Master Equation


The equation needed to be broken into two separate pieces (for everyone but Vayne, that *****), one for physical DPS and one for magical DPS, which then get added together. The two crit stats do their little dance on the side to make one coefficient, while the two trios of each defensive stat and its two penetration stats work together in Riot’s armor equation to form the bulk of the equation in their two respective parts.
Expressed solely in unmodified variables, the master equation modeling DPS is
DPS=(S)(D)(1+(1+Cd)Cc))(100/((100+(1-P%)(A-P#))))+(S)(M)(100/((100+(1-Mp%)(Mr-Mp#))))
This can also be written as a function for some applications, DPS(S,D,Cd,Cd,P%,A,P#,M,Mp%,Mr,Mp#)=(S)(D(1+(1+Cd)Cc))(100/((100+(1-P%)(A-P#))))+(S)(M)(100/((100+(1-Mp%)(Mr-Mp#)))). The needed difference here being that we are accurately expressing total DPS as a function of 11 independent variables, which is necessary for both of the methods of approach I have used henceforth: Geometry and Calculus.

Note before I move on: There are actually two master equations. Riot’s armor function is calculated in a manner that, as far as I can see, cannot be modeled as a continuous differentiable function, only as two such functions conjoined in a piecewise manner about A=0. A(a)={(100/(100+a)), a>=0; (2-(100/(100+a))), a<0}. As such, theoretical calculations will take place with the equation representing a nonnegative enemy armor value, and applications will have to switch back and forth as needed, which I will discuss in detail at such time.

Geometry: The Intuitive Approach


Geometry time! Since we have seen that DPS can be modeled as the dependent variable output of 11 independent variables, i.e., a differentiable closed function in Euclidean 12-space, R12, calculus-based approaches will hinge off of that fact. However, since it is the 11-dimensional projection of what got me starting on all of this thinking, it’s anecdotally pretty interesting. Imagine, if you can, an 11-dimensional rectangular hyper-prism. If you can’t, just picture a cube. We’re going to pour water (11-dimensional hyper-water) into this hyper-prism with the limitations on each of the 11 dimensions determined by our current AD stats. So, the hyper-water only flows out as wide as our attack damage, as long as our attack speed, as deep as our crit chance, et cetera. Now imagine the FILLED hyper-prism. You may be wondering where the outer walls of this prism would be; good point! Intuitively, they are determined by maximum conceivable stats in-game, attack speed is limited to 2.5, crit chance to 100%, et cetera. The closer our current limitations are to the walls of this hyper-prism, the closer we are to the impossible-to-reach maximum DPS, which would take something like 20 items. However, what we gain from this is the realization that, as is a property of Euclidean Real-spaces of any order k, the greatest-volumed hyperhedron with boundaries limited by linear limits (in our case the limitation of only 6 items plus other minor factors) will be a k-dimensional hyper-cube. What we gain from that is the realization that at any given time, the relative weight of one of our DPS stats is most lacking from reaching a hyper-cube, from this we can always determine what would be our best next item to buy. From here, the calculus kicks in.

Calculus: The Productive Approach


Namely Differential Calculus. Since we have a function on 11 variables, we should be able to find a partial differential of each of those and receive some kind of some form of a differential that may have applications. Unfortunately this raw value will be very… raw, but with appropriate tweaking It can do work for us bearing in mind that a differential value for our enemies’ armor is quite useless to us.
So without any further adieu…
Given DPS=(S)(D)(1+(1+Cd)Cc))(100/((100+(1-P%)(A-P#))))+(S)(M)(100/((100+(1-Mp%)(Mr-Mp#)))),

δS/δDPS=(D)(1+(1+Cd)Cc))(100/((100+(1-P%)(A-P#))))+(M)(100/((100+(1-Mp%)(Mr-Mp#))))
δD/δDPS=(S)(1+(1+Cd)Cc))(100/((100+(1-P%)(A-P#))))
δCc/δDPS=(S)(D)(1+Cd)(100/((100+(1-P%)(A-P#))))
δCd/δDPS=(S)(D)(Cc))(100/((100+(1-P%)(A-P#))))
δP%/δDPS=(S)(D)(1+(1+Cd)Cc))((100A-100P#)/(100+(1-P%)(A-P#))^2)
δP#/δDPS=(S)(D)(1+(1+Cd)Cc))((100-100P%)/(100+(1-P%)(A-P#))^2)
δM/δDPS=(S)(100/((100+(1-Mp%)(Mr-Mp#))))
δMp%/δDPS=(S)(M)((100Mr-100Mp#)/(100+(1-Mp%)(Mr-Mp#))^2)
δMp#/δDPS=(S)(M)((100-100Mp%)/(100+(1-Mp%)(Mr-Mp#))^2)
These 9 equations mean we can make a series of 9 outputs in a DPS spreadsheet (namely mine) and have ourselves a DPS growth differential for any given specific circumstance. This will finally answer questions like “If I am Tristana with an I-Edge and 2 Doran’s, what stat should I get next?” which previous spreadsheets could not do. I will therefore be having all sorts of fun over the next few days working with this and hopefully can bring you guys some meaningful results soon.

Thanks for reading and props to you if you made it through alive. The findings of the work I have posted here shall be processed and I'll be reporting every useful information I can to you guys. For now, the one thing that I don't need is comments along the lines of "I don't see how this is useful" or "This is incomplete" because I am well aware of those things for now, I'm just giving you all some preliminaries to share and possibly improve upon before I go off theorycrafting the actual numbers with them.


My brain is bleeding now, thank you >.>

It is kinda weird, since i'm terrible in math and didn't unerstand a thing of what you just wrote. Yet, I have he feeling I understood everything.... So not only is my brain bleeding, but i'm also mind-****ed, THANK YOU -.-'

P.S. +rep btw, great job on those maths

+rep me and you'll get good karma, wich means you won't be reincarnated into a rock! Isn't that awesome?

But yes this idea has been discussed more than Pam Anderson's tits in a plastic surgeons office.
1 2 3

You need to log in before commenting.

League of Legends Champions:

Teamfight Tactics Guide