PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

[DEV] Release pokemon

Open DiggingInLife opened this issue 10 years ago • 35 comments

Expected Behavior

Release pokemon

Actual Behavior

Don't release any pokemon

Steps to Reproduce

I have 250 pokemon and

"release": { "any": {"keep_best_cp": 6 } },

Other Information

OS: Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) Python Version: (run 'python -V' and paste it here)

DiggingInLife avatar Aug 01 '16 09:08 DiggingInLife

For each pokemon, you are keeping 6. Consider setting single seetings for each pokemon like in THIS config

"release": {
      "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or" },
      "Slowbro": { "release_below_cp": 907, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 2 },
      "Victreebel": { "release_below_cp": 883, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 1 },
      "Machamp": { "release_below_cp": 907, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 1 },
      "Poliwrath": { "release_below_cp": 876, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 1 },
      "Clefable": { "release_below_cp": 837, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 1 },
      "Nidoking": { "release_below_cp": 864, "release_below_iv": 0.8, "logic": "and", "keep_best_cp": 1 },
......
}

iruy avatar Aug 01 '16 09:08 iruy

Works thanks ;)

DiggingInLife avatar Aug 01 '16 09:08 DiggingInLife

This simple one worked before: "any": {"release_below_cp": 400, "release_below_iv": 0.8, "logic": "and"}, "any": {"keep_best_cp": 1, "keep_best_iv": 2},

but not in latest dev. Any changes?

urbels avatar Aug 01 '16 09:08 urbels

I think you're right urbels. Release doesn't seem to work for me anymore either.

jbleyaert avatar Aug 01 '16 09:08 jbleyaert

Yes, I have:

    "release": {
      "any": {"keep_best_cp": 2, "keep_best_iv": 1}, 
     }

And a tons of Pidgey, none is releasing

Gregwar avatar Aug 01 '16 09:08 Gregwar

I have:

"release": { "any": {"keep_best_cp": 1, "keep_best_iv": 1}, }

And the same problem.

jbleyaert avatar Aug 01 '16 09:08 jbleyaert

Can confirm, not releasing any pokemon for me

Bashin avatar Aug 01 '16 09:08 Bashin

I have read (can't remember where) that "keep_best_iv": 1 will be ignored. keep_best_iv must be < 1. Try a more truthful 0.9

iruy avatar Aug 01 '16 09:08 iruy

@iruy That was a bad commit of someone but it's fixed I think

DiggingInLife avatar Aug 01 '16 09:08 DiggingInLife

"keep_best_iv": 1 means keep the highest iv pokemon of a type. A value below 1 does not make any sense as you can't keep half pokemon :-)

Bashin avatar Aug 01 '16 09:08 Bashin

I confused with release_below_iv. Sorry :)

iruy avatar Aug 01 '16 09:08 iruy

Nevermind :-)

Bashin avatar Aug 01 '16 10:08 Bashin

It's because of @giomasce's commit ff62273291a7e8e3ef13105c1be46a44830be0ba. It now considers CP and IV when keeping best pokemon, but it doesn't work in the case where you don't have CP/IV requirements, you just want to keep the best Pokemon.

My config was working fine for me, and that commit broke it. I don't want to consider CP or IV before releasing Pokemon, I just want it to work the way it used to.

skorokithakis avatar Aug 01 '16 10:08 skorokithakis

So is there a working solution to keep best of each pokemon for now? And like 3 best Eevees? (these are so rare at my location that I can't even evolve one yet).

f0rem avatar Aug 01 '16 10:08 f0rem

@f0rem: This seems to work:

"any": {
  "keep_best_cp": 2,
  "keep_best_iv": 1,
  "release_below_cp": 400,
  "release_below_iv": 0.1,
  "logic": "or"
}

Remember, it won't release Pokemon if they're above 400 CP. I set IV low so it won't consider it. This basically means "Release everything except the best pokemon, but also don't release if CP is above 400". Ideally you want to set CP to 10000 so it will release everything except the best Pokemon, but I don't want to risk a future update screwing things up again and releasing all my best Pokemon.

I will probably just revert this change locally, though.

skorokithakis avatar Aug 01 '16 10:08 skorokithakis

I locally reverted ff62273 too I agree that it should only keep N better pokemon when there is no CP/IV specifications

Gregwar avatar Aug 01 '16 10:08 Gregwar

@skorokithakis: The code you mentioned, Is it all you have in your release_config.json?

f0rem avatar Aug 01 '16 10:08 f0rem

Ok, I see the point. One possible workaround, as it was said, is to set a very high CP or IV target. The correct solution is to set transfer_pokemons as all_pokemons in https://github.com/PokemonGoF/PokemonGo-Bot/blob/ff62273291a7e8e3ef13105c1be46a44830be0ba/pokemongo_bot/cell_workers/transfer_pokemon.py#L44 if no rules release_below_* were set. No time to test that now, sorry.

giomasce avatar Aug 01 '16 10:08 giomasce

@f0rem, yes, it is. I also have it set to evolve Zubats, Rattatas, and other small Pokemon.

skorokithakis avatar Aug 01 '16 10:08 skorokithakis

@giomasce Neither of those is a solution. The way this bot keeps breaking backwards compatibility willy-nilly, for all I know, someone will change the logic in a later commit to release all pokemon if release_all is set, and I'll end up with my whole inventory gone.

skorokithakis avatar Aug 01 '16 10:08 skorokithakis