Jump to content

Breeding Calculator - Seeking GUI Programmer


Recommended Posts

Good Morning/Afternoon/Evening wherever you are,

 

My alias is LqmWraith in game and I'm normally hanging around channel 2. One thing that I know I struggled with when i first started playing pokemmo; was finding a decisive route to take to reach my 5x31 or 6x31 competitive poke. It can be a little overwhelming when you have 3 boxes full of Magikarp 1x31's.

 

I decided there had to be a better way.

 

Enter LqmWraith's Breeding Calculator. The goal of the program is as follows:

 

-Allow user to input pokemon stats (and all pokemon on hand)

-Select preferred IV's and Nature - (allowing for 5x31 or 6x31)

-Calculate an optimized route for user to follow - (calculating the least number of breeds to achieve perfection)

 

I would also like to provide a "hold the user's hand" method where the program will analyze what you have, and tell you what you need next (potential upgrade path).

 

Into the meat and potatoes.

I do not have the time to develop a friendly GUI for this program. I am seeking someone with Python GUI experience to pretty much map some functions to buttons and create a window that will visually show pokemon. The Logic for the program is already in place. PM me if you are interested.

 

Thanks for reading!

-LqmWraith

 

PS if you really hate python I can write it in another language.

Edited by LqmWraith
Link to post

I may able to be of assistance if you would be comfortable using Java to write the logic. This, of course, does not make this official by and means. However, I am pretty good with Java programming and UI building. Feel free to PM me with some more details of what you are looking for and I will see what I can do this weekend.

Link to post

Tbh, I'd really rather keep it in python. I was tossing the idea of java around in the back of my head for purpose of distribution. I am not the biggest fan, but I'm willing to write it in java if need be.

Edited by LqmWraith
I hate java
Link to post

**UPDATE**

I decided to release the logic, and open this up as a potential community collaboration.

If you would like to view a synopsis or help with development of this please reply or send me a pm.

 

here is a link to a mostly-finished overview of a program. if you can think of a better way or would like to expand on the logic, you will be credited.

http://s000.tinyupload.com/?file_id=22106935059998256748

 

Link to post

Interesting, I will look at this tomorrow morning. I have done my fair share of python gui building. I have taken 3 college level python courses, and have done a ton of python on my own. Currently I am using python to accomplish tasks at my internship (though that is mainly excel spreadsheet / csv manipulation and data analytics) and building a pokemon showdown bot with my brother.

 

edit:

Also, since I wrote the Breeding Guide, this hits close to home for me and would really help a lot of people who have trouble reading my guide.

Edited by Gilan
Link to post

i can help u with this in 1 or 2 weeks(but not in python...^^)

other useful futures would be automated scan of iv's(since we r not allowed to read ram it would have to be graphical)

cheapest way of breeding desired poke (cheapest buy on gtl, tells u what to search for and saves temporary the found pokes with price)

(budget) hp breeder and calculator who gives u the probability and price for a certain poke to have an hp

Link to post

I finally got a little bit of time to work on the calc. If you wish to help, it is welcome. I will credit you with any work. I also heavily commented the code for anyone who wants to pick up right where I left off.

 

The current update may be found:

HERE

 

This is written in python 2.7. As far as I know, the only difference in 3.x would be that raw_input() would need to be input().

 

I wrote a bit more of the logic. Here is a list of current features:

~ Enter Values for Pokemon

~ Determine which Pokemon (at what box position) is the best base for you to breed.

 

Next updates to include: (probably later today)

~ Gender Implementation

~ User-assigned preferences for pokemon

- what nature?

- what iv's are important? (5x31, 6x31?)

 

It's nearly useless in its current state, but nearly anything can be done with the foundation I've laid.

 

It is a ways off, but definitely making progress. I will be working on it a bit day by day. I have been very busy and haven't had the time I've wanted to commit to this project up to this point. I may even start converting it into a Tkinter or wxPython GUI in the next day or so. I do want to hammer out the logic for the optimum route first though.

 

Happy Breeding,

LqmWraith

Edited by LqmWraith
4am - forgot stuff
Link to post
6 hours ago, LqmWraith said:

 I do want to hammer out the logic for the optimum route first though.

This is what I'm working on (sorry I haven't shared it yet, the code itself isn't exactly presentable, but it works). I'll write out the thought process for the optimal breed.

 

The problem I'm encountering is actually getting the program to figure it out. Currently there are just so many paths that it takes way too long and it can't pick out the path (Well it can... After a while).

 

Though I think I'm only encountering this problem because I am including 3x31 to 5x31 that the player already owns (If you don't understand, this will become more apparent when I write out the logic later today).

Edited by Gilan
Link to post

I imagine a near endless amount of if statements lol.

 

I'm not sure what you have, but I was thinking about 1/2'ing the work per step by only running checks against opposing genders (something you may have done already anyways). I guess the fact that you may control offspring gender kind of makes that useless after first iteration.

 

There are other ways to reduce the total number of acceptable outcomes. Maybe making score prioritization a thing, higher #x31's = test 1st, if something returns less favorable working its way from high # IVs to low, stop testing, return best result. - slightly flawed method but it only really makes sense to use pokemon with highest IV's that will produce a desired result anyways. - having a 2x31 would eliminate the need to test a lot of 1x31's.

 

I can easily implement a progress bar if it's going to generate the whole path at once. Personally, I'd be happy waiting a bit for the whole route at once. What is the time for generating the path?

Edited by LqmWraith
brainstorming
Link to post
11 hours ago, LqmWraith said:

What is the time for generating the path?

Days when done with a realistic set of parent pokemon. When you just have a bunch of 4x31 and 5x31 pokemon, it does it within seconds miliseconds. It's when you have a mix of all possible parent pokemon that it just becomes too complicated (at least for the code that I've written).

 

The most realistic possibility, is that we completely ignore everything that is not a 1x31. Because, we know the ratio of 1x31's that is necessary to make a desired pokemon (for a 6x31 natured, the ratio combination is: 1:5:10:10:5:1 + 5:10:10:5:1:0 + a natured pokemon). The optimal path is as follows:

create a 6x31 unnatured (if at any point you get a (2-5)x31 natured pokemon, you set it aside, and restart the 6x31 breed)

create a 5x31 unnatured ("")

create a 4x31 unnatured ("") all 4 must overlap with the 5x31

create a 3x31 unnatured ("") all 3 must overlap with the 4x31

create a 2x31 unnatured ("") all 2 must overlap with the 3x31

create a 1x31 natured must overlap with the 2x31

Then breed them together for a 6x31 natured

So this is what I suggest we do. We can tell the user what pokemon we are aiming to create at each step in the process (like a tree), and if the user already has the target pokemon (like a 3x31 pokemon when making a 4x31 pokemon) then they can just skip those steps.

 

As for the logic behind determining the offspring:

Each parent pokemon must be give a "list" of their braceable stats (i.e. stats that you would brace/everstone). You would only breed the two parents together if they overlap on everything but one braceable stat each. This means that for example, you would have a list:

parent1.bracelist = ['atk','def','spdef','spe','nature']

parent2.bracelist = ['def','spatk','spdef','spe']

You wouldn't breed these together, because you would either lose (most likely) nature or the atk IV from Parent 1. You are trying to breed a 5xbraceable stat pokemon with a 4xbraceable stat pokemon.

However, you must keep in mind that:

parent1.bracelist = ['atk','def','spdef','spe','nature']

parent2.bracelist = ['def','spatk','spdef','spe','nature']

Is also unacceptable. As even though both parents are 5xbraceable stat, overlapping the nature does not guarantee the offspring to have that nature.

But in this case:

parent1.bracelist = ['atk','def','spdef','spe','nature']

parent2.bracelist = ['atk','def','spatk','spdef','spe']

You would breed them together, "bracing" the nature and spatk stat.

So the offspring inherits everything from parent1, and then inherits the other stat from parent2:

offspring1.bracelist = ['atk','def','spatk','spdef','spe','nature']

 

This is the logic behind making the offspring. And while you are determining the non-overlapping stats, you can output to the user the brace/everstone that they would need to use on that step.

Edited by Gilan
Link to post

@LqmWraith

I was looking at the code and thinking about a way to preload pokemon egg groups, what do you think about a list file with all pokemon available on PokeMMO, their egg groups and their pokedex number? That way we can use it for filtering matching options to breed between other things. We can also have the user input the pokedex number of the pokemon he wants to breed until Nx31 or whatever stats he wants. We can also go as far as getting the list of pokemon and where they are available and with which % of appearing in the wild, that way it will be possible to recommend a pokemon easier to catch/buy for the user to make the breeding process cheaper.

Also, what are you planning to use to build the GUI? I'm not well versed in GUI building but I use python everyday and I think we can make a great tool here.

Link to post
2 hours ago, Kekhs said:

We can also go as far as getting the list of pokemon and where they are available and with which % of appearing in the wild, that way it will be possible to recommend a pokemon easier to catch/buy for the user to make the breeding process cheaper.

This shouldn't be necessary, we can just predefine it (like ratatta for field pokemon). No reason to get a bunch of pointless data for all pokemon.

 

2 hours ago, Kekhs said:

Also, what are you planning to use to build the GUI? I'm not well versed in GUI building but I use python everyday and I think we can make a great tool here.

We are deciding between wxpython or tkinter

 

I've no preference.

Link to post
3 hours ago, RysPicz said:

calcing is cheating

heh, you do the same thing in  your brain that the program would do for you. Faster, if possible!

 

4 hours ago, Kekhs said:

@LqmWraith

I was looking at the code and thinking about a way to preload pokemon egg groups, what do you think about a list file with all pokemon available on PokeMMO, their egg groups and their pokedex number? That way we can use it for filtering matching options to breed between other things. We can also have the user input the pokedex number of the pokemon he wants to breed until Nx31 or whatever stats he wants. We can also go as far as getting the list of pokemon and where they are available and with which % of appearing in the wild, that way it will be possible to recommend a pokemon easier to catch/buy for the user to make the breeding process cheaper.

Also, what are you planning to use to build the GUI? I'm not well versed in GUI building but I use python everyday and I think we can make a great tool here.

I think that in the future, this could be an implemented feature. Trying to add too much before initial 1.00 generally causes issues as there's going to have to be a lot of refactoring to get this to perform adequately for people who have toasters for pc's.

 

 I have gone a few days without releasing something new and I apologize! Work has been very busy. Programming as a job and as a hobby is rough at times.

 

I added gender and should have the logic in place within a few hours. I have yet to decide how to structure a database for list of pokemon. I am really putting a lot of thought into it now to minimize work later. - Loading all pokemon from a save file is potentially initializing 682 variables at once. (maybe more).

 

Again, thanks for your patience!

Keep your eyes peeled for later today.

Link to post
15 minutes ago, RysPicz said:

Tell that to @Darkshade

I don't see how this could, in the slightest sense, be cheating. There's no manipulation of game files, no botting, no interfacing with the game whatsoever. TBH, no one would even know you had this on your computer. You can't go to sleep and have the pokemon made for you when you get up. - it's not a broken, all powerful program. Just something to help people, and maybe grow the competitive scene a bit.

 

I think you may be misinterpreting what this program is made to do.

 

 

Link to post
7 minutes ago, LqmWraith said:

I don't see how this could, in the slightest sense, be cheating. There's no manipulation of game files, no botting, no interfacing with the game whatsoever. TBH, no one would even know you had this on your computer. You can't go to sleep and have the pokemon made for you when you get up. - it's not a broken, all powerful program. Just something to help people, and maybe grow the competitive scene a bit.

 

I think you may be misinterpreting what this program is made to do.

 

 

Dude, I absolutely love your reasoning right there. Don't get me wrong, I have nothing against this calculator or anything- in fact I strongly support it :)

I'm just laughing out of Darkshade and an old forum meme. I think you'll understand the context of my posts after giving this post a read ;)

 

However, I love this thing and I sure will be looking forward to see it in development and practice. Followed :)

Link to post
10 minutes ago, RysPicz said:

Dude, I absolutely love your reasoning right there. Don't get me wrong, I have nothing against this calculator or anything- in fact I strongly support it :)

I'm just laughing out of Darkshade and an old forum meme. I think you'll understand the context of my posts after giving this post a read ;)

 

However, I love this thing and I sure will be looking forward to see it in development and practice. Followed :)

I had completely misinterpreted what YOU meant lol. I haven't been around long enough to know the community or anything about it as I've maybe been playing for a month off and on so I thought you were serious and flagging a mod to come stop me lol.

Link to post

I was thinking about lazy loading a dictionary or something like that so you would only truly load a pokemon data to memory when it is needed.

Also one tip on the code, I think it is easier to set a global dictionary and create variables there so you wouldn't flood your code with "global" and other declarations, I can change that for you and make a merge request if you want. 

Link to post
3 hours ago, Gilan said:

Yeah it is a dead idea. Ran into issues figuring out how to calculate the ideal path to take in breeding.

I was brainstorming last night, and I think I might have a solution involving tree permutations. Probably won't be the most efficient solution but I could probably make it work.

 

2 hours ago, YIBU said:

Sounds like an awesome project!

 

If you get to the step that users can also choose egg moves, I can provide some data for you like:

 

https://m.pokemmo.eu/move.html?id=curse&lang=en

 

 

I was wondering if pokemmo had some kind of API for data like this, thought about doing a GTL web tracker to see price history and things like that, but that's beyond my ability. Either way, if I ever get to egg moves I will keep that in mind, and might even reach out for other things such as egg groups. Thanks for the info!

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.