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

[DEV] Release pokemon #2200

Closed
DiggingInLife opened this issue Aug 1, 2016 · 35 comments
Closed

[DEV] Release pokemon #2200

DiggingInLife opened this issue Aug 1, 2016 · 35 comments

Comments

@DiggingInLife
Copy link

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)

@iruy
Copy link

iruy commented Aug 1, 2016

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 },
......
}

@DiggingInLife
Copy link
Author

Works thanks ;)

@urbels
Copy link

urbels commented Aug 1, 2016

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?

@jbleyaert
Copy link

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

@Gregwar
Copy link

Gregwar commented Aug 1, 2016

Yes, I have:

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

And a tons of Pidgey, none is releasing

@jbleyaert
Copy link

I have:

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

And the same problem.

@Bashin
Copy link
Contributor

Bashin commented Aug 1, 2016

Can confirm, not releasing any pokemon for me

@iruy
Copy link

iruy commented Aug 1, 2016

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

@DiggingInLife
Copy link
Author

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

@Bashin
Copy link
Contributor

Bashin commented Aug 1, 2016

"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 :-)

@iruy
Copy link

iruy commented Aug 1, 2016

I confused with release_below_iv. Sorry :)

@Bashin
Copy link
Contributor

Bashin commented Aug 1, 2016

Nevermind :-)

@skorokithakis
Copy link

It's because of @giomasce's commit ff62273. 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.

@f0rem
Copy link

f0rem commented Aug 1, 2016

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).

@skorokithakis
Copy link

@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.

@Gregwar
Copy link

Gregwar commented Aug 1, 2016

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

@f0rem
Copy link

f0rem commented Aug 1, 2016

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

@giomasce
Copy link
Contributor

giomasce commented Aug 1, 2016

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

transfer_pokemons = [pokemon for pokemon in all_pokemons
if no rules release_below_* were set. No time to test that now, sorry.

@skorokithakis
Copy link

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

@skorokithakis
Copy link

@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.

@f0rem
Copy link

f0rem commented Aug 1, 2016

@skorokithakis: Would you mind sharing it? I work 100km away from my home where the bot is running and it is now getting low on pokemon place fast and I can't login to clear it from duplicates since I would get softbanned.

@skorokithakis
Copy link

@f0rem
Copy link

f0rem commented Aug 1, 2016

@skorokithakis: Now when I run your config it neither recycle items nor transfer pokemons.. Posting my codes below, could you help?

release_config.json: https://www.pastery.net/fyjpyx/
config.json: https://www.pastery.net/rhvpxj/

EDIT: Looks like pokemons are transferred correctly once the bag is full, however I cannot get items to work.

@carl-eis
Copy link

carl-eis commented Aug 1, 2016

I agree, ff62273 wasn't really necessary, should be reverted on the repo.

@MiLk
Copy link

MiLk commented Aug 1, 2016

#2215 fixes the issue

@giomasce
Copy link
Contributor

giomasce commented Aug 1, 2016

@f0rem You can login in with the app even if your bot is far away from your place. Just disable the GPS. You can still do most of inventory management actions.

@giomasce
Copy link
Contributor

giomasce commented Aug 1, 2016

@skorokithakis Yes, this application has a rather fast-paced development. As far as I know there are no testbed servers, so it is difficult to do regression testing. There is not much you can do: if you want to develop something quickly, it is difficult to have it well designed and well tested. On the other hand, people (e.g., me) want to have a bot now, not next year.

BTW, take into account that my patch makes it more difficult to release Pokemons by mistake. Actually, I wrote it just because my previous config released Pokemons to easily for my tastes.

@f0rem
Copy link

f0rem commented Aug 1, 2016

@giomasce: That is actually a great advise, I can in fact control my inventory and pokemons while bot is running, great!

Could you please also advise me how to get the item filtering to work? It seem to ignore the max values I've set for it.

@skorokithakis
Copy link

@giomasce I'm not talking about extensive testing, I'm talking about people not even thinking about what their changes will do to people's configuration. I'm sure someone will soon rename keep_best_cp to something else and set the default to 0, so people who pull the latest dev will see all their Pokemon get released because the author didn't think twice before changing the option backwards-incompatibly.

@L422Y
Copy link
Contributor

L422Y commented Aug 1, 2016

I see no logic in the should_release_pokemon to check agains keep_best_cp or keep_best_iv -- it is only checking against never_release,always_release,release_below_cp, and release_below_iv -- the solution would be implementing code to check for keep_best_cp and/or keep_best_iv w/ logic operator.

@inzaghi89
Copy link

[16:59:00] Ran for 0:23:39
[16:59:00] Total XP Earned: 1050 Average: 2663.91/h
[16:59:00] Travelled 0.38km
[16:59:00] Visited 0 stops
[16:59:00] Encountered 5 pokemon, 5 caught, 0 released, 0 evolved, 0 never seen before
[16:59:00] Threw 6 pokeballs
[16:59:00] Earned 500 Stardust
[16:59:00]
[16:59:00] Highest CP Pokemon: Drowzee [CP: 498] [IV: 7/14/7] Potential: 0.62
[16:59:00] Most Perfect Pokemon: Krabby [CP: 217] [IV: 13/9/15] Potential: 0.82

"release": {
  "any": {"release_below_cp": 300, "release_below_iv": 0.5, "logic": "or"},
  "any": {"keep_best_iv": 5},

Doesn't release any pokemon, but should...

@skorokithakis
Copy link

@inzaghi89 You can't have duplicate keys. Remove one of the "any"s.

@L422Y
Copy link
Contributor

L422Y commented Aug 1, 2016

@inzaghi89:
"release": { "any": {"keep_best_iv": 5, "release_below_cp": 300, "release_below_iv": 0.5, "logic": "or"},

@inzaghi89
Copy link

@L422Y Thank you. I've quick question, because I'm not sure how it works... Just tried to set this, and I'm glad that it doesn't work.

For "any" keep_best_iv will work for each pokemon. For example if I'll have 10 Drowzee it'll keep 5 with best IV, for 20 Pidgeon it'll keep 5 with best... and for each one do this, or will filter my whole collection and keep 5 best?

@urbels
Copy link

urbels commented Aug 2, 2016

@inzaghi89 it will keep best 5 from each

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

No branches or pull requests