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

[BUG] future_pokemon_release does not work as defined #4098

Closed
rendyep opened this issue Aug 16, 2016 · 4 comments
Closed

[BUG] future_pokemon_release does not work as defined #4098

rendyep opened this issue Aug 16, 2016 · 4 comments

Comments

@rendyep
Copy link

rendyep commented Aug 16, 2016

"release": {
      "any": {"release_below_cp": 500, "release_below_iv": 0.8, "logic": "or"},
}
[TransferPokemon] [INFO] [future_pokemon_release] Releasing Magmar [CP 1353] [IV 0.64] based on rule: CP < 500 OR IV < 0.8
[TransferPokemon] [INFO] [pokemon_release] Exchanged Magmar [CP 1353] [IV 0.64] for candy.

If I'm not mistaken, the future_pokemon_release logic does not work as defined. CP 1353 and IV 0.64 must not be released with the config above.

@justinbeatz
Copy link

Your logic operator is "or", so the code works as expected, it should be "and".

Release if cp < 500 OR iv < 0.8
Magmar iv = 0.64

@rendyep
Copy link
Author

rendyep commented Aug 16, 2016

Hi, @justinbeatz, I'm actually a programmer, and of course I'm familiar with AND and OR logics.
Could you please read logical expressions for more information about why future_pokemon_release works incorrectly and how it should work.

Here are examples:
#1 OR
Release if CP < 500 OR IV < 0.8
Magmar => CP 1353, IV 0.64
Hence Magmar should not be released because it satisfy one of the given conditions.

#2 AND
Release if CP < 500 AND < 0.8
Magmar => CP 1353, IV 0.64
Hence Magmar should be released because he doesn't satisfy all of the given conditions.

@Setsu-BHMT
Copy link

Setsu-BHMT commented Aug 16, 2016

@rendyep You are confused. You are interpreting the logical conditions as if they were "keep" instead of "release".

Example:
"Release if CP < 500 OR IV < 0.8" means "release if and only if either CP < 500 OR IV < 0.8 is true", ergo:

  1. CP500 IV0.8 is kept
  2. CP499 IV0.8 is released
  3. CP500 IV0.79 is released

@avexus
Copy link

avexus commented Aug 16, 2016

@rendyep
Release if (CP < 500 OR IV < 0.8)
Magmar => CP 1353, IV 0.64
It should BE released, because inside () evaluate to true.
(F or T) evaluates to T

@k4n30 k4n30 closed this as completed Aug 17, 2016
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

5 participants