Converting the Damage Formula in order to find Sp[Atk]/Bulkiness of opposing Pokemon

Status
Not open for further replies.
Ok, so I have been working on this for a while now. I have created formulas in order to find an opposing Pokemon's Sp[Atk] from using the amount of damage it did to my Pokemon. Also, I've created formulas to find the opposing Pokemons "bulkiness" in either Sp.atk or Atk.

This thread is long with many formulas and numbers. I don't expec you to understand everything. You can post here if you have any questions. There are many reasons as to why I did all of this. And I think you would understand how significant and useful it is in knowing these information. I will be creating a calculator out of these formulas soon. But, before I do that I am just going to explain the procedures.

Here it is:

First, I will explain how to converting Damage Formula to find Sp[Atk] of opposing Pokemon

I will show you how to find the opponent's Sp.Atk or Atk by converting the damage formula so it can formulate Sp[Atk] instead of HP Damage.

Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

Full description of Formula can be found here: http://www.smogon.com/dp/articles/damage_formula

Now lets test the damage formula to show you that it works. Lets say my Rotom-h (level 100) vs another Rotom-h (level 100). My Rotom-h's Sp.Def is 282 and 304 HP. The opposing Rotom-h's Sp.Atk is 270. The opposing Rotom-h uses Shadow Ball on me. Lets calculate how much damage this would do:

Damage (Minimum Damage R = 85) = (((((((100 × 2 ÷ 5) + 2) × 80 × 270 ÷ 50) ÷ 282) × 1) + 2) × 1 × 1 × 85 ÷ 100) × 1.5 × 1 × 2 × 1 = 169.17 = 55.6% (169.17/304)

Damage (Maximum Damage R = 100) = (((((((100 × 2 ÷ 5) + 2) × 80 × 270 ÷ 50) ÷ 282) × 1) + 2) × 1 × 1 × 100 ÷ 100) × 1.5 × 1 × 2 × 1 = 169.17 = 65.4% (199/304)

Minimum-Maximum Damage = (55.6% ~ 65.4%)

Now I will convert the damage formula to compute for Sp[Atk] and not Damage. Here it is:

(Sp[Def] x Mod1)(Damage/(CH x Mod2 x R/100 x Type x STAB) - 2)/(0.84 x Base Power x Mod3) = Sp[Atk]

R = 85 = Minimum
R= 100 = Maximum
Note: 0.84 was computed for level 100 Pokemons only. ((100x2/5)+2)/50 = 0.84
So now lets input the same stats of the two Rotom-h's. Lets say the damage was 169 (which is R = 85 as it is the minimal damage)

