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

random() for hit rate is not accurate #4805

Closed
Gurzeh opened this issue Aug 27, 2016 · 3 comments
Closed

random() for hit rate is not accurate #4805

Gurzeh opened this issue Aug 27, 2016 · 3 comments

Comments

@Gurzeh
Copy link
Contributor

Gurzeh commented Aug 27, 2016

Expected Behavior
the throw should be 90% ("hit_rate": 0.9)

Actual Behavior
in fact, random() - which is used to code the %
if random() >= self.catch_throw_parameters_hit_rate

  • gives inaccurate results (this is know behavior)
    check the log for actual result

Your FULL config.json (remove your username, password, gmapkey and any other private info)
http://pastebin.com/XzFy46Tv

Output when issue occurred
http://pastebin.com/d47ZqyjF

Other Information

OS: OSX Capitan
Branch: dev
Git Commit:
aa1c7811737cb3390b9e8d74d342adcae50112f9
Python Version: Python 2.7.12

@maxprzemo
Copy link

@Gurzeh
On 13 shots did not hit only 4 ([pokemon_capture_failed] Pokeball thrown to Pikachu missed.. trying again!)
The rest depends on Capture Probability https://docs.google.com/spreadsheets/d/1Jj4_DGoaI-KZsm7vqNv1RVi3tZWrjiFoSPagwO9qfQM/pubhtml#

@mjmadsen
Copy link
Contributor

        hit_pokemon = 1
        if random() >= self.catch_throw_parameters_hit_rate and not is_vip:
            hit_pokemon = 0

Looks fine to me. random() generates a number between 0 and 1.

@mjmadsen
Copy link
Contributor

While random might not return that all of random results, we won't do too much better in the python library. Over the long hall, it is sufficient for our needs. We're not sending credit card information or anything.

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

3 participants