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

Keeping before-the-launch pokemon intact from transfer/evolution #4468

Closed
LitRidl opened this issue Aug 21, 2016 · 20 comments
Closed

Keeping before-the-launch pokemon intact from transfer/evolution #4468

LitRidl opened this issue Aug 21, 2016 · 20 comments

Comments

@LitRidl
Copy link
Contributor

LitRidl commented Aug 21, 2016

Short Description

Add an option to preserve any pokemon account had before launching bot. Pokemon caught before botting should be excluded from transfer, evolution and nicknaming.

Possible solution

  1. In Pokemon class (inventory.py) Introduce boolean variable self.is_original which should be set to True for all pokemon in inventory at bot's early start time. For all bot-captured pokemon set it to False (either by default or at capture time).
  2. Later add boolean option to TransferPokemon, NicknamePokemon and EvolvePokemon tasks to optionally preserve pokemon with self.is_original set to True.

How it would help others

A lot of people play game seriously -- they give names to their "pets", have 10 snorlax pokemon for different gyms and etc. They have their own plans for manually captured pokemon and that is why they often cry that bot acts destructively. That is why keeping X best bots is not a substitute for this. They would be happy to see those pet pokemon intact :)

p.s.: wrapping this logic above is_favorite is not an option because it is used in-game by user and setting it in automatic manner would be really disrespectful. The same goes for asking user to fav their pokemon (they have their own understanding for using favs).

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 21, 2016

If you're going to run an account using any form of 3rd party app (like our bot), you will probably lose your account. We're just not beating detection methods yet.

I don't think it's unreasonable to ask folks to favorite those they want to keep.

@julienlavergne
Copy link
Contributor

Why not creating a rule to keep your 10 best snorlax ?

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 21, 2016

@mjmadsen this is not an option due to p.s. section: they have their own uses for favoriting and don't want to mix it with this. Also, if user have lots of subjectively useful pokemon -- they would do quite a work to mark them all even it doesn't conflict with their way of favoriting pokemon.

@anakin5 because it is just an example :) If we keep 10 best pokemon of every family, their count will go far beyond bag size. I tried to figure out some numerical boundaries (X best, X% strongest, all with CP/IV/etc > X% than the max, keep X of family, etc) but always got complains. Talked to some players and realized that the best solution is kind of stupid in terms of algorithms -- just don't touch player's pokemon if they don't permit it to you :)

@mjmadsen
Copy link
Contributor

@LitRidl If you want to cheat, sometimes you might have to make concessions. Since the bot restarts often, or might be stopped manually and rebooted, you would keep having more and more pokemon being saved. So we would have to add some form of logging to note which pokemon were there the first time the bot was loaded on that particular account. That's a boat load of work to save someone from being unhappy about giving up their favorite rules. Plus if we got the bot to a point that it won't get banned, those favs will end up sucking by the time you get into late game unless you happened to find that perfect IV snorlax, with the best moveset and decent starting CP manually.

I get where you are coming from, but my point is there is already a simple method to accomplish the goal.

@julienlavergne
Copy link
Contributor

I didn't say keep 10 best of every family. I said keep 10 best snorlax.
I am not sure what the state of the master branch right now, but you can do that on dev branch.

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 21, 2016

@mjmadsen Well, honestly as a programmer I really like your point of view.
Anyway, are favorited bots safe from PokemonEvolve and PokemonOptimizer?

You actually spotted one extra problem: if player used bot, normally played for some time and again decided to cheat -- we will have to reset his old reserved pokemon and log them somewhere again.

How would you suggest to solve this problem by writing plugin, for example? Creating new task which should run only once and log pokemon list to some storage is Ok, but how can I modify existing logics of Transfer/Evolve/Nickname without altering their code?

Maybe those kind of problems should be solved by adding some kind of filter functions for transfer/evolve/etc? For example, if user wants to have some very custom filters (keep only pokemon with CP >= 0.7 * of pokemon with max CP, keep only pokemon not listed in some storage and etc), he/she can write them in some special python file (with user-defined functions for use within config-file) or something like that.
By the way, it would also be useful for level-independent configs because user will be able to use relative CP/IV/DPS/etc values if they wanted.

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 21, 2016

Yeah, I think you'd need to edit their logic or find some means to remove specific pokemon from the pokemon inventory but still maintain pokebag count correctly.

Yeah, all tasks should be leaving favorites alone. I personally haven't looked at optimizer's code, but I'm pretty sure it holds true.

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 21, 2016

@mjmadsen and what about custom filters and relative values? Should I create new feature requests or are they no-way?

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 21, 2016

Sorry to come off as a pessimist right away. I'm sure if you put up a PR with some from of "no touching" system and modified the tasks that might mess with those pokemon, we could push it through.

@julienlavergne
Copy link
Contributor

@LitRidl
I already have a change coming for relative values. Where you can keep your top 10% or something like that. But there is only very little usage of that feature and it doesn't answer your core question.

@julienlavergne
Copy link
Contributor

For now, the requirement is not clear to me. I would prefer you explain more what you are trying to achieve and then we can think of a solution.
Storing pokemon at startup is the solution to a problem, not the problem. So let's see if there is better solution to your problem.

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 21, 2016