((282 x 1)(169/(1 x 1 x 85/100 x 1.5 x 2) - 2)/(0.84 x 80) = 269.72

So as you can see, with this formula it is possible to find the opposing Pokemon's Atk or Sp.Atk by them damaging your Pokemon.

But how can you be accurate when the random factor (R) can be anything from 85 to 100? You can't. So I will try to be as accurate as I can be.... How?

By finding the average damage of R = 85 and R = 100. Or to simplify it, R = (100+85/2) = 92.5

So lets say that Rotom-h's Shadow Ball did 184HP damage. Lets use R = 92.5.
((282 x 1)(184/(1 x 1 x 92.5/100 x 1.5 x 2) - 2)/(0.84 x 80) = 269.86 (Since I used 184, which is the average of 169 and 199, I got 269.86 as the answer)

Now this formula doesn't work when the damage is at its lowest or highest. For example, if damage was 169 and R = 92.5 then the Sp[Atk] would be:[/FONT]
((282 x 1)(169/(1 x 1 x 92.5/100 x 1.5 x 2) - 2)/(0.84 x 80) = 247.17 (Which is very far from 270.

169 is minimum and getting 169 is extremely rare, thus it is normal to be "that" accurate. Lets try another to be sure that this formula works:

My Jirachi's HP is 361 and Def is 236. The opposing Pokemon is also a Jirachi. It did 150HP Damage with Fire Punch. No STAB and 200% damage due to super effective. Now lets find it's Atk stat:

((236 x 1)(150/(1 x 1 x 92.5/100 x 1 x 2) - 2)/(0.84 x 75) = 296.24 (This is 0.92% Error acc, since 150HP damage might have been close to R being equal to 92~93)
From this we can conclude that Jirachi must be Jolly and Max attack on EVs (Jolly Jirachi's Max Atk is 299).

If you are testing this, remember Leftovers restores 1/16 HP. Find 1/16 of your hp and add it to the HP daamge. Post here of what you think.[/FONT]

IF YOU CAN'T WAIT FOR THE CALCULATOR YOU CAN USE THIS METHOD:

USE THIS FORMULA:
(Sp[Def]*Mod1)*(HP Damage/(CH*Mod2*R*Type*STAB)-2)/(0.84*Base Power*Mod3)

R = 0.85 = Minimum
R = 1.00 = Maximum

HERE: http://www.math.sc.edu/cgi-bin/sumcgi/calculator.pl

Next, i will explain to you how to convert Damage Formula to find the opposing Pokemon's Bulkiness (of Sp[Def])

(Sp[Atk]*Mod1)/(((%Damage*MaxHP)/(R*Type*STAB*Mod2)-2)/(0.84*BasePower*Mod3)) = Bulkiness (of Sp[Def])

R = 0.85 = Minimum
R = 1.00 = Maximum
%Damage is the Percent Damage you have done to the opposing Pokemon.
MaxHP is the opposing Pokemon's max HP. You can just guess on this number because as long as you have what Bulkiness equals, you can input both to the damage formula.
Bulkiness is what I call the Pokemon's ability to resist a move, either Sp.Atk move or Atk move. The Bulkiness would equal to the opposing Pokemon's Sp[Def] if you know its HP 100%. Basically, MaxHP and Fake Sp[Def] = Actual HP and Actual Sp[Def], but you don't add HP and Sp[Def].

So how is this formula useful? If you find the opposing Pokemon's Bulkiness, then you can use that to find out how much damage another of your move or another of your Pokemon's move would do (it must correlate to the Def or Sp.def move you've used before).

An example of how this is useful can be shown through this:

Rotom-h used Shadow Ball.
Swampert lost 24% of its health.
Swampert's leftovers restored its health a little!

Ok, so my Rotom-h did 24% damage. Swampert's max HP is 404. My Rotom-h's Sp.Atk is 270. Now lets use this to find Swampert's Bulkiness in Sp.def:

(270*1)/(((0.24*404)/(0.925*1*1.5*1)-2)/(0.84*80*1)) = 267.290969899666

So I got 267.3 as Swampert's Bulkiness in Sp.def, since I used a Sp.def move. So now I can be very sure that 267 is very close to Swampert's actual Sp.def if Swampert's HP was max (404).

Now I can use this to see how much my Salamence's Draco Meteor would do to Swampert. Before using Draco Meteor, I will calculate to estimate how much I damage I would do.

Testing1 switched in Salamence (lvl 100 Salamence ♂).
Salamence's intimidate cut Swampert's attack!
Swampert used Stealth Rock.
Pointed stones float in the air around the foe's team!
Swampert's leftovers restored its health a little!
Swampert restored 6% of its health.

Since I've switched twice, Swampert's HP rose from Leftovers twice by 6.25%. So now it's HP is at 88%. Now I wll use the damage calculator to find how much damage I will do onto Swampert.

Damage Formula = (((((((Level × 2 ÷ 5) + 2) × BasePower × [Sp]Atk ÷ 50) ÷ [Sp]Def) × Mod1) + 2) × CH × Mod2 × R ÷ 100) × STAB × Type1 × Type2 × Mod3

My Salamence has 310 Sp.atk with Life Orb + STAB. The damage formula says:

(56.44% - 66.34%)

Now lets see if this is true...

Salamence used Draco Meteor.
Swampert lost 59% of its health.
Salamence's special attack was harshly lowered.
Salamence lost 10% of its health.
Swampert used Avalanche.
It's super effective!
Salamence lost 115% of its health.
Testing1's Salamence fainted.
Swampert's leftovers restored its health a little!
Swampert restored 6% of its health.

The formula was right!!!

Without estimating Swampert's Bulkiness, I would have never been able to find out how much damage my Draco Meteor would have done. And when I know how much it would have done before using it, I wouldn't have risked it and lose my Salamence.

Lets try again. This time I will take off all of Swampert's HP EVs (341 HP) and see if I get the same result.

Rotom-h used Shadow Ball.
Swampert lost 27% of its health.

This time my Rotom-h did 27% on Swampert. I will use 404 HP as Swampert's HP, because I don't know what Swampert's HP is. My formula says that Swampert's Bulkiness is equal to:

(270*1)/(((0.27*404)/(0.925*1*1.5*1)-2)/(0.84*80)) = 236.816706645971

So I now know that Swampert's Bulkiness in Sp.def is 237 with 404 HP. Lets find out how much my Salamence's Draco Meteor would do to it this time.

Put 404 as Swampert's HP and 237 as its Sp.def. Why? Because 404HP + 237 SpdDef = Swampert's Actual Sp.def + Actual HP.

The damage formula says that the damage will be: (63.12% - 74.50%)

Lets see if its right again:

Salamence used Draco Meteor.
Swampert lost 69% of its health.
Salamence's special attack was harshly lowered.
Salamence lost 10% of its health.

The formula was right!!!

It did 69%, it was right that it would do (63.12% - 74.50%).Even though I didn't know Swampert's exact HP and Sp.def I was able to use a random HP and how much damage I did to it to find its Sp.def proportional to its actual Sp.def and HP. After finding a the fake HP and Sp.def I can input it to the damage formula and get an estimated result as I would have got if i knew Swampert's HP and Sp.def.

----

IF YOU CAN'T WAIT TO USE THE CALCULATOR AND WANT TO TRY IT OUT. TRY THIS:

(Sp[Atk]*Mod1)/(((%Damage*MaxHP)/(R*Type*STAB*Mod2)-2)/(0.84*BasePower*Mod3))

R = 0.85 = Minimum
R = 1.00 = Maximum

HERE: http://www.math.sc.edu/cgi-bin/sumcgi/calculator.pl


=====================================================================================================================

Ok, so If you didn't understand anything post here and I will try to explain it you as best as I can (most likely the answer relies in this thread). PLEASE DO NOT POST IN THIS THREAD IF YOU THINK THAT MY METHOD IS USELESS AND A WASTE OF TIME, I DO NOT WANT NEGATIVE OPINIONS. I know there might be some grammar errors or something not understandable, since I didn't go through perfecting the whole thread.


If there is anyone who can assist me of creating a calculator out of these formulas PLEASE Private Message me.
 

Cathy

Banned deucer.
The results in this article are actually wrong, since the damage formula contains many instances of the floor() function, which prevent you from just naively solving for attack. I actually considered this problem a few months ago when Obi was making a reverse damage calculator. This is the result I observed:

http://colin.shoddybattle.com:81/floorresult.txt

The consequence of the floor()s being in the formula is that the range of possible values is larger than your article suggests.
 
The results in this article are actually wrong, since the damage formula contains many instances of the floor() function, which prevent you from just naively solving for attack. I actually considered this problem a few months ago when Obi was making a reverse damage calculator. This is the result I observed:

http://colin.shoddybattle.com:81/floorresult.txt

The consequence of the floor()s being in the formula is that the range of possible values is larger than your article suggests.
I understand the floor()s being a huge factor for solving for attack. But, I am not trying to find the opposing Pokemon's attack. I am trying to configure a way to find all possible values. The random factor contributes to this. (Rand × 100) ÷ 255, rounded down, where Rand is a random whole number between 217 and 255 inclusive with uniform probability. This produces a whole number between 85 and 100 inclusive, but not with uniform probability. Thus, it can persist from 85.098 to 100. Using 85.098 as minimum and 100 as maximum, I am able to configure a way to find the range of all possible values.

I will use the same example in my initial post:

(Sp[Def] x Mod1)(Damage/(CH x Mod2 x R/100 x Type x STAB) - 2)/(0.84 x Base Power x Mod3) = Sp[Atk]

Lets say my Rotom-h (level 100) vs another Rotom-h (level 100). My Rotom-h's Sp.Def is 282 and 304 HP. I do not know the opposing Rotom-h's Sp.atk. The opposing Rotom-h uses Shadow Ball on me and it did 184 HP damage. With this I can find a range of the opposing Rotom-h's possible Sp.atk's.

((282 x 1)(184/(1 x 1 x 85/100 x 1.5 x 2) - 2)/(0.84 x 80) = 294.4082
((282 x 1)(184/(1 x 1 x 100/100 x 1.5 x 2) - 2)/(0.84 x 80) = 248.9880


So from the minimum-maximum values, Rotom-h's Sp.atk must range from 249 to 294. And Rotom-h's minimum Sp.atk without EVs is 246. So this Rotom-h must have EVs on Sp.Atk or is Modest Nature without EVs. From knowing it's Sp.Atk range, I can also conclude that this Rotom must be defensive, a Standard or RestTalk set and most likely not a Boosting Sweeper or Choice Set. And the opposing Rotom-h was a Modest + RestTalk set.
 
From knowing it's Sp.Atk range, I can also conclude that this Rotom must be defensive, a Standard or RestTalk set and most likely not a Boosting Sweeper or Choice Set.
So basically, this formula is a substitute for raw experience?
 
So basically, this formula is a substitute for raw experience?
Raw experience does not consist of concrete value.

Also, this formula was primarily made to use damage calculators effectively. How can you use a damage calculator to calculate damage if you do not know the opposing Pokemon's Sp[Atk]?
 

Caelum

qibz official stalker
is a Site Content Manager Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
It doesn't even accomplish that, darkie, which is why I locked this originally.

How is a formula done through flawed mathematics that generates enormous error acceptable? The calculations you picked happen to give you a nice approximation to your situation (whether or not this was intentional on your part to mislead us on the accuracy of this, I don't know); but the majority of situations will not give you any sort of useful approximation due to the tremendous error in the calculations. For example, I looked at a situation of Salamence versus Hippowdon and I was able to discover that either Salamence has Special Attack EVs can could range anywhere from none and a negative nature to a neutral Special Attack nature and 180+ EVs. That doesn't help me to know anything about that Salamence in the slightest. I locked this, because how in the world is that useful? Apparently, I'm just retarded though. I'd love to see someone justify to me where that level of inaccuracies would be useful in any regard.

If you really want me to post a series of calculations demonstrating the inaccuracy of this, I'm not going too. You should've easily discovered this in whatever research you did working on this. I can only conclude that you were either lazy and didn't bother even testing this or you are intentionally misleading.
 
It doesn't even accomplish that, darkie, which is why I locked this originally.

How is a formula done through flawed mathematics that generates enormous error acceptable? The calculations you picked happen to give you a nice approximation to your situation (whether or not this was intentional on your part to mislead us on the accuracy of this, I don't know); but the majority of situations will not give you any sort of useful approximation due to the tremendous error in the calculations. For example, I looked at a situation of Salamence versus Hippowdon and I was able to discover that either Salamence has Special Attack EVs can could range anywhere from none and a negative nature to a neutral Special Attack nature and 180+ EVs. That doesn't help me to know anything about that Salamence in the slightest. I locked this, because how in the world is that useful? Apparently, I'm just retarded though. I'd love to see someone justify to me where that level of inaccuracies would be useful in any regard.

If you really want me to post a series of calculations demonstrating the inaccuracy of this, I'm not going too. You should've easily discovered this in whatever research you did working on this. I can only conclude that you were either lazy and didn't bother even testing this or you are intentionally misleading.
There is no such thing as 100% accuracy when there is a random factor. But estimation-wise there is accuracy. I would like to see calculations of your testing on this. Rather than carelessly locking it because of your opinions. I want you to use R equal both 85 and 100 when you're calculating the range of all possible values.
 

cim

happiness is such hard work
is a Contributor Alumnusis a Smogon Media Contributor Alumnus
Obi's doing something like this with his Reverse Damage Calculator.
 

Cathy

Banned deucer.
There is no such thing as 100% accuracy when there is a random factor. But estimation-wise there is accuracy. I would like to see calculations of your testing on this. Rather than carelessly locking it because of your opinions. I want you to use R equal both 85 and 100 when you're calculating the range of all possible values.
You are mistaken. It's not only the random factor that increases the "uncertainty"; it's the fact that you have to invert the floor()s. By the result I linked to above, inverting the floors introduces an uncertainty of plus or minus the level of nesting of floors. For the pokemon damage formula, that means that the result for a single value of R could be ±16 the value you get by just naively solving for attack or defence. When you also consider the random factor, as you have mentioned, this is so much uncertainty as to render the formula useless.

Inverting the damage formula is useful and possible. But it takes a lot more information than just a single data point in order to get a useful result, and it takes more subtle math than you use here.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top