Skip to content

Comments

Added more accurate random and its model file.#1980

Closed
kanemasa1987 wants to merge 6 commits intoPokemonGoF:masterfrom
kanemasa1987:random_mod
Closed

Added more accurate random and its model file.#1980
kanemasa1987 wants to merge 6 commits intoPokemonGoF:masterfrom
kanemasa1987:random_mod

Conversation

@kanemasa1987
Copy link
Contributor

@kanemasa1987 kanemasa1987 commented Jul 31, 2016

Short Description:
Added and modified random functions to simulate a human player better by using other random generator.
However, parameters for log-normal are tricky (ex: for average 50ms and 20ms std mu=-3.00, sigma=0.132,) so I have added pre-calculated model file and its calculation code.

Fixes:

"Updated Fixes":

  • Added somewhat okay rng for reticle and spin
  • Added ballthrow delay function

Time and reflex distributions
time

reticle size distributions
reticle

spin distributions
spin

def normalized_reticle_size(factor):
minimum = 1.0
maximum = 1.950
return uniform(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use your RNG for this too ?

Copy link
Contributor Author

@kanemasa1987 kanemasa1987 Jul 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gps errors should be approximated by gaussian.

I'm not quite sure for reticle and spin rngs.
Speaking of myself, I try to get simple 'Great' and don't throw spin balls because I'm bad at it.
However, that might be my preference and most of the users might be acting otherwise.
Besides, I'm also not certain what distributions are proper at this point.

It should be other than uniform to prevent users from getting banned in the future, but I decided to keep it as it is for now, before going deeper and messing around with the codes (by adding ball throw cfg etc).

@DayBr3ak
Copy link
Contributor

Very nice work!

if random() < success_prob:
break
return trial
time.sleep(1.8*(trial+random()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sleep will never execute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I forgot to remove the checking code! 🙇

@kanemasa1987
Copy link
Contributor Author

kanemasa1987 commented Aug 3, 2016

Now I realized the branch is wrong.
Closing and sending request to dev branch.

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

Successfully merging this pull request may close these issues.

3 participants