@anakin5 Oh, that's great (about relative values). By the way, will there be any way to filter them level-wise? I mean, below/above average level CP, below/above pokemon level, etc.?

So, the problem. Players often initially have some unsorted pokemon bag. Of course, they can go through it and manually star pokemon they don't want to be transferred. But thus we force them to think and make decisions (that's not lovely thing for most people) so that they postpones the whole process. Another problem is that often they have different level of game understanding: if we release pokemon with high initial CP and put instead another of the same type with 1.0 perfection, they may be displeased. The same with opposite way :)

That is why I currently see only 2 good solutions:

  1. Star/favorite scheme, but it forces player to make decisions and thus delays the whole thing,
  2. Just keep pokemon bag if there is enough space.

By the way, in regard to @mjmadsen : if all bot-captured pokemon are transferred immediately (excluding xp trash like weedle, caterpie and etc. because they should be immediately evolved and than also released), there is no problem with persistence. That makes sense for default because usually we don't want to use player's (potential) lucky eggs or good candies.

@julienlavergne
Copy link
Contributor

Let's not jump on the solution yet.

  • "star Pokemon they don't want to be transfered": can we come up with a list of reason why someone would not want a Pokemon to be transfered ? It seems you are implying some players might want to keep Pokemon for a reason that go beyond any logic. I think there is a logic and that the bot can take the same decision.
  • You can keep both the best cp and the best iv , and/or the best whatever. So it is already possible to ask the bot to keep multiple pokemon based on different criteria. The thing you cannot do now is keep the worst, but yeah...

What is level filter, below/above average level CP, below/above pokemon level ?

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 21, 2016

Well, actually you got me right -- as I said, some players are not very well educated about the game. Some of them (well, not the majority) love pokemons without logical reasons (for example, one player cried about extremely weak Vaporeon -- he said it was his first vaporeon, it was special). Also, some of them are collectors -- they just try to keep all pokemon they love in some way. The problem is that I can't a priori guess this special things.

About level filters: currently CP values in configs are mainly hard-coded which makes them level-dependent. For example, pokemons of level 15 have average CP higher that level 5 pokemons. I think it is quite versatile for configs: for example, we can keep only those pokemon of family X who has CP greater than 70% of current global max/avg CP among player's pokemon.
About levels -- well, pokemon have them as far as I know. It seems quite logical to add pokemon level to filter, but again -- it would still be hard-coded trainer level-dependent value.

@julienlavergne
Copy link
Contributor

  • If a player has special affinity toward his Pokemon, on top of having to go to see a doctor ;), he might not want to run the bot at all. It is quite clear today that running the bot might get you banned. So don't risk it with an account you care a lot.
    For the rare cases where there is no logic a all, I think the favorite option is a good one because that exactly what it means, it is your favorite :)
  • The Evolve task can keep one a each pokemon which is ideal for people who always want to keep at least one of each. There is no such thing right now in the Pokemon optimizer but it can be added indeed.
  • I think percentage based criteria are more "dangerous" than a fix number.
    Because 10% does not mean that you want to keep 10% of the family. It means that you want to keep to top 10% of a range. for ex with iv, if the best iv 0.9, you will keep all Pokemon between 0.81 and 0.9 (that is the top 10% of the range 0-0.9). If you have 10 Pokemon within a family with iv 0.8 and you suddenly get a 0.9, all those 0.8 will be transfered. That is much more aggressive than saying you want to keep the top 2, which would have keep them all.

The opposite scenario is true as well, you might end up keeping much more Pokemon than what you are willing to, because they are all in the 10% range.

@julienlavergne
Copy link
Contributor

About the level, it is already represented by ncp (normalized cp). The good things about ncp compared to level is that 1) you know the range from 0% to 100%, 2) you can see it in game with the half circle bar over the head of the pokemon.
Sorting pokemon by ncp give the same result as sorting them by level.

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 22, 2016

@anakin5 by the way, about keeping pokemon with best CP/IV and etc. As far as I know, keep_* filters in release section controls releasing duplicate pokemon.
Is there currently any way to say bot "I want to have 150 strongest by CP/IV/etc pokemon in my overall pokemon bag"? Because "any": { "keep_best_cp": 150 } will keep 150 best pokemon for each type, not for the whole bag.

@julienlavergne
Copy link
Contributor

@LitRidl
I don't know about the release task but the optimizer will rank Pokemon so that duplicates have same rank, so both will be kept.
For releasing/evolving considering the whole bag, it is doable. It is dangerous setting though.

@LitRidl
Copy link
Contributor Author

LitRidl commented Aug 27, 2016

@anakin5 By the way, wouldn't it be useful to add the same feature to pokemon optimizer?
As far as I know, PokemonOptimizer is great for leveling up new accounts, while old Transfer/Evolve is great for leveling up other players' accounts because it is kind of more conservative.
But may be it's just for me -- so I am asking if the same thing may be useful for Optimizer.

@julienlavergne
Copy link
Contributor

I added two modes and I am currently testing it. One mode for applying filters on each Pokemon instead of the whole family and another to apply it to the full bag.
I will commit when I am sure things are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants