Skip to content

Comments

More variance to step_walker#3857

Closed
mjmadsen wants to merge 17 commits intoPokemonGoF:devfrom
mjmadsen:dev
Closed

More variance to step_walker#3857
mjmadsen wants to merge 17 commits intoPokemonGoF:devfrom
mjmadsen:dev

Conversation

@mjmadsen
Copy link
Contributor

@mjmadsen mjmadsen commented Aug 13, 2016

Switched walk to walk_max and walk_min
Removed unnecessary parameters in function calls
Added variance if target location is within range (do not land directly on pokestop)

Added 10% speed variance (speed in config = max).
Added random_lat_long_delta to location if we are close.
@mention-bot
Copy link

@mjmadsen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @TheSavior, @tstumm and @douglascamata to be potential reviewers

@douglascamata
Copy link
Member

@mjmadsen the speed variance needs to be configurable.

@mjmadsen
Copy link
Contributor Author

@douglascamata Changes applied.

@DiegoRBaquero
Copy link

The speed should be +/- not just -. You can achieve this with random()*2-1 (-0.999...0.999) instead of just random() (0...0.999)

def step(self):
if (self.dLat == 0 and self.dLng == 0) or self.dist < self.speed:
self.api.set_position(self.destLat, self.destLng, 0)
self.api.set_position(self.destLat + random_lat_long_delta(), self.destLng + random_lat_long_delta(), 0)

Choose a reason for hiding this comment

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

Where do these come from?

Copy link
Contributor Author

@mjmadsen mjmadsen Aug 14, 2016

Choose a reason for hiding this comment

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

human_behavior.py

I figured it would be better if we didn't move to the exact stop coord.

@mjmadsen
Copy link
Contributor Author

@DiegoRBaquero We can switch to +/- variance. My thought is walk is the max speed and we sometimes go slower than that. We could also switch to having a walk_max, walk_min and fetch a speed somewhere in there.

@DiegoRBaquero
Copy link

DiegoRBaquero commented Aug 14, 2016

I'd prefer a min-max setting rather than a variance. I'm searching for a good distribution to use.

@mjmadsen you commited while I was typing <3

@mjmadsen
Copy link
Contributor Author

mjmadsen commented Aug 14, 2016

@DiegoRBaquero Give me a bit and we should have a working setup for walk_min and walk_max in place of walk. I wasted too much time only to realize that distance_unit is only for display purposes and has no effect on the walk unit.

I need to diff merged stuff since I got off work. Soon.

@mjmadsen
Copy link
Contributor Author

I am new to git and having merge troubles. I'm going to shut this down and reopen after corrections.

@mjmadsen mjmadsen closed this Aug 14, 2016
@mjmadsen mjmadsen mentioned this pull request Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants