![]() TeamWeakAgainst -= selectedPokemon.strongAgainst While (size(selectedTeam) size(p.strongAgainst.intersect(teamWeakAgainst))) Simplified, put together: input: allPokemon: list This very much sounds like a minimax-prunning algorithm, where each pokemon selection (minimizing your weaknesses) can be met with potential opponents that will maximize your weak points. This is, statistically speaking, one of the best teams that you can gather.įor all the combinations that you might find here, some teams will have less weaknesses, since we're "randomly" walking down a tree of possibilities. ![]() Keep repeating this pattern until you obtain the 6 in your team. Likely more than one will match this criteria, again, select one at random. Without knowing anything else besides type, this pokemon is as good as any other with the same weakness count (this is the point of my original comment).įrom the list of weaknesses that this selected pokemon has, select a pokemon from your list that is strong against the weakness, minimizing the amount of weaknesses again. ![]() Minimize List.Count() and from the possible set of pokemonIds, select one at random. For every possible type, identify the count of pokemon that are strong against that type. After my initial comment (where I suggest that it might not be enough info) I believe I actually came up with an idea.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |