Welcome Guest
[Log In]
[Register]
Welcome to Brock's Loading Dock. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access memberonly sections, and use many memberonly features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: 
 Pages:
 1
 2
Mathematical curiosities not explicitly found at Smogon  

Tweet Topic Started: Jul 20 2009, 07:43 PM (1,485 Views)  
Salavoir55  Jul 20 2009, 07:43 PM Post #1 
Official Team Rater

I was thinking about making this thread for a while now, but JRCxyz's post in the Signup thread pushed me to doing it now. Basically, post anything mathematically related to Pokemon that is not explicitly found at Smogon. Proofs or demonstrationsformal or informalwould be nice too. If Smogon does not have a proof of something mathematical, it's okay to post it here despite the final math product being explicitly found at Smogon. There probably won't be too many, but there might be a few. I or another mod/admin will update this post with each contribution. They will be listed in alphabetical order. If someone says he or she will try to prove or demonstrate the validity of something later after posting an equation, please wait a reasonable amount of time before doing it yourself. It may be a good idea to ask the person how long you should wait. Also, if something is too long to write out, a link to the post explaining it will be provided (mostly for proofs). Multiple posting is okay in this thread, but please only do it if you're contributing something that isn't a correction of something. Base stat equations 1 base stat = 2 stat points (Assuming level 100) Base stat of 0 = 5 stat points (Assuming neutral nature, no EVs, no IVs) Base stat of 0 = 36 stat points (Assuming neutral nature, level 100, no EVs, 31 IVs) Defensive Potential See Potential: Defensive and Offensive. Effective base power equations Effective base power (Ebp) is the effective amount of base power a move has if you use it enough. It only is true over an infinite amount of uses although it becomes more true with each use. Another way of thinking of it is that it is true over time. Taking accuracy into account: Ebp = BasePower * Accuracy Taking flinch into account: Ebp = BasePower * (1 + F) (F = the flinch chance as a decimal) So for example, Waterfall has 80 Base power with a 20% flinch rate. Ebp = 80 * (1 + .20) = 80 * 1.2 = 96. Note that you can put the two equations together through multiplication, so the effective base power of Dragon Rush = 100 * .75 * 1.2 = 90. You can also do pretty much anything to Base Stats that you would do to damage such as multiplying by 1.5 for STAB, multiplying by an appropriate number for weaknesses/resistances, multiplying by 1.3 for Life Orb, multiplying by 1.1 for natures, and so on. This is because the Base Stat power is useful as a relative, independant comparison to others and is not meant to be used for damage except when appropriately used in the damage formula. Informal Proofs. Effort Value Equations 4 EVs = 1 stat point (Assuming level 100) 255 EVs = the maximum amount of EVs that can be put into a stat Explanation of why this might be so. Leech Seed Dissertation "When it comes to Grass Types using Leech Seed, there is a great amount of controversy over whether the Hp investment is valid. Some argue that it may waste Ev's, since a larger percentage of health is reabsorbed through Leech Seed, and the extra Ev's could be placed into defenses to sustain hits better...." For the full article, click here. Jump Points First note that Jump Points are fairly unimportant in deciding EV spreadsjust in case you didn't know. That doesn't keep them from being a mathematical curiosity though. I have three forms of these formulas: the special case in which the IV of a Pokemon is assumed to be 31; the more generalized case which takes IVs into account but is tedious to use; and the even more tedious to use but great for programming generalized case that takes IVs into account. In this post I will only list the IV =31 special case formulas. See here for more information. For base stats ending in 3 or 8, Tn = 8 + 40n For base stats edning in 4 or 9, Tn = 16 + 40n For base stats ending in 0 or 5, Tn = 24 + 40n For base stats ending in 1 or 6, Tn = 32 + 40n For base stats ending in 2 or 7, Tn = 40 + 40n Tn = the EVs required for a 'jump point,' all Tn's are in the range [0, 248], and n is an integer ≥ 1. Offensive Potential See Potential: Defensive and Offensive. Potential: Defensive and Offensive Very similar to this: http://www.smogon.com/dp/articles/normalized_stats Defensive potential: Multiply a Pokemon's HP and defense stat to get a number. Change the Pokemon's HP and/or defense then multiply them again to get another number. The combination of HP and defense that produces the larger number is the better combination of HP and defense. The number resulting from a combination of HP and defense is referred to as defensive potential. The larger the number, the better the defensive potential is. Offensive potential: Multiply a Pokemon's attack stat and base power of a move. Change the Pokemon's attack stat and/or base power of the move then multiply them again to get another number. The combination of attack and base power that produces the larger number is the better combination of attack and base power. The number resulting from a combination of attack and base power of a move is referred to as offensive potential. The larger the number, the better the defensive potential is. Proofs here. Reverse Damage Formula This formula allows you to calculate the attack stat you need to nHKO a Pokemon. a = {[(dh)/(0.85sel)]  2d}/(0.84b) Let a = Attack stat which must be reached, including boosts directly to Att, such as Choice Band b = The base power of the attack chosen d = The defense stat of the opponent (including the sandstorm boost for Rock types) s = The STAB multiplier e = Effectiveness of the attack l = Any other boosts to damage, such as Life Orb or Swords Dance, etc. h = The amount of damage wished to be dealt to the opponent, be it their Hp, half of it, 75% of it, etc. Note this is actual damage, not the percentage. Derivation and explanation. Stat Boosts Sf = So * (b/2) = .5So * b where Sf is your stat after a boost, So is your initial stat, and b is in the domain of integers in [3, 8]. The first boost means b = 3, the second means b = 4, and so on. http://www.smogon.com/forums/showthread.php?t=52180 Edited by Salavoir55, Dec 30 2009, 05:10 PM.

Credit to Rezon for the banner.  
Salavoir55  Jul 20 2009, 07:52 PM Post #2 
Official Team Rater

Note: The following discussion assumes the Pokemon is at level 100. Jump points for other levels are different and sometimes don't exist because a Pokemon's level affects its stats! Jump Point explanation Kingdrom put it this way: "Jump points are based on the fact that boosting natures round down. When (Hp Base stat * 2) + 110 + IV + Ev's / 4 equals a number divisible by 10 with a neutral nature, using a positive nature yields a bonus point." Gren Draco put it like this: "A jump point is achieving a [neutral] base stat ending in 0 [in a stat which the Pokemon's nature boosts]." Jump Points work because of the Pokemon game’s mechanics. They work because the game rounds everything down while natures boost a stat by 10%. You would make your stat points end in a 0 by using EVs to add to the neutral stat. That is another important, albeit offtopic, point to make and remember: EVs and IVs add to the neutral stat of a Pokemon. For some explanation why jump points work the way they do, remember how integers work and what happens when you multiply by the 1.1 of a boosting nature. The simple and quick way of explaining this is that the game rounds everything down. For all numbers that are not multiples of ten, this results in a decimal which is lost to the game's rounding. This means that for every stat point you add, your stat point increases by 1. However, when the stat point is a multiple of ten, multiplying by 1.1 will have no decimal. This means nothing is lost when rounding down, and so you get a bonus. This bonus is equal to one point because the game would round it down if it was a decimal, and 1 is the nearest nondecimal you can get if you increase from 0. (Perhaps more intuitively: 1.1 * 10 = 11 = 10 + 1) So, you get an extra point for the point you put in because that point made the number equal to a multiple of ten. Here's the longer explanation but still informal explanation. Integers are the assumed domain for the variables of the following discussion. What you are doing is adding a tenth of an integer to itself: 1.1X = X + (1/10)X. Now, looking at that equation, you can see that there will be something left over in all cases. However, due to the game always rounding the decimal (or fractional part) down, the (1/10)X term will disappear. So, the game sees the equation like this: floor (1.1X) = floor (X + (1/10)X) = X + floor ((1/10)X). (That last rearrangement is possible because X is an integer and thus floor (X) = X for all X). Because the game rounds down, 1.1X = X in all cases except one because the floor function will make the second term of the equation 0. Can you see which case that is from the equation? The case is actually cases: the cases in which X makes (1/10)X greater than or equal to one. Let X = Z, where Z makes (1/10)X >= 1. Consider what happens when (1/10)Z = an integer. In that case, Z = 10*an integer, which is another way to say Z is a multiple of ten and thus an integer too. When this happens: P = floor (1.1Z) = Z + floor (integer) = Z + integer. That means for a value of X that is a multiple of ten, X increases by an integer amount when multiplied by 1.1. Notice this is true for all integers X that make the argument greater than or equal to one, not just values of X which make the argument an integer. However, if (1/10)X >= 1 is not an integer, letting X = Y where Y has this property, then T = floor (1.1Y) = Y + floor(((1/10)Y  fraction) + fraction) = Y + ((1/10)Y  fraction) + floor(fraction) = Y + (1/10)Y  fraction with fraction < 1 being the minimum amount necessary to subtract from (1/10)Y to make (1/10)Y an integer. Precisely how large is this integer that is added in either case? It depends on how large X is. However, we are talking about jump pointspoints that result from an increase in Xrather than how large the boost from a nature is, which results from the magnitude of X. So we need only know relative change. P = Z + integer = Z + (1/10)Z while T = Y + ((1/10)Y  fraction). P/Z = 1.1, so Z increased by a factor of 1.1 exactly. T/Y = 1.1  (fraction/Y), so Y increased by a factor of 1.1  (fraction/Y). Since Y is an integer, fraction/Y = another fraction. This means P/Z > T/Y which means P increased more than T, and so a jump point only occurs when X is a multiple of ten. And here’s a more mathematically convincing argument for both the above as well as why the bonus point must equal one. Let's say C is a nonnegative integer, and X = 10C  2. In other words, some number X is two less than a multiple of ten. If this number X is a stat value in a boosting nature, then the stat is S = floor (1.1(10C  2)) = 10C  2 + floor ( .1(10C  2)) = 10C  2 + floor (C  .2) = 10C  2 + C 1 = 11C  3. Adding 4 EVs = 1 stat point to X gives: F = floor (1.1(10C1)) = 10C  1 + floor (.1(10C  1)) = 10C  1 + floor (C  .1) = 10C  1 + C  1 = 11C – 2 = S + 1. So adding one stat point resulted in an increase of one stat point. Now watch what happens when we add another stat pointone which makes the stat equal to a multiple of ten. floor (1.1(10C)) = 10C + floor (.1(10C)) = 10C + C = 11C = F + 2 = (F + 1) + 1. Notice that this is two more stat points than the last one. We added one stat point and got an increase of two stat points. Since C can be any nonnegative integerwhich means 10C can be any nonnegative multiple of tenjust like a stat that is a multiple of tenthe above shows the bonus point, i.e. the jump point, must equal one and only occurs at multiples of ten in a neutral stat given the properties of the game’s mechanics. The other forms of the Jump Point formulas The new, generalized formulas for calculating any 'jump points' mathematically: For base stats ending in 3 or 8, Tn = 36 – 4I + 40n For base stats edning in 4 or 9, Tn = 28 – 4I + 40n For base stats ending in 0 or 5, Tn = 20 – 4I + 40n For base stats ending in 1 or 6, Tn = 12 – 4I + 40n For base stats ending in 2 or 7, Tn = 4 – 4I + 40n Tn = the EVs required for a 'jump point,' all Tn's are in the range [0, 252], n is an integer ≥ 0, and I = your IV.  And here's their counterpart, the "programmable form." (which btw, I already programmed this into my TI83+ and made a Windows application out of it) They're more complicated but reduce back to the original formulas for I = 31, unlike the above ones (albeit, with n ≥ 0): For base stats ending in 3 or 8, Tn = 36 – 4I + 40*int (36 – 4I/40) + 40n For base stats ending in 4 or 9, Tn = 28 – 4I + 40*int (28 – 4I/40) + 40n For base stats ending in 0 or 5, Tn = 20 – 4I + 40*int (20 – 4I/40) + 40n For base stats ending in 1 or 6, Tn = 12 – 4I + 40*int (12 – 4I/40) + 40n For base stats ending in 2 or 7, Tn = 4 – 4I + 40*int (4 – 4I)/40) + 40n Tn = the EVs required for a 'jump point,' all Tn's are in the range [0, 252], n is an integer ≥ 0, int (x) is the greatest integer function, and I = your IV. I haven't combined these into one formula yet (assuming it's possible) because it should be fairly easy to track your 'jump points.' (if I wanted, I might be able to combine them with Trigonometry) Just look for the least amount of EVs it takes to make your minimum, neutral stat for your IV equal a multiple of ten, then add 40 EVs to the result. Each extra 40 EVs equals another 'jump point,' which is really what the equations are saying in plain English. How I found the Jump point formulas Part 1 One day, I was bored at a social event. So to pass the time, I started thinking. I thought of many wild things, but one thing which stuck was something which I had read about in Danbaru's EV guide: the jump point EVs. I noticed that they were exactly 40 EVs apart. I wondered then if there was a formula which could combine them all. Fortunately, I had just worked with sequences and series in my Algebra II/Trig course, so this was a simple matter. It was obviously an arithmetic sequence with a common difference of 40. All I needed then was the first term. To find this wasn't exactly an easy matter. I had no calculator remember. I'm not the weird kind of nerdy person who carries a calculator everywhere I go! I also didn't have any base stat references, nor was I sure why the jump points worked the way they did. It was a good thing I remembered how to convert base stats to stat points... Anyways, after thinking about it for a while, I decided to divide the EV points by four and add them to the base stat for 100s (the one I had memorized). I noticed that they all were multiple of tens. I had an "Aha!" moment and got to work on finding my first term for my arithmetic sequence. I remembered that a Pokemon with 31 IVs and no EVs had a stat of 236 for neutral base 100s (I had figured out that the neutral stat was what mattered during my "Aha!" moment). I decided to start with no EVs for obvious reasons. I stayed with 31 IVs because that is what everyone used, which meant the thought never occurred to me to make a formula which took those into account. I was merely trying to fit an arithmetic sequence to the jump points I saw on Danbaru's guide at this point. I noticed that 236 was four away from 240. After trying and failing by using a first term of four, I remembered that 4 EVs = 1 stat point. That meant in stat points, the common difference was ten. If I then multiplied the equation by four, I would have a sequence for the jump point EVs. And so, I came up with the following formula: Tn = 4 * (4 + (10 * (n 1))). Thrilled by my discovery, I tried applying it to other bases. However, I soon found out that they did not work. Working a while, I found it out for base 77s. I then found it for base 105s, 106s, 108s, 109s, and 105s. I noticed that the sequence was the same for base 105s and 100s. I did not have time to figure out why yet nor figure out the rest of the bases, since I was called away to do something, and I didn't get to work with them more until I got home. I was sure to enter my discovery into the computer though, so I wouldn't forget. When I got to my computer, I racked my brain trying to figure out why it wouldn't work. To help me see more clearly, I simplified the expression to Tn = 24 + 40n. I simplified the one for base 77s: Tn = 40 + 40n. The same form! I soon simplified the rest, my excitement growing with each simplification. They all had the same form! Not to mention that all the starting numbers were 8 apart in a pseudocyclical pattern. I also noticed that each formula worked for two bases that were 5 base stat points apart. I stared at the expressions, stunned momentarily. 40 EVs is 10 stat points! Of course! (Another "Aha!" moment) The jump points worked because they were multiples of ten. Adding ten to ten is another multiple of ten. This meant that each base had different sequences because of different first terms. That each formula worked for two base stats which were separated by 5 base stat points made sense since 5 base stat points = 5*2 Stat points = 10 Stat points = another multiple of ten. And that also meant that the jump point only depended on the last digit of the base stat (adding 5 is adding ten base stat points and uses the same formula; adding 10 is adding 20 base stat points; either case is another multiple of ten). So, the five formulas I now had were completely sufficient for calculating any jump point (I pretty much ignored IVs at this point since less than 31 is rare, and I was very excited). Part 2 Or so I thought. When I posted my jump points originally, it was for a RMT which had faulty Spiritomb EVs, and I thought I had made it clear that they only worked for an IV of 31. I thought nothing more of it until someone mentioned something about my formulas and asking whether IVs affected jump points. This got me thinking, and after much work and frustration, I soon generalized my formulas as follows, after which I generalized it again so that they reduced back to my original equations for I = 31, albeit for n = 0 instead of n = 1 as a starting n. To take IVs into account, we'd simply just need to add the difference between the perfect IV and the actual IV in EV points to the original formulas. This is because a less than perfect stat will need that many more stat points to get to the same jump point with a perfect IV. For example, 236 is the neutral, minimum stat for base 100s. However, if the Pokemon had only 18 IVs, then the neutral, minimum stat would be 236  how far away the IV is from 31. Mathematically, this becomes 236  (31  18) = 236  31 + 18 = 223. Notice that it is 7 stat points from reaching its first jump point and that it is 17 stat points from reaching what is the first jump point for a perfect IV. It would need 4*7 = 28 EVs for the first jump point and 4*17 = 68 IVs to reach the perfect IV first jump point. Because my original formulas took this into account already so that no jump points would be missed, all that needs to be done is to add 4 times this difference to each formula (the formulas are in EV points, remember). Doing this for the base 100 stat gives Tn = 24 + 40n + 4(31  I) = 24 + 40n + 124 – 4I = 100 – 4I + 40n. The derivations of the others are similar. For a little experimental evidence, testing this out to see if it gets that first jump point gives 100  (4*18) = 28. And as you can easily see, it gets the second jump point too. It doesn't miss any of them. Of course, because of the way imperfect IVs fall, the EVs can now range from 0 to 252 inclusive, so the range needs to be adjusted for this, which I did do. However, on closer inspection you can see that the formulas don't always work and miss some jump points. Notice also, that the example I just gave is flawed: it assumed n ≥ 0 not n ≥ 1 like the formula said in order to catch the first jump point. Why is this? It's because the first jump point is always less than or equal to 40. Assuming n ≥ 0, you can see that the example catches the first jump point because for n = 0, the number is 28 which is less than or equal to 40. That was why my jump point formulas didn't miss any points earlier on. So, to remedy this, we just need to make it so that for I = 0 (which results in the greatest number added to 40n) the number added to 40n is less than or equal to 40 for n ≥ 0, or equivalently the number added to 40n is less than or equal to 40 in magnitude for n ≥ 1. To make the formulas similar to the originals, the latter is what I'll aim for. Looking at Tn = 100 – 4I + 40n, you can see that for I = 0, Tn = 100 + 40n. To keep the points the same, we divide 100 by 40 (this results in the same number because the period is 40) and get 2.5. Half of 40 is 20, so this means that now Tn = 20 + 40n for n ≥ 0. The first jump point is Tn = 20, so to shift this formula to work for n ≥ 1, we simply change it to Tn = 20 + 40n which gives the first number 20 like the other one. You can verify this is accurate by checking a 0 IV base 100. Its minimum, neutral stat is 205 which requires 20 EVs (5 stat points) to reach the first jump point. The math is a little messier for larger IVs now, but because of the range restriction (i.e., you have to add 40 four times in order to get your first valid jump point if you have 31 IVs), these formulas still work fine and consistently. You do get your first valid jump point computationally quicker if you go with the n ≥ 0 formula though. So, I'm switching them to that version. The rest are derived in a similar manner. Part 3 While I had successfully generalized my jump point formulas to take IVs into account, I was quite annoyed at their tediousness. Some didn't reveal an actual jump point until the third or fourth term! So, I decided to program them into a computer. To do this though without having a lot of messy code, I needed to write these formulas in yet another form to make them consistent and efficient for computation and cleanlooking. I was also annoyed that my new generalized formulas didn't reduce to my original ones. So I also needed them to reduce back for I = 31. I could ignore the "40n" term, since all that mattered was the first jump point term. All that I needed to do was to shift these formulas over. I could do this by using a specific starting "n," or I could add a positive term to each of the formulas to cancel out the negative terms and so keep the same starting "n." How big would this term be though? It would need to be a changing term and need to cancel out the most negative the first term could get. Starting with the formula for bases ending in 5 or zero, I plugged I = 31 into my formula: 20  4(31) = 20  124 = 104. The first jump point appeared after adding 3 * 40 = 120. I also noticed that adding 2 * 40 = 80 would make the formula reduce to my original formula. So what I wanted to do was find a way to add a positive number so that the negative first term canceled just short of the first jump point. I would need to find how many times 40 went into the negative number. 104/40 = 2.6. If I rounded this down, it would be the number I was looking for. Remember that 104 = 20  4(31). So in general, the number to be divided by 40 would be 20  4I. To round the number down, I could use a number of functions, but I decided to use the greatest integer function because I like its definition, and it is available on many languages since it is a mathematical function. So the number of times I would need 40 to go into 20  4I would be int(20  4I/40). Now, I don't remember what I did next, but I needed to multiply that last expression by 40 in order to get it to add properly to the number. This makes sense since the division would get the integer number of times that 40 needed to go into 20  4I. Multiplying by 40 then would get a number which when added to 20  4I would leave the remainderthe negative number which I was looking for. This number is obviously less than 40 in magnitude, so adding one more 40 would produce the jump point, and better still, this negative number is the same one as in my original formulas for I = 31: 24. Let P(x) > 0 be the dividend, R(x) > 0 be the remainder, Q(x) > 0 be the quotient, and D(x) > 0 the divisor. The answer then is of the form P(x)/D(x) = Q(x)  R(x)/D(x). Since D(x) = 40, this makes it: P(x)/40 = Q(x) + R(x)/40 > P(x) = 40*Q(x)  R(x). Solving for R(x) gives: R(x) = P(x) + 40*Q(x). And so as you can see, multiplying by 40 gives me the number I am looking for. The formulation of the rest of the formulas is similar. I left it with n = 0 despite the redundant 40 that must be added in certain cases because otherwise, it would miss some jump points for certain values of I. Indeed, with n = 1, it misses the number 0 as a valid jump point and skips to 40. A simple decision structure takes care of this negative number starting point in a computer program easily. And that is probably the most comprehensive and complete article you have ever read on jump points. =D Edited by Salavoir55, Dec 28 2009, 08:25 PM.

Credit to Rezon for the banner.  
Kingdrom  Jul 21 2009, 01:42 PM Post #3 
Official Team Rater

A Dissertation Regarding the Ev Structure for Leech Seed Users This is mostly a placeholder until I get time to type this up later. However, I already performed all the calculations. When it comes to Grass Types using Leech Seed, there is a great amount of controversy over whether the Hp investment is valid. Some argue that it may waste Ev's, since a larger percentage of health is reabsorbed through Leech Seed, and the extra Ev's could be placed into defenses to sustain hits better. To examine this, we look at perhaps the most versatile Leech Seed user in OU Celebi. With 100 base stats, it can assume the form of a fast, offensive Leech Seeder or a slower but very bulky Leech Seed user. Naturally, this also has implications for ShayminL, whose stats are the same but plays in UU instead. First, it's curious to note that Smogon suggests Leech Seed on the standard set as a filler (a good filler) and also has a fast SubSeed set. When it concerns taking hits, Celebi could use two main forms 252 Hp / 128 Def / 128 SDef, or 4 HP / 252 Def / 252 SDef, each with a Docile nature (for simplicity's sake). These spreads are bad, but extreme examples help to determine how different the two spreads would perform. The first Celebi ends up with stats of 404 Hp / 268 Def / 268 SDef, while the second has stats of 342 HP / 299 Def / 299 SDef. To be continued 
Salavoir55  Jul 21 2009, 08:24 PM Post #4 
Official Team Rater

Proof of Effective base power equations I proved them in a different order from the way I mentioned them earlier because it was easier this way. Note that I assume the multiplication of the damage formula is commutative even though that isn't truly the case. I can do this because "effective base power" is an approximation and assuming the commutative property of multiplication is a fine approximation for the damage formula, though obviously not precise enough for cases needing an exact number. 1) Modifiers being used for Base Power Although Base Power isn't damage, we can treat it like it is when doing effective base power calculations because the other modifiers can make the Base Power effectively change if we change it in such a way that the other modifiers do not matter in the formula anymore. So, if a move has 60 base power with STAB and is 2 times effective in one type and 1 times effective in another type we can either write it the normal way as 60 * 1.5 * 2 * 1, or by the associative and identity properties of multiplication, we can write it as 60 * (1.5 * 1) * (2*1) * (1 *1) = (60 * 1.5 * 2 *1) * 1 * 1 * 1 = 180 * 1 * 1 * 1. And so as you can see, the effective Base Power is 180 (180 * STAB * Type1* Type2 with STAB = Type1 = Type2 = 1). The damage formula as written at Smogon is (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3. It looks complicated but let L be the information enclosed in the first four parentheses, A = [Sp]Atk, and D = [Sp]Def. You get ((L * BasePower * A ÷ 50) ÷ D) = (L * BasePower * A * (1/50))/D = BasePower * (L * A * (1/50))/D = BasePower * K [let K = (L * A * (1/50))/D] for the first part of the formula. BasePower * K is then multiplied by Mod1, which is then added to two. Neglecting the addition of the 2 because this is not meant to be an exact measurement of damage and the 2 is fairly trivial gives: (Basepower * K) * Mod1 = (BasePower * Mod1) * K. Moving on with the formula gives: ((BasePower * Mod1) * K) * CH * Mod2 * R ÷ 100 = BasePower * Mod1 * K * CH * Mod2 * R * .01 = (BasePower * Mod1 * CH * Mod2 * (R * 0.01)) * K = BasePower * Mod1 * CH * Mod2 * N) * K [let N = R * 0.01]. Finishing the formula gives: ((BasePower * Mod1 * CH * Mod2 * N) * K) * STAB * Type1 * Type2 * Mod3) = BasePower * Mod1 * CH * Mod2 * N * K * STAB * Type1 * Type2 * Mod3 = (BasePower * STAB * Mod1 * Mod2 * Mod3 * Type1 * Type2 * N) * K. Notice, that the attack stat with a boosting nature is the same as the neutral attack stat times 1.1. Since this is in the top part of the fraction "K", you can factor the 1.1 out of the K and put it with the other modifiers to the base stat. I've already shown how these modifiers can be reset to 1 which gives an effective Base Power. Because the attack of a Pokemon and the defense of another is constant for a specific calculation, the effective Base Power is a fine estimation of relative damage to another Pokemon. That is why Base Power can be used in the ways I mentioned earlier. 2) Taking accuracy into account: Ebp = BasePower * Accuracy Using our Base Power as an estimate of damage and our head, you can see that there are two possibilities in this simple case, each with a probability of occurring: either the move will hit or the move will miss. By mathematical expectation, the total payoff (which in this case is the Ebp) is (probability1*payoff1) + (proability2*payoff2) + ... + (probabilityn*payoffn). Let A = the accuracy of the move as a decimal. That is the same as the probability of the move hitting. The probability of the move missing then is 1  A. So, mathematical expectation = Ebp = (A * damage) + ((1  A) * damage). Using our Base Power approximation of damage shows that the damage done if the move hits and all the other modifiers are 1 is the Base Power of the move. If the move misses, then the damage it will do is 0. So, Ebp = (A*BasePower) + ((1  A) * 0) = BasePower * A + 0 = BasePower * Accuracy, Q.E.D. 3) Taking flinch into account: Ebp = BasePower * (1 + F) Once again, there are only two possibilities each with a probability of occurring: either move causes a flinch or it doesn't. Mathematical expectation helps here once more. If a move flinches an opponent, then you will get to attack a second time. This means the BasePower effectively doubles whenever you cause your opponent to flinch. Let F = the chance of a move causing a flinch as a decimal. This means 1  F is the chance of not flinching. So by mathematical expectation, Ebp = (F * 2 * BasePower) + ((1F) * BasePower) = (2 * F * BasePower) + (BasePower  (F * BasePower)) = (2 * F * BasePower)  (F * BasePower) + BasePower = F * BasePower + BasePower = BasePower + F * BasePower = BasePower * (1 + F), Q.E.D. 4) Putting the two equations together through multiplication: Ebp = BasePower * A * (1 + F) There are few ways of looking at this. One way is the intuitive way. When you multiply the Base Power of a move to get one Effective Base Power, that becomes the new Base Power of the move to be plugged into the next equation. Thus, it gets multiplied by the other factor in the equation for Effective Base Power. Alternatively, this can be looked at through mathematical expectation again. The chance of a move missing is 1  A where A is defined as before. If it misses, it does 0 damage. The chance of a move hitting is A. If it hits, there is an F (F is defined as before) chance of a flinch, and so the payoff of the move is double the damage. There is a 1  F chance that the move will do its normal damage. These probabilities are put together through the multiplication principle of probability. It may be helpful to visualize the probabilities involved here, which are slightly more complicated than before (ignore the asterisks): Move used 1  A chance0 damage [1  A chance total] ********\ *********A chance1  F chanceBasePower damage [A(1F) chance total] ************************\ *************************F chance2*BasePower damage [AF chance total] Now that the respective probabilities and payoffs have been found, mathematical expectation can be used. Ebp = (1  A) * 0 + A(1  F)BasePower + 2AFBasePower = 0 + ABasePower  AFBasePower + 2AFBasePower = ABasePower + AFBasePower = BasePower * A * (1 + F), Q.E.D. 5) Multiplying with the other modifiers: M * BasePower = c * Ebp You can mixmultiply these with the other modifiers because the other modifiers have a 100% chance of affecting the Base Power and so is a different kind of Effective Base Power than the one calculated here. Accuracy and Flinch affect the Base Power over time, while the other modifiers always affect it. As such, those modifiers can be taken into account earlier and plugged into "BasePower" of the above formula. By the associative and commutative properties of multiplication, they can be "mixmultiplied" with any of the termsincluding the accuracy and flinch terms. If one is still not convinced, remember that these modifiers have a chance of 1 of occurring. I've already proved that they can be multiplied in any order with the base power, so let's group all the modifiers that are multiplied to the base power in the number c (c = STAB * Mod1 * Mod2 * Mod3 * Type1 * Type2 * N, where N is defined in the same way as in part 1)). The goal is to show that these multipliers times the Base Power * (A) * (1 + F) = c * Ebp where Ebp = BasePower * A * (1 + F). Obviously, if the move hits then these modifiers are the payoff since they apply all the time. So, moving to the last step of the procedure of 4): A(1  F)(1)cBasePower + 2AF(1)cBasePower. As can be seen, this is equal to A(1  F)(BasePower * c) + 2AF(BasePower * c). In either case, the c can be factored out along with A and F by the procedure of 4). This leaves the equation as BasePower * A * (1 + F) * c = Ebp * c. By the commutative property of multiplication, it does not matter in what order they are multiplied together. Let's define all of these multipliers as M (M = c * A * (1+ F)). Then, M * BasePower = c * Ebp, Q.E.D. Edited by Salavoir55, Dec 30 2009, 05:07 PM.

Credit to Rezon for the banner.  
Brock  Jul 24 2009, 08:44 PM Post #5 
Founder

Woah thats great Salavoir. I only thought Jump Points were at 216 / 176 / 136 / 96 / 56 / 16 
Kingdrom  Jul 31 2009, 05:17 PM Post #6 
Official Team Rater

Sorry JRC, I'm working on it, along with another secret project that I should release later today. I know Salavoir has done a study on this before but hasn't been able to find it. 
shiny bagon  Jul 31 2009, 11:46 PM Post #7 
Official Team Rater

Wow Pokemon a little kids game,I think not I would like to see a little kid do that math. My head hurts lol. 
Gymleader of the Ice type on BLD's Official Shoddy League. Can you take the cold?  
Salavoir55  Aug 16 2009, 01:36 AM Post #8 
Official Team Rater

hehe, the things Nintendo and Gamefreak don't tell you about their games... And lol at the google ad right now which says: "Center Space Software. Numerical Libraries for the .Net Platform. Linear algbera, Statistics, Numerical methods, Random numbers. Free 30Day Trial Versions!" Anyways, I finished all I set out to do. I know Key Keeper had something that he tried doing to contribute in this thread earlier. Are you still going to do it, Key Keeper? I won't steal if you still want to do it. 
Credit to Rezon for the banner.  
Key Keeper  Aug 16 2009, 04:32 AM Post #9 
Official Team Rater

Thanks Salavoir, I've got it at last The presentation mightn't be the best though, so feel free to tidy it up as you wish. I also realise that there are brackets which may be unnecessary to a mathematician, although for the ease of the general formula user, they have been included. Anyway, this formula is derived from the general damage formula, specifically the version found in Danbaru's guide on SPPf, and it's purpose is to allow the value of the attack stat needed to do a set amount of damage, which I felt would be more useful than the trial and error approach I had been using. It should be usefull for finding the exact stat that must be reached to OHKO/2HKO/xHKO a certain pokemon. Let: a = Attack stat which must be reached, including boosts directly to Att, such as Choice Band b = The base power of the attack chosen d = The defense stat of the opponent (including the sandstorm boost for Rock types) s = The STAB multiplier e = Effectiveness of the attack l = Any other boosts to damage, such as Life Orb or Swords Dance, etc. h = The amount of damage wished to be dealt to the opponent, be it their Hp, half of it, 75% of it, etc. Note this is actual damage, not the percentage a = {[(dh)/(0.85sel)]  2d}/(0.84b) Derived as follows: (((0.84ab/d) + 2) x sel) x 0.85 = h ((0.84ab/d) + 2) x sel = h/0.85 (0.84ab/d) + 2 = h/0.85sel 0.84ab/d = (h/0.85sel)  2 0.84ab = (dh/0.85sel)  2d a = ((dh/0.85sel)  2d)/0.84b Note that 0.85 is a simplification of the random number generated at the end of the damage formula, which ranges from 0.85 to 1. I chose to keep it as 0.85 as this is necessary to ensure the KO, as it will be the least amount of damage dealt. As a final note, the end result rounds up, rather than down as per usual. Thanks for pointing this out, Salavoir. Edited by Key Keeper, Aug 21 2009, 03:22 AM.

Salavoir55  Aug 21 2009, 02:47 AM Post #10 
Official Team Rater

I only have three things to say about this. The first is that you should mention that you need to round your end result up (math ceiling/least integer function) instead of the usual down (math floor/greatest integer function). Another is you should mention that this formula gives you the minimum damage you must do to nHKO a Pokemon. It would be a good idea to mention the random number factor, and why you simplified it, so that others could easily modify the formula for finding the maximum damage done (might be useful but only on a rare occasion such as finding out your opponent's EV spread in the middle of a battle from the damage he/she did to you). The third is that this formula doesn't work with percentages the way you currently have it set up, which you implied it did. It works with actual stat values only. I also think the symbols could have been used differently to make it more obvious what they stood for, but that's just being picky. Good job though, really. 
Credit to Rezon for the banner.  
Key Keeper  Aug 21 2009, 03:11 AM Post #11 
Official Team Rater

Oh, I wasn't actually aware it rounded up, I thought it rounded down :/ Lol. Hmm, point #2 Is true, I'll edit now explaining, and mentioning the ceiling>floor. Hmm, I'd never meant for it to work for percentages, although all in all I suppose that be more useful :/ I'll simply mention that it's only for actual damage for now, as I have a lot of maths to do and I need some sleep Thanks for the comments. 
Salavoir55  Nov 8 2009, 01:39 AM Post #12 
Official Team Rater

I made some edits to my jump point article to make it more rigorous. I think it's at its "final version" that I have saved on my computer though I'm not sure. Just in case anyone cared, haha. Though more importantly, if Kingdrom doesn't want to do his leech seed dissertation (as it appears), does anyone else want to? I can't do it right now since I'm too busy, especially since I would need to do the calcs all over again.... 
Credit to Rezon for the banner.  
Kingdrom  Nov 8 2009, 02:25 AM Post #13 
Official Team Rater

I'm on it. This is a rough draft with poorly explained connections. I have long since forgotten a formula applicable to all pokemon, since it would be needlessly complex and involves calculus if I remember right. And I'm going to copy + paste my previous work here. When it comes to Grass Types using Leech Seed, there is a great amount of controversy over whether the Hp investment is valid. Some argue that it may waste Ev's, since a larger percentage of health is reabsorbed through Leech Seed, and the extra Ev's could be placed into defenses to sustain hits better. To examine this, we look at perhaps the most versatile Leech Seed user in OU Celebi. With 100 base stats, it can assume the form of a fast, offensive Leech Seeder or a slower but very bulky Leech Seed user. Naturally, this also has implications for ShayminL, whose stats are the same but plays in UU instead. First, it's curious to note that Smogon suggests Leech Seed on the standard set as a filler (a good filler) and also has a fast SubSeed set. The situation applied is Celebi vs. CB Scizor, where Celebi uses Leech Seed. Such a possibility has several plausible moves, especially for a stall team. UTurn will obviously OHKO Celebi under most circumstances, but it is relevant to consider the damage that Pursuit would do. Scizor would most likely be inclined to use UTurn, but it fears Hp Fire from the faster Celebi. However, stallbased Celebi seldom carries Hp Fire and would be more likely to flee, leaving Pursuit as a viable move choice for CB Scizor. In a stall team, the prevalence of Resttalk Rotom and Gyarados, both of which make great repeated switchins, makes UTurn less relevant, since Rotom and Gyarados are exceedingly difficult to kill in one (non supereffective) hit. Stall Celebi utilizes its longevity well, and Scizor is merely a deterrent with UTurn. Using Pursuit not only hits a fleeing Celebi but weakens it to the point that something like LO Suicune or Agility Metagross could sweep. When it concerns taking hits, Celebi could use two main forms 252 Hp / 128 Def / 128 SDef, or 4 HP / 252 Def / 252 SDef, each with a Docile nature (for simplicity's sake). These spreads are bad, but extreme examples help to determine how different the two spreads would perform. The first Celebi (1) ends up with stats of 404 Hp / 268 Def / 268 SDef, while the second (2) has stats of 342 HP / 299 Def / 299 SDef. Do note that the first spread will take hits better from both sides. The opportunity cost for investing 4 Ev's in each defense stat is 8 Hp Ev's that factors in when calculating damage from physical and special attacks. Thus, for every Pokemon where one of the defense stats is greater than half the HP stat, there is merit in investing in Hp instead of splitting it between defenses if the goal is ultimately to maintain the greatest overall resilience from both ends of the spectrum. The difference in hittaking ability is proportional regardless of the opponent's move base power or attack strength. This means that we can substitute 20000 into the damage formula where Key Keeper puts (0.84 * move base power * attack stat). For reference, this is about equal to a nonSTAB neutral attack of base power 75 with an attack stat of 317. Next, we determine the percentage of discrepancy in hittaking ability between these two spreads. Normally, the MathFloor function would be applied, but it is ignored now to yield more accurate discrepancy percentages. All other multipliers are set equal to 1 and omitted from the below calculations. (1) % damage = (((20000) / 268 ) + 2 ) / 404) = 18.97 % (2) % damage = (((20000) / 299 ) + 2 ) / 342) = 20.14 % To find this percent difference in hit taking ability, we now divide (1) by (2) and subtract from 100: = 100  (18.97 / 20.14) = 5.809 % < Celebi (1) takes this much less damage from attacks than Celebi (2) Now, there is an advantage with leech seed. When attached to Scizor, it yields 43 HP. However, what really matters is the percentage of HP this is based on. For Celebi (1), this is 43 / 404 = 10.64 %, while for Celebi (2), it is 43 / 342 = 12.57 %. This results in the first spread retaining 1.93% less HP every turn. These are set increases at the end of the turn and disregard leftovers (which is irrelevant because it is a percentage based increase anyways). An equation can be made to solve for the difference in percentage of overall damage incurred to Celebi, which will be called D. D = 5.809x 1.93 where x is equal to the percent damage done to Celebi from an attack, which is the damage formula. Setting D equal to zero and solving for X will yield the crossover point, where the extra hp percentage granted by Leech Seed is completely compensated by the diminished ability to take hits. 0 = 5.809x 1.93 5.809x = 1.93 x = 1.93 / 5.809 = 33.2 % This means that if an attack does 33.2 % to the first Celebi, then the overall damage incurred will be the same after Leech Seed. Remember that this number strictly regards how much damage is incurred to Celebi (1) since the first fractional percentage we obtained (5.809%) is a ratio of Celebi (1)'s hit taking ability to that of Celebi (2). If needed, the first fraction can be flipped and plugged into the D = equation in order to obtain a attack damage percentage as seen in the above calculation. We can plug x into the damage formula to figure out a TAS value (equal to 0.84ab * any of the end multipliers like STAB or effectiveness (roughly; the +2 in the damage formula creates a variable margin of error that depends on the strength of the attack). Omitting this calculation, it turns out that it takes an attack strength of 35432 to do 33.2 % to Celebi (1) and incur the same damage to both Celebi by the end of the turn. This corresponds to an attack stat of 444 and a base move power of 95, with no damage multipliers like STAB, effectiveness or Expert Belt included. Finally, we compare this number, 35432, to the TAS that Scizor poses with Pursuit. If it is greater than 35432, then Celebi (1) takes the attack better; if it is lower, Celebi (2) takes hits better. Assuming Choice Band, 252 Atk Scizor has 591 attack, and due to the ability Technician, Pursuit's base power is 60. After this, we take into consideration damage multipliers. The only one applicable is a supereffective boost of 2x. Thus, Scizor's total attack strength: TAS = 591 * 60 *2 TAS = 70920 This is much greater than the crossover point, so Celebi (1) takes hits better. By doing a check, we see that this TAS value system is pretty exact for this set of parameters: Scizor's TAS is twice the crossover point of 33.2 % damage done to Celebi (1) before Leech Seed recovery, and it does about 66%, which is spoton considering that a considerable bit of rounding was done in the shown calculations. So in this situation, Celebi (1) has a more viable spread when facing Scizor, and based on this situation, the dogma that for overall reliability, investing in Hp is still better than splitting between defenses despite Leech Seed still holds true. Edited by Kingdrom, Nov 8 2009, 03:46 AM.

Salavoir55  Nov 8 2009, 02:38 AM Post #14 
Official Team Rater

Now that's what I call a timely post 0.0! We'll be waiting, Kingdrom and thanks! And btw, if it's good enough, you can submit it as a supplement to one of your upcoming college appsif you want, that is. Edit: Excellent, Kingdrom. I'll critique it soon, I hope. Edited by Salavoir55, Nov 9 2009, 03:45 AM.

Credit to Rezon for the banner.  
Salavoir55  Nov 14 2009, 09:57 PM Post #15 
Official Team Rater

Okay, Kingdrom. As far as I can tell so far, your math is fine (though I've run out of time for now and am still checking through it). So I just have a few suggestions to make it more easily read by an audience. Firstly, there's an open parenthesis without a closing one: "(equal to 0.84ab * any of the end multipliers like STAB or effectiveness (roughly; the +2 in the damage formula creates a variable margin of error that depends on the strength of the attack)." Secondly, I think you should explain what TAS stands for the first time you use that acronym. I sure didn't know what it was until you said "top attack strength" later on, so I don't know how many others would know that. Thirdly, I think you should clear the following up a little more, since it does require quite a bit of thought to figure out why you're doing what you're doing along with what: "An equation can be made to solve for the difference in percentage of overall damage incurred to Celebi, which will be called D. D = 5.809x 1.93 where x is equal to the percent damage done to Celebi from an attack, which is the damage formula. Setting D equal to zero and solving for X will yield the crossover point, where the extra hp percentage granted by Leech Seed is completely compensated by the diminished ability to take hits. " e.g., what exactly IS D? It's the "difference in percentage of overall damage incurred to Celebi," but it's not apparent what it is on a first glance. I know that mathematical articles need not be spoonfed, but one of the reasons it took me so long to post was because I needed time to understand what you were doing. And I'm usually pretty good at algebraic modeling! So yeah, it might be a good idea to add some explanation around that i.e. slow down the explanation a little there. My final suggestion was to clear up why doing more damage meant Celebi (1) was better. It might be a good idea to explain it here where the equation first shows up. My real final suggestion would be to quickly explain in parenthesis or something why it doesn't matter which way you flipped the fraction: "If needed, the first fraction can be flipped and plugged into the D = equation in order to obtain a attack damage percentage as seen in the above calculation." Even something like, 'if you followed the following steps with the flipped percentage, you'd find the end conclusion to be the same' would be helpful. Edit: Alright, finally done looking through it. I've run so many calcs on this now, lol. Here's the rest of what I found. Okay, now I think I know why that equation was bothering me so much. The "x" should be the percent damage done to Celebi (2), not Celebi (1). That will need to be fixed.
And as for "flipping the fraction" and "subtracting the fraction from 100," the former works but has a different equation with a number greater than the crossover point causing D to be negative (D = 1.95  0.062x where x = percent damage done to Celebi (1)), and the latter is wrong. You whould subtract from 1, not 100, since you never converted the fraction to a percent but left it as 100. You probably originally had something else there then edited it, since it turned out right anyways.
This isn't completely true since said x percent must be done to Celebi(2) (as I already mentioned) and said x percent must remain a decimal. It may be easier changing your equation to D = 0.05809x  1.95.
Might want to do add 344/8 in parenthses to help those who have forgotten Scizor's HP and don't have a calc out. Also, I forget which way Leech Seed rounds, but 343/8 = 42.875. If it rounds up, your fine, but you should also note that Leech Seed rounds up when you add the "(343/8)."
It isn't completely clear why you can do this. So you may want to connect this with the TAS of ~35,000 calculated earlier. This is a *bit* more picky though.
Finally, you might want to reemphasize that what you wrote is for a specific special case but should work for others (note that Celebi takes a percent difference of ~ 5 +/ 1% which varies depending on what TAS you start with e.g. 80000 instead of 20000). Or maybe make this sentence stand out a little more and clear it up a bit. Meh, I'm getting really picky now.
lol, I forgot that you had said this xD. So this kind of critique would be expected except perhaps for the equation stuff you said being somewhat wrong. And actually, from what you wrote later (the TAS being ~35,000 is true for 33.2% damage to Celebi (2) NOT Celebi (1)), I think it was a typo. Great job though considering this was a rough draft! Edited by Salavoir55, Nov 16 2009, 01:05 AM.

Credit to Rezon for the banner.  
Kingdrom  Nov 15 2009, 10:32 PM Post #16 
Official Team Rater

Thanks Salavoir. I had written about half of the article before I was scrolling on the laptop pad, which bizarrely sent me back to the last page, erasing what I had written. I'd imagine that this was the cause of most ambiguities in the article. I read your suggestions and agree with them, but implementing them will have to come later, as I've had a busy weekend and still have several hours of homework left to do. 
JRCxyz  Nov 16 2009, 04:46 AM Post #17 
Official Team Rater

What's the secret project? You can PM it to me and I promise I won't tell ;). I hope I don't ignored, again, when I say this but: do you still play Call Of Duty 4? If so, would you like to play with me? I'll be getting Modern Warfare 2 soon, too. So, if you get it, I want to play that too.
Dude, Pokemon is serious business. 
Kingdrom  Nov 16 2009, 05:31 AM Post #18 
Official Team Rater

Haha, way to take something I said 5 months ago. The thing I was working on was the RMT guide, which was supposed to be my final contribution before leaving. My PSN is ConstructionZone I never got around to playing much CoD online did it with friends instead. Until I get Modern Warfare 2 I'll probably still be playing Midnight Club: LA or Gran Turismo 5 Prologue. 
JRCxyz  Nov 17 2009, 01:17 AM Post #19 
Official Team Rater

Lol, ConstructionZone. Why that name? But anyways, thanks for not turning me down xD. Thanks, Sala/any other staff member, for deleting my previous posts. 
Salavoir55  Dec 28 2009, 04:54 PM Post #20 
Official Team Rater

Explanation of why Effort Value equations are the way they are (why capped and why 4 EVs = 1 stat point) [Note that 1 byte can store an integer ranging from 0 to 255 inclusive]
Edited by Salavoir55, Dec 28 2009, 08:10 PM.

Credit to Rezon for the banner.  
1 user reading this topic (1 Guest and 0 Anonymous) 
Go to Next Page  
« Previous Topic · Metagame Discussion · Next Topic » 
 Pages:
 1
 2
Track Topic · Email Topic  5:26 AM Mar 31 
Find more zetaboards themes at InkDropStyles.com