Crunching the numbers: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 19: Line 19:
When I was a kid, I never brought what I learned in school into games. After an intense five hours of learning and one hour of homework (which, looking back, was a pretty sweet work schedule), the last thing I ever wanted to do was think about math. And thus, I typically spent most of my free time playing video games in an attempt to block the idea of learning out of my head.
When I was a kid, I never brought what I learned in school into games. After an intense five hours of learning and one hour of homework (which, looking back, was a pretty sweet work schedule), the last thing I ever wanted to do was think about math. And thus, I typically spent most of my free time playing video games in an attempt to block the idea of learning out of my head.


Now, this is where Pokémon comes in. In {{bp|Generation I}}, the power of a move wasn’t conveniently displayed in game, and I heard through the grapevine that when a Pokémon uses an attack of its same typing, it would be stronger. Naturally, I didn’t question it and always used this “hidden technique” throughout the game.
Now, this is where Pokémon comes in. In {{bp|Generation I}}, the power of a move wasn’t conveniently displayed in game, and I heard through the grapevine that when a Pokémon uses an attack of its same typing, it would be stronger. Naturally, I didn’t question it and always used this “hidden technique” throughout the game.


When {{bp|Generation II}} started displaying the power of a move, I always used the move with the highest power whenever weaknesses and resistances didn’t make a difference. Makes sense right? But out of my curiosity, I tried to see if the super secret hidden technique still worked. The answer: not always. I was very confused. My strategy guide didn’t explain the phenomena, and my friends had no explanation for this occurrence. I did what any child of the nineties would do. I asked Jeeves.  
When {{bp|Generation II}} started displaying the power of a move, I always used the move with the highest power whenever weaknesses and resistances didn’t make a difference. Makes sense right? But out of my curiosity, I tried to see if the super secret hidden technique still worked. The answer: not always. I was very confused. My strategy guide didn’t explain the phenomena, and my friends had no explanation for this occurrence. I did what any child of the nineties would do. I asked Jeeves.  
Line 28: Line 28:


==Multiplying probabilities==
==Multiplying probabilities==
Say we’re playing 2v2. On one side we have two fast Pokémon that know {{m|Blizzard}} and {{m|Rock Slide}}. On the other, we have two slow Pokémon that can survive one attack, but not two. As long as one of the slow Pokémon can survive, they can use a move to knock out the two fast ones. What are the chances that the two slow ones will survive? Assuming neutral conditions, Blizzard has a seventy percent (70% = .7) chance to hit and Rock Slide has a ninety percent (90% = .9) chance to hit.  In probability theory, we can multiply two numbers together to see the chances of them both happening successfully. (For those of you that like technicalities, this only works as long as the two events being multiplied are independent of each other. Since Blizzard doesn’t effect Rock Slide in any way, this formula is perfectly legal in this situation.) So the chances that both Rock Slide and Blizzard will hit one of the opponent’s Pokémon is [[File:Pokemath1.png]].
Say we’re playing 2v2. On one side we have two fast Pokémon that know {{m|Blizzard}} and {{m|Rock Slide}}. On the other, we have two slow Pokémon that can survive one attack, but not two. As long as one of the slow Pokémon can survive, they can use a move to knock out the two fast ones. What are the chances that the two slow ones will survive? Assuming neutral conditions, Blizzard has a seventy percent (70% = .7) chance to hit and Rock Slide has a ninety percent (90% = .9) chance to hit.  In probability theory, we can multiply two numbers together to see the chances of them both happening successfully. (For those of you that like technicalities, this only works as long as the two events being multiplied are independent of each other. Since Blizzard doesn’t affect Rock Slide in any way, this formula is perfectly legal in this situation.) So the chances that both Rock Slide and Blizzard will hit one of the opponent’s Pokémon is [[File:Pokemath1.png]].


So, there is a sixty-three percent chance that one of the slow Pokémon will be knocked out. Since this is only for one Pokémon, we need to multiply this number with itself to see what will happen to both Pokémon: [[File:Pokemath2.png]]. Therefore, there is about a forty percent chance that both the slow Pokémon will be knocked out. So what do these numbers tell us? Chances are, one of the slow ones will be knocked out, but one will survive to retaliate and redeem his or her fallen ally.
So, there is a sixty-three percent chance that one of the slow Pokémon will be knocked out. Since this is only for one Pokémon, we need to multiply this number with itself to see what will happen to both Pokémon: [[File:Pokemath2.png]]. Therefore, there is about a forty percent chance that both the slow Pokémon will be knocked out. So what do these numbers tell us? Chances are, one of the slow ones will be knocked out, but one will survive to retaliate and redeem his or her fallen ally.
Line 37: Line 37:


