Added better rng, its model file, and GPS noise simulation#2492
Added better rng, its model file, and GPS noise simulation#2492kanemasa1987 wants to merge 21 commits intoPokemonGoF:devfrom kanemasa1987:random
Conversation
|
@kanemasa1987 we need to be able to support not using these randomisations at all.... for example I like to use only sleep for 1 or 2 seconds max whenever a sleep is needed and force excellent throw all the time. |
… rng everytime we call them...
|
It seems to be working fine as far as I tested. |
| return 1.0 | ||
|
|
||
| """ | ||
| def _visualize(): |
There was a problem hiding this comment.
Why there is a big piece of commented code?
There was a problem hiding this comment.
_visualize was used to draw graphs to check the distribution of rng (which I showed in #1980,) to verify that there are no anomalies at the bounds etc. Suppose you use a gaussian of mu=0.5, with big std. If you clip the min and max value between [0, 1], then you will see pillars at 0 and 1, which is not nice as a rng to replicate human behaviour.
It should be useful for future rng development, however, the CI failed due to "import seaborn" line in the function (which is never used or called in the actual app, but detected by CI,) so I decided to comment them out rather than erasing.
The other function (_precalc_lognormal_ping_param) was used to calculate parameter for the log-normal. It uses theano, and since it is somewhat heavy task, I precalculated some of them and commented out for same reason, just incase we want to calculate other parameter for log-normal that generates our desired random value.
|
I've been testing this locally merged with the latest dev @ 138b664. Everything works with a simple manual merge of the new config options. I'm seeing a lot of drift and reflex with both replicate_reflex and replicate_gps_noise set to true. It makes it very difficult for the path worker to follow a path when they're rubber-banding. I also noticed that with the default values and the above two flags set to true I received a soft-ban pretty regularly. I was able to fix this using the following config options:
|
|
The changes related to throwing pokeballs seem to working well. I'm missing a decent amount of throws and my stats are starting to look more 'normal' however I'd really like it if there was a VIP flag that would let me do a perfect toss for pokemon in that group. I just missed a snorlax with 3 ultraballs and then he fled. |
|
Just saying that if you think this will protect you from bans, it won't. There are much easier ways for Niantic to detect and ban all bots user base (not just ours). |
|
@douglascamata yeah the stuff getting sent in the signature is pretty telling. |
|
@douglascamata @peter-bonanni |
|
At this point, the issue is whether to centralize the human_behavior config (this PR,) or split each config to each task's config (like current dev catch_pokemon.) ... |
|
@kanemasa1987 I think split in each task's config is better, imho. |
|
I will close this PR and resend GPS part later. |
"Updated"
Short Description:
Added somewhat better rng to replicate a human player.
Added Config class so that the behavior is customizable by user.
#1980, merging branch was wrong.
New Features
Fixes: