Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Energy Calculator #121

Open
r0adkll opened this issue Dec 15, 2019 · 3 comments
Open

[FEATURE] Energy Calculator #121

r0adkll opened this issue Dec 15, 2019 · 3 comments
Assignees
Labels
feature This issue represents a new/existing feature help wanted Extra attention is needed

Comments

@r0adkll
Copy link
Owner

r0adkll commented Dec 15, 2019

A tool to calculate/approximate the number of energies of potentially multiple types that your in-progress deck would need based on the number and breakdown of pokemon that you have already added?

Algorithm Inputs

  • The # of Pokémon added to the deck
  • The breakdown of the attack costs of these pokemon
  • Potentially the effect of certain trainer cards that might affect energy requirements of Pokémon's attacks
  • Potentially the effect of a Pokémon's abilities or attacks to influence a deck's required energy requirements (i.e. Mew & Mewtwo Tag Team, etc)

Requirements

  • This idea is in infancy and needs further fleshing out before making it into the development pipeline
  • This feature is open to discussion and suggestions
@r0adkll r0adkll added help wanted Extra attention is needed feature This issue represents a new/existing feature labels Dec 15, 2019
@r0adkll r0adkll self-assigned this Dec 15, 2019
@FireFlamePhoenx
Copy link

FireFlamePhoenx commented Dec 15, 2019

@r0adkll I dont know much about coding but I have been crunching numbers with my deck and I think I have an idea where the equation for the feature should start.
Add up all the required colored energies of one color for all the pokemon cards then divide the total by the total number of pokemon moves in every pokemon card the deck. Then times that by 10

So it'd look like:

(TotalEnergyTypeA ÷ TotalMovesTypeA) × 10

Once it does that equation you could have it automatically round up the total to a whole number. The algorithm would run the equation for each type of energy in the deck simultaneously.

But let's say you want to add the total of tag team move bonuses costs, add 1 to the total number of tag team moves of all cards and divide by the total number of bonus costs by the this sum. You get a more realistic requirement of energies when you add 1 to the total number of tag team gx moves. So it'll look like this.

((TotalEnergyTypeA ÷ TotalMovesTypeA) × 10) + ((TotalTagTeamCost) ÷ (TotalTagTeamBonuses + 1)

Anyway I hope this helps you get know where to get started with figuring out how to calculate some of the algorithms. I'll keep playing around with the constants and see if I can come up with anything

@sjTaylor
Copy link

For a first pass, I think it'd be best to just use some simple heuristics/rules.

Most decks probably have 8-15 energies.

  1. If all attacks require 1 type of energy, just add 8 of that type to the deck.
  2. If attacks require 2+ types of energy add 2 of each unique type, and then fill the rest in with the most common type.

Obviously there are some issues, but this is just supposed to be an estimate.
For example, some pokemon are uses just for their ability (Jirachi, Zebstrika, and mismagius come to mind) so adding energy for them isn't helpful.

I think if we wanted to get really fancy, it would be good (at some point) to do something statistically.
For example, use a database of decks that people have made and just take the energy from the most similar deck, or train some machine learning algorithm to predict the amount of each energy.
The sample decks in this case could be from websites (e.g. decktrio.com) or from the app somehow.

@r0adkll
Copy link
Owner Author

r0adkll commented Dec 30, 2019

That was my thought to just do something simple and have it appear in the UI like a modal/card that suggests the user adds energy to their deck but doesn't force it as well as letting them dismiss the card or turn off the suggestion for individual decks.

I would love to do some fancy checks for existing / similar deck profiles and suggest energy amounts based on them, or to even use ML with the existing DeckBox database, but that is probably reaching to high in the sky at this point in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue represents a new/existing feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants