This is partly inspired by something I have seen at RBY2k10. But I am hoping this will develop into something much more.
Ok, RBY is a pretty simple game and all, and when near the end of the battle and are down to just one or two pokemon, there are some scenarios that are probably a little more likely than some others.
I thought, RBY is so thoroughly known to players, but, only at the anecdotal level really. But there really is some room for some cold hard mathematics here. To really get down to the nitty gritty.
So anyway I decided to start with Tauros vs Tauros. When you have a 100% Tauros against another 100% Tauros to win the game, I am confident enough in saying that the first move you should pick should definitely be Body Slam.
So lets say you bodyslam and one of you gets a critical hit, and the other one gets a paralysis.
What is each players chance of victory, and what is their best move?
Well to define the situation more clearly:
Tauros A (who got hit with a critical hit) has between 167 and 134 hp remaining.
Tauros B (who is paralysed) has between 258 and 241 hp remaining.
Hyperbeam does at a minimum 168 damage (convenient!) and as a maximum (without CHing) 198.
A critical hit Bodyslam does at a maximum 219 damage. Which is not enough for Tauros A to KO Tauros B.
So Tauros B should definitely use Hyperbeam because he will definitely KO if he hits with it.
Tauros A can KO with a critical hit Hyperbeam or can bodyslam and hope for the FP.
However, the maths suddenly gets very difficult, because either side can perpetually miss even after they have run out of pp. Since I am not a mathematician, I have to look for a different way of approaching these sorts of problems. One of the lovely things about probabilities is that you can get results several orders of magnitude more accurate than you need if you can just run 10,000,000 or so tests..
So, having quickly performed ten-million tests, I can tell you that by bodyslamming Tauros A won 32.8% of them. By Hyperbeaming it won 26.7%.
This is more or less as expected, aside from the strength of the advantage to the Tauros with greater health..
Here is a similar scenario.
Lets say TaurosA got bodyslammed by a Snorlax earlier in the battle, and TaurosB got paralysed by a Chansey.
So TaurosA at 242 health (pretty sure damage range doesnt affect anything here) vs TaurosB at full health and paralysed. Each one bodyslamming until they reach KO range of hyperbeam (note there is a bias here, they wont hyperbeam until they get to ko range, even if they are in ko range and a ch bodyslam wont do enough to ko).
Tauros A, the damaged unparalysed Tauros wins 45.5% of the time.
These scenarios were just damage calculation. But from this, and other things like this, we should be able to build detailed analyses for much more complicated scenarios. Like, build up decision trees for more and more complicated scenarios.
To build these I have a stupid java programme that I hardcode the decisions into. I used it to run some wrap scenarios a while back.. Like, Starmie switching into a weakened dragonite as it uses agility (Nite wins >50% of the time). I would be curious to see how far we could pursue this. Perhaps it would be good to have a few close logs we could look at the closing stages of.. I have some, but I kinda want to finish the tournament they are from first..
Also to do this (though in the end it proved rather useless), I wrote a python damage calculating programme. It demonstrates my utter lack of python knowledge I am sure, and is actually pretty shoddily put together even by my standards..
But it tells you all the possible damage outputs, rather than just min max and average.
So to run it you just run it with the pokemons attack followed by its defense followed by base powered followed by either STAB or noSTAB followed by one of SESE SE neutral NVE NVENVE.
If that makes any sense to you.. I just thought this might be useful to someone. Probably most of you who can use it could make a better one yourself..
Ok, RBY is a pretty simple game and all, and when near the end of the battle and are down to just one or two pokemon, there are some scenarios that are probably a little more likely than some others.
I thought, RBY is so thoroughly known to players, but, only at the anecdotal level really. But there really is some room for some cold hard mathematics here. To really get down to the nitty gritty.
So anyway I decided to start with Tauros vs Tauros. When you have a 100% Tauros against another 100% Tauros to win the game, I am confident enough in saying that the first move you should pick should definitely be Body Slam.
So lets say you bodyslam and one of you gets a critical hit, and the other one gets a paralysis.
What is each players chance of victory, and what is their best move?
Well to define the situation more clearly:
Tauros A (who got hit with a critical hit) has between 167 and 134 hp remaining.
Tauros B (who is paralysed) has between 258 and 241 hp remaining.
Hyperbeam does at a minimum 168 damage (convenient!) and as a maximum (without CHing) 198.
A critical hit Bodyslam does at a maximum 219 damage. Which is not enough for Tauros A to KO Tauros B.
So Tauros B should definitely use Hyperbeam because he will definitely KO if he hits with it.
Tauros A can KO with a critical hit Hyperbeam or can bodyslam and hope for the FP.
However, the maths suddenly gets very difficult, because either side can perpetually miss even after they have run out of pp. Since I am not a mathematician, I have to look for a different way of approaching these sorts of problems. One of the lovely things about probabilities is that you can get results several orders of magnitude more accurate than you need if you can just run 10,000,000 or so tests..
So, having quickly performed ten-million tests, I can tell you that by bodyslamming Tauros A won 32.8% of them. By Hyperbeaming it won 26.7%.
This is more or less as expected, aside from the strength of the advantage to the Tauros with greater health..
Here is a similar scenario.
Lets say TaurosA got bodyslammed by a Snorlax earlier in the battle, and TaurosB got paralysed by a Chansey.
So TaurosA at 242 health (pretty sure damage range doesnt affect anything here) vs TaurosB at full health and paralysed. Each one bodyslamming until they reach KO range of hyperbeam (note there is a bias here, they wont hyperbeam until they get to ko range, even if they are in ko range and a ch bodyslam wont do enough to ko).
Tauros A, the damaged unparalysed Tauros wins 45.5% of the time.
These scenarios were just damage calculation. But from this, and other things like this, we should be able to build detailed analyses for much more complicated scenarios. Like, build up decision trees for more and more complicated scenarios.
To build these I have a stupid java programme that I hardcode the decisions into. I used it to run some wrap scenarios a while back.. Like, Starmie switching into a weakened dragonite as it uses agility (Nite wins >50% of the time). I would be curious to see how far we could pursue this. Perhaps it would be good to have a few close logs we could look at the closing stages of.. I have some, but I kinda want to finish the tournament they are from first..
Also to do this (though in the end it proved rather useless), I wrote a python damage calculating programme. It demonstrates my utter lack of python knowledge I am sure, and is actually pretty shoddily put together even by my standards..
But it tells you all the possible damage outputs, rather than just min max and average.
Code:
import argparse
eff = {
"SESE": 40,
"SE": 20,
"neutral": 10,
"NVE": 5,
"NVENVE": 2.5
}
stb = {
"STAB": 1.5,
"noSTAB": 1
}
parser = argparse.ArgumentParser()
parser.add_argument("Atk", type=int)
parser.add_argument("Def", type=int)
parser.add_argument("Power", type=int)
parser.add_argument("STAB")
parser.add_argument("Effectiveness")
args = parser.parse_args()
S = stb[args.STAB]
T = eff[args.Effectiveness]
print("possible damages without CH: ");
output = ""
for R in range(217,256):
damage = int( 42 * args.Atk * args.Power )
damage = int( damage / max(1, args.Def) )
damage = int( damage / 50 )
damage = int( damage + 2 )
damage = int( damage * S )
damage = int( damage * T )
damage = int( damage / 10 )
damage = int( damage * R )
damage = int( damage / 255 )
output += str(damage)
if R == 237: output += " (median)"
if R != 255: output +=(", ")
print(output)
print("possible damages with CH: ")
output = ""
for R in range(217,256):
damage = int( 82 * args.Atk * args.Power )
damage = int( damage / max(1, args.Def) )
damage = int( damage / 50 )
damage = int( damage + 2 )
damage = int( damage * S )
damage = int( damage * T )
damage = int( damage / 10 )
damage = int( damage * R )
damage = int( damage / 255 )
output += str(damage)
if R == 237: output += " (median)"
if R != 255: output += ", "
print(output)
If that makes any sense to you.. I just thought this might be useful to someone. Probably most of you who can use it could make a better one yourself..