Probability Calculator for 2HKOs

Tangerine

Where the Lights Are
is a Top Team Rater Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnus
2HKO Probability Calculator
http://tangerine.colinjf.com/probcalc.py

Web Interface version, which should be accurate. Fill it in, and give it a whirl.

Description:
The Calculator aims to calculate the probability of a 2HKO with regards to the Random Number component used in the Damage Formula. You can put in different moves, and different "effects", to see the actual 2HKO probability rather than just guesstimating.

Implementation:
Calculates the Damage of the 2 moves, applies the Random Number component, applies the rest of the modules, and then sums up the conditional probabilities.

It is done on Python and CGI.

How to Use:
Take note of the variables it asks for. If you don't know what they do, then take note of the Damage Formula. Plug in Numbers, and give it a whirl.
 

obi

formerly david stone
is a Site Content Manager Alumnusis a Programmer Alumnusis a Senior Staff Member Alumnusis a Smogon Discord Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnusis a Battle Simulator Moderator Alumnus
You can find the 100% accurate probability distribution of the random number fairly easily.

Rather than using n / 100, where n is 85 through 100 with unequal probability, use 100 * n / 255 / 100, where n is a number between 217 and 255 with equal probability. In other words, there are 39 possible values for the RNG. If it uses 217 through 219, it is the equivalent of .85, so the odds of that are 3/39. If you use fractions out of 39, you should get your probabilities to sum to 100%. Then your only issue is inaccuracies due to using floats.
 

Tangerine

Where the Lights Are
is a Top Team Rater Alumnusis a Community Leader Alumnusis a Smogon Discord Contributor Alumnusis a Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnus
You can find the 100% accurate probability distribution of the random number fairly easily.

Rather than using n / 100, where n is 85 through 100 with unequal probability, use 100 * n / 255 / 100, where n is a number between 217 and 255 with equal probability. In other words, there are 39 possible values for the RNG. If it uses 217 through 219, it is the equivalent of .85, so the odds of that are 3/39. If you use fractions out of 39, you should get your probabilities to sum to 100%. Then your only issue is inaccuracies due to using floats.
yeah, i fixed that for the last post (since Colin told me over IRC)
 

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

Top