==Time calculations==
==Time calculations==
While there is a 1/8192 chance to find a {{bp|shiny Pokémon}}, this does not mean that for every eight thousand one hundred ninety two Pokémon a person is guaranteed to find one shiny.  The actual chances of finding at least one shiny in eight thousand one hundred ninety two Pokémon is [[File:Pokemath3.png]].
While there is a 1/8192 chance to find a {{bp|Shiny Pokémon}}, this does not mean that for every eight thousand one hundred ninety two Pokémon a person is guaranteed to find one Shiny.  The actual chances of finding at least one Shiny in eight thousand one hundred ninety two Pokémon is [[File:Pokemath3.png]].


To break down the above calculation, I first need to find the chances of not finding a shiny in one encounter (.99987 = 99.987%). After that, I calculated the chances of not finding a shiny in eight thousand one hundred ninety two encounters (.3678 = 36.78%). Since this is the chance of not finding a shiny, I needed to subtract it from one, giving the result that there is about a sixty three percent chance to find at least one shiny Pokémon in eight thousand one hundred ninety two encounters.
To break down the above calculation, I first need to find the chances of not finding a Shiny in one encounter (.99987 = 99.987%). After that, I calculated the chances of not finding a Shiny in eight thousand one hundred ninety two encounters (.3678 = 36.78%). Since this is the chance of not finding a Shiny, I needed to subtract it from one, giving the result that there is about a sixty three percent chance to find at least one Shiny Pokémon in eight thousand one hundred ninety two encounters.


One may wonder how many encounters are need to have a ninety nine percent chance to find a shiny. The basic calculation for that begins like so: [[File:Pokemath4.png]], where ''x'' is going to be the number of encounters we’ll need. We can subtract one from both sides and multiply both sides by negative one. After simplifying, the expression turns into [[File:Pokemath5.png]].
One may wonder how many encounters are need to have a ninety nine percent chance to find a Shiny. The basic calculation for that begins like so: [[File:Pokemath4.png]], where ''x'' is going to be the number of encounters we’ll need. We can subtract one from both sides and multiply both sides by negative one. After simplifying, the expression turns into [[File:Pokemath5.png]].


We need to use a function called a {{wp|logarithm}} in order to find ''x''. For those of you who don’t know what a logarithm is, Wikipedia probably gives a better explanation than I do. It is the inverse function to an {{wp|exponential function|exponent}}, which will allow us to get ''x'' by itself. For a simple online logarithm calculator, you can find one [http://rechneronline.de/logarithm/ here].
We need to use a function called a {{wp|logarithm}} in order to find ''x''. For those of you who don’t know what a logarithm is, Wikipedia probably gives a better explanation than I do. It is the inverse function to an {{wp|exponential function|exponent}}, which will allow us to get ''x'' by itself. For a simple online logarithm calculator, you can find one [http://rechneronline.de/logarithm/ here].
Line 47: Line 47:
:[[File:Pokemath7.png]]
:[[File:Pokemath7.png]]


This means I would have to run into thirty five thousand four hundred twenty two Pokémon in order to have a ninety nine percent chance to find at least one shiny. If I can find fifty Pokémon in an hour, that would take me seven hundred and eight hours.
This means I would have to run into thirty five thousand four hundred twenty two Pokémon in order to have a ninety nine percent chance to find at least one Shiny. If I can find fifty Pokémon in an hour, that would take me seven hundred and eight hours.


==Combinations==
==Combinations==
While very different from the technique used for time estimation, combinations are also based on multiplying probabilities to find the chances two or more events occur. Combinations are the number of different ways a number of objects can be arranged (order doesn’t matter). Seems trivial, but here’s an example: Say we’re playing around with Charmander, Charmeleon, and Charizard cards. We have one of each, and we keep on shuffling them together and drawing two. How many different ways can we draw two cards? The answer is three: Charmander and Charmeleon, Charmander and Charizard, and Charmeleon and Charizard. But say we add a Squirtle, a Wartortle, and Blastoise into the mix. It would take us way too much time to write down every combination of two cards, so instead, we’ll use the following formula: [[File:Pokemath8.png]], where ''n'' is the number of objects we have and ''r'' is the number of objects we’re choosing. In this case, we have six objects and we’re choosing two, so the formula would work out like this:
While very different from the technique used for time estimation, combinations are also based on multiplying probabilities to find the chances two or more events occur. Combinations are the number of different ways a number of objects can be arranged (order doesn’t matter). Seems trivial, but here’s an example: Say we’re playing around with {{bp|Charmander (TCG)|Charmander}}, {{bp|Charmeleon (TCG)|Charmeleon}}, and {{bp|Charizard (TCG)|Charizard}} cards. We have one of each, and we keep on shuffling them together and drawing two. How many different ways can we draw two cards? The answer is three: Charmander and Charmeleon, Charmander and Charizard, and Charmeleon and Charizard. But say we add a {{bp|Squirtle (TCG)|Squirtle}}, a {{bp|Wartortle (TCG)|Wartortle}}, and {{bp|Blastoise (TCG)|Blastoise}} into the mix. It would take us way too much time to write down every combination of two cards, so instead, we’ll use the following formula: [[File:Pokemath8.png]], where ''n'' is the number of objects we have and ''r'' is the number of objects we’re choosing. In this case, we have six objects and we’re choosing two, so the formula would work out like this:
:[[File:Pokemath9.png]]
:[[File:Pokemath9.png]]
:[[File:Pokemath10.png]]
:[[File:Pokemath10.png]]
Line 61: Line 61:
Setting up quickly is important in the {{bp|Pokémon Trading Card Game|Trading Card Game}} (TCG), so it’s good to have a high probability to have the cards you need for the beginning of the game at the beginning of the game (I apologize for the obvious statement). Let’s say I desperately want to end my first turn with {{bp|Spiritomb (TCG)|Spiritomb}} in the play area (either active or on the bench), so I put four of them in my deck. For the sake of simplicity, we’re going to ignore {{wp|mulligan (games)|mulligans}}. So, the chances of getting Spiritomb in my opening hand is one minus the probability of having no Spritomb in my hand. Fifty six of the cards in my deck are not Spiritomb (60 – 4 = 56). Next, we’re going to break down the problem. If I draw just one card in my deck, the probability of not drawing a Spiritomb is [[File:Pokemath14.png]].
Setting up quickly is important in the {{bp|Pokémon Trading Card Game|Trading Card Game}} (TCG), so it’s good to have a high probability to have the cards you need for the beginning of the game at the beginning of the game (I apologize for the obvious statement). Let’s say I desperately want to end my first turn with {{bp|Spiritomb (TCG)|Spiritomb}} in the play area (either active or on the bench), so I put four of them in my deck. For the sake of simplicity, we’re going to ignore {{wp|mulligan (games)|mulligans}}. So, the chances of getting Spiritomb in my opening hand is one minus the probability of having no Spritomb in my hand. Fifty six of the cards in my deck are not Spiritomb (60 – 4 = 56). Next, we’re going to break down the problem. If I draw just one card in my deck, the probability of not drawing a Spiritomb is [[File:Pokemath14.png]].


If we subtract that number from one, that means we have under a 7% chance to draw a Spiritomb if we draw only one card. Luckily, we get to draw seven for our opening hand. This is where we get to use our earlier trick of multiplying probabilities together. We draw our next card. Since there is now one less card that isn’t Spiritomb in the deck and the total number of cards has decreased in the deck by one, the probability of the second card drawn not being Spiritomb is [[File:Pokemath15.png]].
If we subtract that number from one, that means we have under a 7% chance to draw a Spiritomb if we draw only one card. Luckily, we get to draw seven for our opening hand. This is where we get to use our earlier trick of multiplying probabilities together. We draw our next card. Since there is now one less card that isn’t Spiritomb in the deck and the total number of cards has decreased in the deck by one, the probability of the second card drawn not being Spiritomb is [[File:Pokemath15.png]].


Now, we multiply these two number together to see what the probability that neither of the first two cards being drawn is Spiritomb. That is [[File:Pokemath16.png]]. Those with a good eye for patterns can see where this is going. Let’s set up a table of probabilities for the first seven cards we draw.
Now, we multiply these two numbers together to see what the probability that neither of the first two cards being drawn is Spiritomb. That is [[File:Pokemath16.png]]. Those with a good eye for patterns can see where this is going. Let’s set up a table of probabilities for the first seven cards we draw.


:[[File:Pokemath17.png]]
:[[File:Pokemath17.png]]
Line 77: Line 77:
Note: It looks like there is a little bit of a rounding error. This is because the decimals I used in the earlier calculation were truncated so that they only had four digits. Therefore, 60.05% is probably a more accurate number.
Note: It looks like there is a little bit of a rounding error. This is because the decimals I used in the earlier calculation were truncated so that they only had four digits. Therefore, 60.05% is probably a more accurate number.


But this is only the first step. This doesn’t tell me what my chances are of ending my first turn with a Spiritomb. One of two possibilities can happen from here: I could go first or I could go second. Let’s assume I got a basic Pokémon so we can continue the game. By going first, I don’t get to play any trainers or supporters, so all I can do is hope that the card I draw at the beginning of the turn is a Spiritomb. Since I don’t know what’s in my prizes at this point, as far as probability calculations go, I can still pretend I have fifty three cards left in my deck. Thus, I can do the same calculation I did before, but with drawing eight cards instead of seven [[File:Pokemath23.png]].
But this is only the first step. This doesn’t tell me what my chances are of ending my first turn with a Spiritomb. One of two possibilities can happen from here: I could go first or I could go second. Let’s assume I got a basic Pokémon so we can continue the game. By going first, I don’t get to play any {{bp|Trainer card (TCG)|Trainers}} or {{bp|Supporter card (TCG)|Supporters}}, so all I can do is hope that the card I draw at the beginning of the turn is a Spiritomb. Since I don’t know what’s in my prizes at this point, as far as probability calculations go, I can still pretend I have fifty three cards left in my deck. Thus, I can do the same calculation I did before, but with drawing eight cards instead of seven [[File:Pokemath23.png]].


However, if I go second, I can use trainers and supporters. Let’s say I have four Bebe’s Search and four Pokémon Collector along with my four Spiritomb. I can count both Bebe’s and Collector as a Spiritomb because I can easily use them to get one, ignoring the possibility that all four of my Spiritomb are in my prizes. Then the calculation turns into this:
However, if I go second, I can use Trainers and Supporters. Let’s say I have four {{bp|Bebe's Search (Mysterious Treasures 109)|Bebe’s Search}} and four {{bp|Pokémon Collector (HeartGold & SoulSilver 97)|Pokémon Collector}} along with my four Spiritomb. I can count both Bebe’s and Collector as a Spiritomb because I can easily use them to get one, ignoring the possibility that all four of my Spiritomb are in my prizes. Then the calculation turns into this:
:[[File:Pokemath24.png]]
:[[File:Pokemath24.png]]
:[[File:Pokemath25.png]]
:[[File:Pokemath25.png]]
Line 86: Line 86:
Therefore, the probability I have at least one Spiritomb in the play area by the end of my first turn is just under sixty-five percent.
Therefore, the probability I have at least one Spiritomb in the play area by the end of my first turn is just under sixty-five percent.


I hope this is helpful to all of you wishing to improve your game. Whether it be multiplying probabilities, calculating the time it takes to capture a shiny Pokémon, estimating the probability of drawing a specific card, or using these or other tools to predict more phenomena in the world of Pokémon, these applications will not only improve a person’s understanding of the game, but (surprise!) they can be used to understand the real world better as well. But if there’s anything this game analyst can say is that experience, especially from losing, can be far better than any theory. So find a friend, pick up your DS or your deck, and go out there and have some fun!
I hope this is helpful to all of you wishing to improve your game. Whether it be multiplying probabilities, calculating the time it takes to capture a Shiny Pokémon, estimating the probability of drawing a specific card, or using these or other tools to predict more phenomena in the world of Pokémon, these applications will not only improve a person’s understanding of the game, but (surprise!) they can be used to understand the real world better as well. But if there’s anything this game analyst can say is that experience, especially from losing, can be far better than any theory. So find a friend, pick up your DS or your deck, and go out there and have some fun!