Breeding Probability Calculator

Status
Not open for further replies.
Note: This program was written on Microsoft Visual Basic Express Edition 2008, so it will not work at all on Macintosh computers. Sorry to all those who use them. In addition, you may need to download and install .NET 3.5 (found here).

This is a program I created to determine the odds of breeding Pokemon. It's quite a bit different from X-Act's since you have a greater degree of control. Instead of 0-30 or 31 for a parent's IV, you input the exact value. Instead of 0-30 or 31 for the Baby's IV, you decide on the exact range you want. Also, you can specify a set of Hidden Power types and a minimum power for your baby to have.

To calculate IVs, I used some variation on the Permutation Counting Principles. Calculating just IVs was fairly straightforward, but I was at a loss at how to incorporate Hidden Powers. In the end, I had my program generate a bunch of text files in the directory "C:\Jiggy's Breeding Calculator\Pokemon\Hidden Power Information" to hold the information needed to calculate with Hidden Powers.

Here's the program. Enjoy!!!

And for anyone that is curious about how it works or would like to try and improve it, here's the source code.

EDIT: Here's an updated version that is much faster. http://www.mediafire.com/download.php?uwwinm19u9g
 
Wow, this is great, It even does Hidden Power types! It's always nice to know your chances, and how much, say, spending time on a better egg move parent would help you.
 
Great app. I must say the options it provides are awesome.

edit: OH even more features than I saw. This is kick ass dude. So many percentages!
 

Sunday

God Bless Nintys Incompetence :*)
is a Forum Moderator Alumnusis a CAP Contributor Alumnus
The chances of me breeding my perfect Gible are depressingly low ;_; (0.3%)
Still, great calc! Love it.
 
Oh boy...

I tried rewriting the code in this a little to try and break the reliance on text files, and here's what I got on the first test run.
Mom's Inputted IV Data
[straight 30's]
Dad's Inputted IV Data
[straight 30's]
Desired IV Ranges
[none]
Desired Hidden Power Types
Fighting

Desired Hidden Power Minimum Base Power: 30

Breeding Probability: 192.7083 %
Hatch Chance: 1 in 1

Breakdown of Good Offspring

Hidden Power Type Breakdown
Fighting: 100 %
FUCK!! Now I have to track down a logic error.

>.<

EDIT: Well, I tracked down the logic error. It always amazes me how much 5 lines of missing code can fuck everything up.

Anyway, as I said the primary reason for this rewrite was to potentially speed it up. I did succeed in removing the need for te text files. And I must say, comparing the speed of this new version to the old one is like Speedy Gonzalas vs Slow-Poke Joe. I swear, this thing is FAST!! I ran a test using a couple Hidden Powers, hit the Start button, and looked at the progress bar to see how fast it went. Nothing. I though, "Damn, did it freeze or something?" Looked at the output text box..."Holy shit, it's already done?!?!"

I'd estimate it's at least a couple hundred times faster now. I guess shineyaltaria was right when he said that System.IO was slow.

There's a couple more things I want to redo, so I'll upload the new version soon.
 
Great job! Lovely features and even Hidden Power :D (I tried this myself, but I failed miserably, due to my lack of knowledge in both probabilities and programming xD)
 
This a fantastic calculator. I use X-Act's all the time, and now I still do just when I want a quick calc. Something I've wondered about both of them, though, were: does it factor in the chances of fluking the IV you want (e.g 31) or is it just the chance for the IV to pass down?
 
This a fantastic calculator. I use X-Act's all the time, and now I still do just when I want a quick calc. Something I've wondered about both of them, though, were: does it factor in the chances of fluking the IV you want (e.g 31) or is it just the chance for the IV to pass down?
Yes, they do. (Otherwise a baby with 4 required IV's would have a chance of 0%, because at least 1 has to be generated randomly, due to the fact that you can only inherit 3 IV's at the same time.)
 

Toothache

Let the music play!
is a Community Leader Alumnus
Very useful calculator, has everything practical that I can think of. Interesting to note that random natures don't always have an equal value, something I'd suspected before but never realised.
 
Great job! Lovely features and even Hidden Power :D (I tried this myself, but I failed miserably, due to my lack of knowledge in both probabilities and programming xD)
Hidden Power was a bit of a bitch to figure out, but it wasn't that hard. Really the biggest hurdle in making this was the fact that there are 1,030,792,151,040 different combinations of inheritance + randomly generated IVs. It took a while to find out how to reduce that number down to something more manageable. Now, it loops through the main programming 960 times, with quite a few smaller loops in the middle.

Thank you Permutation Counting Principle!
This a fantastic calculator. I use X-Act's all the time, and now I still do just when I want a quick calc. Something I've wondered about both of them, though, were: does it factor in the chances of fluking the IV you want (e.g 31) or is it just the chance for the IV to pass down?
Yes, it does. It factored in everything I could think of.
Very useful calculator, has everything practical that I can think of. Interesting to note that random natures don't always have an equal value, something I'd suspected before but never realised.
Huh? Care to expand on that?
 
I've been using this program a fair bit recently, but I've noticed that sometimes, the output varies slightly, even if I don't change any information, and just hit "simulate" again. Is this normal?

And, yeah, I realize that this thread is old, but I don't think there would be another place to post this, and I also think that people might not mind seeing this. ;) Is a +1 "necro'd" post really necessary?
 
It would vary because it goes through about 10,000 babies from the information entered, so it determines the result from 'actual' results and not from pure theory (as in the program would be flipping a coin 10 times to determine the chance of heads/tails instead of using pure mathematics to determe the chance).
 
I've been using this program a fair bit recently, but I've noticed that sometimes, the output varies slightly, even if I don't change any information, and just hit "simulate" again. Is this normal?

And, yeah, I realize that this thread is old, but I don't think there would be another place to post this, and I also think that people might not mind seeing this. ;) Is a +1 "necro'd" post really necessary?
Somehow you got my very first version. That one went through 1,000 babies and checked if they were good or bad.

I changed it a while ago to use Permutation Counting Principles to determine a mathematicla probability. Try this version. It should be better and much faster.

BTW, for anyone using my calculator, I'd recommend downloading that version. It's much faster than the previous one.
 
I've got a question about the results of probability when including Hidden Power. Sometimes when I input the probability for getting offspring with Hidden Power 70 I get no results but when I try it with lets say Ice 45 I get results. Is the calculator supposed to work so that it won't give any displays when the desired results are unobtainable or is there a malfunction with mine?
 
I've got a question about the results of probability when including Hidden Power. Sometimes when I input the probability for getting offspring with Hidden Power 70 I get no results but when I try it with lets say Ice 45 I get results. Is the calculator supposed to work so that it won't give any displays when the desired results are unobtainable or is there a malfunction with mine?
Which version are you using? Did yu just download it, or did you download it earlier?
 
Thanks, at least now I know I have nearly no chance of getting a good Espeon, but at least now I know not to get my hopes up...
 
I recently started experimenting with Visual Web Developer, so depending on how that goes I might be able to make a Web based version of this, meaning Macs might be able to use it as well.

If that doesn't work, I can always try JavaScript or something.
 
Status
Not open for further replies.

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

Top