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

Improvements to step walker #4097

Merged
merged 1 commit into from
Aug 19, 2016
Merged

Improvements to step walker #4097

merged 1 commit into from
Aug 19, 2016

Conversation

alexyaoyang
Copy link
Contributor

@alexyaoyang alexyaoyang commented Aug 16, 2016

Improvements to step walker:

Continued from #4025

Improvements:

  • Simplify code for randomization
  • Handles corner cases such as walk_min>walk_max (by uniform()).
  • If walking speed is 0, throw an exception telling users that walking speed should be more than 1.

@mention-bot
Copy link

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

self.speed = self.bot.config.walk_max - random() * (self.bot.config.walk_max - self.bot.config.walk_min)

self.destLat = dest_lat
self.destLng = dest_lng
self.totalDist = max(1, self.dist)

if self.speed == 0:
self.speed = uniform(3,5)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose we might have folks who sometimes want to have a speed of 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@douglascamata Your input please, why is the bump needed/necessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original idea was that if walk was 0, then we should teleport straight to our destination. Aka, do it in a single step. I'm not sure that is actually possible anymore with the code that is on line 26. We should make sure we fix that functionality.

Copy link
Contributor

@mjmadsen mjmadsen Aug 17, 2016

Choose a reason for hiding this comment

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

Oh I see it now. With the speed bump, we're setting steps = 1 so line 38 still evaluates as true and thus teleports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TheSavior I see what you mean. I will fix it. Just making sure, by fix I assume fix to remove? According to @douglascamata, we should have it removed asap.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say remove the whole teleport business. If that's a thing we want to have, it should be configurable - but I don't think most people even know it's currently a thing.

@mjmadsen
Copy link
Contributor

Bit off topic (still related to walker), but we could probably swap this line:
self.speed = self.bot.config.walk_max - random() * (self.bot.config.walk_max - self.bot.config.walk_min)

With this:
self.speed = uniform(self.bot.config_min, self.bot.config.walk_max)

Probably should have done this originally, but I'm still learning python.

@alexyaoyang
Copy link
Contributor Author

alexyaoyang commented Aug 16, 2016

@mjmadsen Thanks for pointing that out. I can make that change later, no problem. Let's see what @douglascamata says with regards to your comment above and I'll make the changes all together.

@alexyaoyang
Copy link
Contributor Author

@TheSavior Ok, removed teleportation from step walker and simplified the code too.

self.steps = 1
else:
self.steps = (self.dist + 0.0) / (self.speed + 0.0)
self.speed = uniform(3,5)
Copy link
Contributor

@BriceSD BriceSD Aug 17, 2016

Choose a reason for hiding this comment

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

Maybe someone wants to set walk_min and walk_max to 0. Maybe today it makes no sense, but it could be useful later on.
It’s better imo to set a default value to walk_min and walk_max when retrieving them from the config file, if they are not in it.
Kinda like

        self.walk_min = self.config.get("walk_min", 3)
        self.walk_max = self.config.get("walk_max", 5)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BriceSD We are already retrieving from those config fields prior to calculating the speed here. I guess we should make a decision here whether to bump up the speed or not when the speed is 0, as @douglascamata mentioned in #4025.

Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand it, he wants to remove the teleport thing. Currently it teleports when the speed (so walk_min/max) is equal to 0.
I’m suggesting to remove this as well (so no more self.steps = 1) and add the possibility to set walk_min/max to 0. This way you can force your bot to stay still (between 6 lured forts for example) and catch pokemons (currently catching pokemon would make you move).
Also having a safe default choice is a must have. With the 2 lines I’ve shown you, you got it as well (ofc you have to place them before computing the speed).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BriceSD Rest assure that I fully understand your point, having a default is always good. I also agree with you that settings the walk speed to 0 is a easy method of making the bot stand still.

On top of removing teleport, he also wants to bump up any calculated walking speed of 0 to 4.16 ( #4025 ), which is exactly what you don't want. I think we should have more suggestions before I make more commits. Inputs needed @TheSavior @mjmadsen @douglascamata

I'll be happy to make the edits after we reach an agreement as there seem to be some discrepancy in this matter.

On another slightly related matter, to make the bot stand still, I think a clearer way is to not have any Move or Follow tasks. Allowing the bot to move during CatchPokemon task doesn't sound right to me at all. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nvm it doesn’t move, only MoveToMapPokemon does.
Maybe I misunderstood what he said. Oh well, he’s the the most qualified person for that one. Better wait him.

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 17, 2016

We apply default values if either walk_min or walk_max are not specified in the config.

As far as I can tell, @douglascamata wanted to bump the speed up so that we wouldn't fall into teleporting. But if that is removed, I don't see much of a reason to bump the calculated speed up. I personally like the idea of being able to set the range from 0 to X, as a real player might not always be moving when not catching, getting a stop, etc. There may be another reason we want to prevent this that I am not aware of.

We can remove the import on random now since we're only using uniform.

@alexyaoyang
Copy link
Contributor Author

@mjmadsen @BriceSD Ok I've pushed in the edits. We now allow max_walk and min_walk of 0. Note that the bot will still walk very very very slowly, since division by 0 is not possible. The best way to make the bot stand still is to not have any Move or Follow task 👍

@TheSavior
Copy link
Contributor

I'm confused. Historically, walk being 0 means that it jumps straight to the destination. It does not mean "don't walk".

@mjmadsen
Copy link
Contributor

The logic to teleport in case of speed = 0 was removed from this branch.

@alexyaoyang
Copy link
Contributor Author

@TheSavior A decision was made to remove teleportation here because it results in super fast ban, refer to #4025 for earlier conversation. Do you have other opinions?

@TheSavior
Copy link
Contributor

Okay, that seems fine to remove teleportation.

Why would anyone want to set walk to 0? Why would cause them to do that over just removing the move tasks from their config?

If there aren't good reasons why someone would want to keep the move tasks and have a walk of 0, then I'd rather we just raise an exception if people set walk to 0. Using some min or max python number seems pretty sketchy. And since it is exact opposite behavior from what was there before, it seems more reasonable to throw so that people know we are removing that functionality.

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 19, 2016

@TheSavior My thought was that users may want to add in this movement variance. Someone playing the app might sometimes take a step and stop, or stand in one place for a moment, so forth. Such users can then set min to 0. Anyone who doesn't want such behavior can use a higher minimum. Sorry if I gave advice that contradicts our goals. I just don't quite see the need to prohibit such variance. Anyone whom enters 0 as a minimum would probably expect they will sometimes barely move.

@TheSavior
Copy link
Contributor

TheSavior commented Aug 19, 2016

The problem is that if you are randomly choosing between 0 (or near zero in this case) and something else, if 0 is selected, the whole bot will essentially stop working. maxint on a 32 bit system will be 2147483647. That means if it happens to select that, it will take 2,147,483,647 steps to reach their destination. Effectively meaning the bot will never get to its destination. Even if it runs for it will never happen. If we tick once every 3 seconds, it would take the bot 74 days for it to hit its destination. I don't think anyone actually wants that behavior to randomly occur.

If we don't want to throw, I propose that we take max(config_min, 0.1), the max of their min configured speed and some normally small number, like .1. I think since we are changing the value of what the user entered, we should also put in a log message saying that their config walk min should be a positive number.

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 19, 2016

@TheSavior Oh! step is called recursively? So if we had a very low speed generated, it would be stuck in the call? Sorry to keep you vested in such a small decision.

@alexyaoyang How about we forgo the whole mess and just throw an exception as @TheSavior suggested (if walk_min less than 1 or something in there).

@mjmadsen
Copy link
Contributor

Added minimums #4269

@alexyaoyang
Copy link
Contributor Author

alexyaoyang commented Aug 19, 2016

@TheSavior @mjmadsen Sounds good! Throwing an exception when walk speed is 0 is logical. I've pushed in the changes.

@alexyaoyang alexyaoyang reopened this Aug 19, 2016
@alexyaoyang
Copy link
Contributor Author

@mjmadsen @TheSavior All set and ready!

@mjmadsen mjmadsen merged commit cd841b0 into PokemonGoF:dev Aug 19, 2016
@TheSavior
Copy link
Contributor

Thanks guys

@mjmadsen mjmadsen mentioned this pull request Aug 19, 2016
@MZorzy
Copy link

MZorzy commented Aug 19, 2016

@TheSavior 74 day? fix speed fro a point to b point is not 'human'
and no stop is unre too x2

solderzzc added a commit that referenced this pull request Aug 21, 2016
* Do not spin fort on timeout when restarting the bot (#3931)

Fix bot stuck between forts when inventory is full

* Fixed references to self.bot.config.walk (#4046)

* Fixed error

* Fixed error

* Updating run.sh and install.sh (#4033)

* Update run.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Fixing typo

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second. (#4058)

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second.

* Added example in config.

* heartbeat_threshold using time delta (#4095)

* changed hearbeat threshold to work on a delta time

* renamed variable for clarity

* tidy up

* Fixing live stats crash on first run (#4088)

* try to fix system platform in init.py (#4068)

Fix for other system we don't know but should run without problem.

* Fix get_top_rank (#3823)

Refresh inventory when opening it
Do not use rare pokemon to xp
Fix an issue when use_lucky_egg=true and evolve_only_with_lucky_egg=false
Save web inventory after refresh
Add parameter evolve_time default to 20.
Rename parameter use_candies_for_xp in evolve_for_xp
Rename parameter minimum_evolve_for_lucky_egg in evolve_count_for_lucky_egg
Rename parameter use_lucky_egg in may_use_lucky_egg
Add 1 percent rule = Do not use rare pokemon candies for xp
Handle lucky egg already active case
Plan bad Eevees for transfer if evolve is deactivated

* Enhancement/sleep schedule check if current sleep is over (#4031)

* SleepSchedule check if current sleep period is over

Enhances #2193

* Add config field "skip_current_sleep_cycle"

* Edit sample config files to include skip_current_sleep_cycle

* Remove skip_current_sleep_cycle

* Add one more check for current sleep

* MoveToMapPokemon: Replacing min_time with reachable distance calculation (#4022)

* * replacing min_time functionality of MoveToMapPokemon by a more sophisticated way of determining reachability on time

* * fixing #3609

* moving config values to top

* Make PokemonOptimizer calculate correct transfer / evolve groups (#4099)

* Humanize & better app simulation for catches (#3872)

* changed 2 second delay between retrying throws to use action_delay
minimum delay is 2 seconds

* quick randomise 2,4 or 6 secs between failed throw and next throw to simulate app better

* added config option to turn randomize_flee_duration off (default = on)

* configurable delay for throwing balls

added action_delay when changing ball or using razzberry

* moved delay for razzberry to more appropriate place

* updated config files with catch_wait_min and catch_wait_max

* updated config files with randomize_flee_duration

* grouped catch simulation and humanization settings
added settings for all catch related sleeps

* Changed the logic for randomly choosing a sleep for flee animation to something reasonable

* docs
clean up import

* re-Wording followPath to more readable, recycle_items.should_run should accept <= for min_empty_space: 0 (#4105)

* re-wording follow path, inventory should have -1 value instead of 0

* remove unused

* refactor: inventory.get_space_left should return 0 so change conditions from recycle.should_run instead

* Send bot through Tor (#4108)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Update setup.sh (#4117)

* Update run.sh (#4123)

typo

* Fixing values on UpdateLiveStatus (#4127)

* Updated wiki, explain how to use Docker under Windows (#4136)

* Bring together CatchVisiblePokemon & CatchLuredPokemon in config (#3966)

* CatchPokemon calls CatchLuredPokemon and CatchVisiblePokemon methods.

Config now only needs one catch related worker.  All catch related config including option to catch lured and/or visible can be kept with the task.

* example config

* indentation

* defaults for catch_lured/visible_pokemon

* deprecated command line options for throw parameters

* catch_throw_parameters defaults match config.json.example

* added deprecation functionality for CatchVisiblePokemon and CatchLuredPokemon

* min_ultraball_to_keep default reflects example config

* tree_config_builder_test uses CatchPokemon instead of CatchLuredPokemon

* deprecation warning message

* catchsim config moved to CatchPokemon

* updated example configs

* updated docs

* User configurable delay when spinning fort (#4109)

* user configurable delay for spin fort

* replaced time.sleep(2) with configurable delay

* updated configs

* fix followCluster & MoveToMapPokemon (#4115)

* * fixed followCluster not following lured clusters because of outdated pokestop data structure
* fixed very annoying followCluster wording (OCD senses were tickling)
* fixed #4022

* no message

* string formatting

* correcting message to display lured only when walking to lured cluster

* message formatting

* forgot to add regester event variable

* Showing detailed sleep info (#4066)

* Windows installation instructions refit (#3898)

* Delete PokemonGo-Bot-Repair.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Removed an update procedure that was making the map not to work.

* Update installation.md

Modified Windows installation instructions to use the batch files.

* Update PokemonGo-Bot-Install.bat

Added links for the configuration instructions. Still missing links for the encrypt files. Need help on it.

* Update manual_installation.md

Recreated the installations instructions for Windows.

* Update installation.md

Removed the need to download PyYAML and modified the instructions to download only the required encrypt files.

* Update manual_installation.md

Removed the requirement to download PyYAML as the installer already downloads it during git pull. Also removed the requirement to download all encrypt files.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Added a pause in the end so the promp wont close in the end if `pokecli.py` goes to error.

* Update PokemonGo-Bot-Install.bat

Added a procedure to deal with the installation path issue. Also, added a command to install protobuff automatically.

* Update installation.md

Removed the requirement to install protobuff as it will be installed automatically by the install batch.

* Update PokemonGo-Bot-Install.bat

* Update manual_installation.md

Removed the requirement for protoc and added command line to download it.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Updated in order to work anywhere as long its inside the windows_bat folder

* Update PokemonGo-Bot-Install.bat

* Update installation.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Update CONTRIBUTORS.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Revert "Update CONTRIBUTORS.md"

This reverts commit 856a0fd.

* Revert "Delete PokemonGo-Bot-Repair.bat"

This reverts commit a459a86.

* Revert "Update PokemonGo-Bot-Start.bat"

This reverts commit 510570d.

* Revert "Update PokemonGo-Bot-Install.bat"

This reverts commit 9db2798.

# Conflicts:
#	windows_bat/PokemonGo-Bot-Install.bat

* Complete refit of all batches

We can now choose an install location and all required software is
automatically installed.

* Added contributors

Added new contributors

* Revert "Added contributors"

This reverts commit a1d364c.

* Deprecate action_wait_min/max in favour of task specific options (#4048)

* RecycleItems uses it's own recycle_wait_min/max instead of action_wait_min/max

* TransferPokemon uses it's own transfer_wait_min/max instead of action_wait_min/max

* PokemonOptimizer uses it's own transfer_wait_min/max instead of action_wait_min/max

* Deprecated action_wait_min and action_wait_max

* fixed mistake

* Update update_live_stats.py (#3985)

* SQLite backend for bot/plugin use (#4129)

* Initial attempt at implementing an SQLite backend for plugin use

* Fixed attribute error when accessing DB

* Patch snipey in move_to_map_pokemon.py (#4146)

to solve issue #4142

* Add files via upload (#4151)

* fix example config

* fix config file

* added a script to check json, and updated .travis.yml

* Update json-validate.py

* Documenting docker-compose with Tor (#4161)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Docker documentation update

Including example command for using the alternate tor proxy command. Additionally changed line 114 to down rather than rm so that the containers are stopped before they are removed in the case that the containers were launched in detached mode.

* Remove `,` at line 112 (#4171)

* Minor config fix (#4173)

Fixes indent

* Fix no pokeballs log spamming (#4000)

* Fix looping between equidstant pokestops

* :D

* emp

* changes

* fix no pokeballs log spamming, fix possible bug

* remove unnesscessary return

* revert pokemongo_bot/cell_workers/move_to_fort.py

* solve merge conflicts

* Remove extra whitespace

* Further SQLite efforts to ease usage via `bot.database`. (#4179)

* Check for tutorial completion (#4070)

* Use empty default username for nickname
On gmail accounts, it would be suspect to have @gmail.com in nickname
Nickname is not set if user does not set one in config

* Fix typo

* Fix result key name

* Moved to own task

* Add example in config

* Rebased to latest dev on top of :
Fixing live stats crash on first run (#4088)
in order for the bot to reach the task without crashing

* damn thos DOS line endings

* fix json

* Fix to prevent meltdown when migrations are not present for a Datastore (#4183)

* Added Daily Catch Limits & Catch Log (SQL) (#4188)

* Update pokemon_catch_worker.py

* daily_catch_limit

* create catch_log.py

migration

* Update pokecli.py

* catch_limit

* catch_limit

* Update config.json.cluster.example

* Update config.json.map.example

* Update config.json.optimizer.example

* Update config.json.path.example

* Update config.json.pokemon.example

* Update pokemon_catch_worker.py

* Update pokemon_catch_worker.py

* Create catch_log.py

* Update configuration_files.md

* Delete catch_log.py

* Add throw type to threw_pokeball message (#4199)

* Keep by best hp max (#4144)

* Updated wiki, explain how to use Docker under Windows

* Add keep_best_hp_max to keep pokemon with the best potential hp

* Add example of keep_best_hp_max in config

* Keep best pokemon by custom criteria order

* Correct list of criteria. Add example in config.

* Update documentations for keep custom pokemons

* Replace the important | for the set

* Clean the charmander comment

* Latitude and Longitude in UpdateLiveStats (#4196)

* Added an option to show location in UpdateLiveStats

* Fix error

* stop catching pokemon if we do not have pokeballs (#4168)

* stop catching pokemon if we do not have pokeballs

* uses global constant

* The catch event should only emit when caught success. (#4200)

* Fixed Encrypt file name in Windows (#4193)

* Random pause task (#4202)

* Updated wiki, explain how to use Docker under Windows

* Add keep_best_hp_max to keep pokemon with the best potential hp

* Add example of keep_best_hp_max in config

* Keep best pokemon by custom criteria order

* Correct list of criteria. Add example in config.

* Update documentations for keep custom pokemons

* Replace the important | for the set

* Clean the charmander comment

* Add task random pause

* Add random pause in config

* Add todo for the raising errors if min > max

* Upgrade to the latest pgoapi. (#4206)

* Upgrade to the latest pgoapi.
8c1c17637be0aa679d92e582e6c4dd1370a3ac00

* Changed for pgoapi upgrade.

* Upgrade for new pogapi version.

* Switch to 12b2028cbf19342efd971020033027802b569769 of pgoapi, the latest doesn't work.

* show what kind of egg is being hatched (#4219)

* Add spin message (#4226)

* List Pokemon bag at bot start (#4189)

* - Added option to print Pokemon Bag when bot starts
- Using self.logger to log multiple lines

* Little code change
- Some progress making it customizable, to be possible to choose which info to show from each pokemon to show

* Update ListPokemonBag functionality

* Code tweaked to use inventory
* Nested config with 3 parameters
* Configs to change settings: show amount of each pokemon; pokemon info to show
* Added config example to all config example files

* typo fix

* Added UpdateLiveInventory config (#3950)

* Added UpdateLiveInventory function

* Added UpdateLiveInventory function

* Fix no EOF empty line

* Updated UpdateLiveInventory function, more customizable now

* More configs on UpdateLiveInventory

* - Changed to self.logger instead of event when using multiple lines config
- When using multiple lines config emits event at debug level

* Minor tweak and merge with PokemonGoF/dev

* Fixed config.json.example

* Updated CONTRIBUTORS.md

* Removed proto folder, we don't need it anymore.

* Removed the old inventory / only one call to the api (#3948)

* Removed every call to the old inventory
Added some messages to monitor item inventory
Added some methods needed on the new inventory

* Removed print

* Removed print

* Keeps track of candy on pokemon catch

* Dynamically count candy gained

* Rename pokemon id in pokemon unique id

* Fixed typo
Some clean up

* Renamed pokemon id in unique_id

* Now display again stats on start

* Now use ultraball on non vip too

* Merge branch 'dev' of https://github.com/PokemonGoF/PokemonGo-Bot into remove-old-inventory

# Conflicts:
#	pokemongo_bot/__init__.py

Now move to map use cached inventory
Removed log.logger()

* Minor fixes after removed the old inventory (#4231)

* Pokestops / Evolves / Transfers Logged to DB (#4232)

* Pokestop Logging

* Evolve Logging

* evolve_log.py migrations

* transfer_log.py migration

* pokestop_log.py migration

* Update transfer_pokemon.py

* Update transfer_pokemon.py

* Revert "Pokestops / Evolves / Transfers Logged to DB" (#4239)

* Hotfix/remove old inventory (#4238)

* Updated configuration documentation after #4005

* Updated configuration documentation of walk

* Renamed id in unique_id
Added functions to get pokemon inventory size

* Removed variable used for test purpose

* Computing candy awarded instead of taking only the first value

* Reverted to use json again

* Calling the api instead of the removed inventory

* Fixed #4237
Not calling old inventory to get available lucky egg count

* Polyline rework (#3854)

* added better rng

* forgot adding

* rework on polyline

* remove wrong files...

* remove wrong files...

* reverting unnecessory change...

* minor fix

* get the CI pass

* fix test

* minor fix

* Features/missed throws (#4107)

* Adds a missed shot opportunity. This will reduce the 100% hit rate and humanise the throwing behaviour.

* * Added the new value to config.json.example.
* A little house cleaning

* Fixing error in logic

* Changing sleep for action_delay

* * Updated config example
* Fixed simulation changes

* Fixes bugs

* Configurable altitude range  (#4250)

* Added alt_min/alt_max

* Changed default values

* Added alt

* Cleaned up speed calc

* Added altitude randomness

* Added altitude randomness

* Added altitude randomness

* Fixed import

* Added altitude randomness

* Added altitude randomness

* Fixed import

* Added alt_min/alt_max

* Added alt_min/alt_max

* Added alt_min/alt_max

* Switch to walk_min, walk_max

* Added alt_min/alt_max

* Added alt_min/alt_max

* show commit hash info (#4244)

* add commit hash info

* check if the hash if a valid hex

* Hotfix for inventory and pokemon optimizer (#4258)

* Hotfix for inventory and pokemon optimizer

* Better code

* Small fixes for altitude (#4265)

* Small fix for alt

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Changed default alt values (to meters)

* Small change

* Show eggs count (#4263)

* Start to use the signature interface. (#4245)

* Start to use the signature interface.

* Added dummy class to show how to use:
DeviceInfo
ActivityStatus
SensorInfo

* sensor data is randomly generated (#4249)

* including activity status details resulted in uk6 fail (no map objects), need more iOS dumps to identify the issue

* Switch the upstream of pgoapi to joelgreen, he will handle the upupstream PR as well.

* Impose minimum on walk/alt minimums (#4269)

* fix setup.sh (#4155)

* improve step walker (#4097)

* Init self.alt (#4271)

* Init self.alt

* aded import uniform

* fix

* Fix altitude and walker_factory usage (#4254)

* Fix: Correct usage of alt in move_to_map_pokemon

* Fix: Correct usage of walker_factory

* Only walk towards Pokemon when total of balls >= min_ball

* Login table check (#4277)

check to see if login table exists before attempting record insert

* Catch_Log table check & database log events (#4280)

* Catch log table checks

Ensuring catch_log table exists before inserting record to db

* Log events (for database stuff)

real quick

* Database log events

* register_event pokestop_log

* pokestop_log log event

* Existing Table Checks (in migrations) (#4273)

* table check

* Existing Table Check

* Fix bug (#4276)

* Update alt to last-location (#4278)

* Evolve / Transfer / Pokestop logs (DB) (#4285)

* Log pokemon evolves to the database

with safety check on table existing

* Log pokestops to database

logs all pokestops to the database (will be used to limit pokestops per "time"), included safety check to ensure table exists before inserting

* evolve_log.py

* transfer_log.py

* pokestop_log.py

* Update CONTRIBUTORS.md

* change color for both update live stats and inventory (#4230)

* Signatureconfig (#4287)

* pass config into ApiWrapper and use md5 hash of username for device_id

* update to pgoapi which increments version number from 1.1.6 to 1.1.7

* include location fix in the signature, note in the future we will need a batch of location fixes per second

* use @ instead of /commit

* new api with google login fix

* include unknown25

* Salt hash for device_id (#4289)

* salt the hash

* Update config.json.example

* Update config.json.cluster.example

* Update config.json.map.example

* Update config.json.optimizer.example

* Update config.json.path.example

* Update pokecli.py

* Update api_wrapper.py

* Update config.json.cluster.example

* Update config.json.example

* Update config.json.map.example

* Update config.json.optimizer.example

* Update config.json.path.example

* store device_id to file

* Update api_wrapper.py

* Update pokecli.py

* Dump device_id salt to file in data (#4294)

* Dump device_id salt to file in data

* Use previous salt if it's already stored

* Berry usage threshold (#4295)

* berry threshold

* edit example configs

* Correct sort on keep best custom (#4242)

* Only go through CompleteTutorial once at launch (#4296)

* Changes to the Windows Batches (#4213)

* Delete PyYAML-3.11-cp27-cp27m-win32.whl

Not needed anymore

* Delete PyYAML-3.11-cp27-cp27m-win_amd64.whl

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

Added virtualenv to the installation.

* Update PokemonGo-Bot-Install.bat

Fixed typos

* Fixed backup restoration procedures.

* Additional fixes to the backup procedures.

* Update PokemonGo-Bot-Install.bat

Added a function to treat /

* Fixed treatment for / in the path

* quick fix

* Update api_wrapper.py

* Refactor the hash & salt code (#4300)

Simplify logic for using the config and/or device file information

* Softban Tracker (#4299)

* Log softbans + source / date to database

* Log softbans + source / date to database

* Update __init__.py

* Update colored_logging_handler.py

* Create softban_log.py

* re-add new berry stuff

* Updated "Seel" Moveset (#4302)

Added "Lick" to the Fast Attacks

* Assign VIP status based on NCP (#4177)

* Added NCP support to pokemon_catch_worker.py.

* Update pokemon_catch_worker.py

* Added missing initialization of ncp

* Incubate_eggs_merge

* Update pokemon_catch_worker.py

* Trying to set up appveyor for windows based CI (#3591)

* Trying to set up appveyor

* Set the path too

* Typo

* Referencing the path when installing

* Using os.sep

* Adjusted Movesets (#4306)

Added moves to Graveler, Grimer and Staryu

* Log Transfers (#4310)

missing from #4285

* Update pokemon.json (#4312)

Missing move

* Add "names" filter to apply sorting rules to selected families only (#4313)

Make sure optimizer try its best to reach the minimum evolve count if we want to use lucky eggs
Do not transfer favorite pokemon and pokemon in fort
Add database logging stuff
Update pokemon optimizer config example
Update pokemon.json

* Revert "Trying to set up appveyor for windows based CI" (#4317)

* Added default value for vip pokemon to prevent consider all pokemon as vip. (#4318)

* To fix CI build, working branch (#4319)

* To fix CI build in api_wraper.py

* added self.config is none to make CI happy.

* Add inventory hot-update to collect_level_up_reward (#4320)

* Minor fix (#4274)

* Gps noise (#3912)

* revert some unexpected changes

* added default argument to constructor to fix CI issue

* fixing wrong default value & added config example

* fixed alt issue and CI

* changed default not to use noise

* Fix diglett moveset (#4322)

* Dev merge to master, PR (#4178)

* Do not spin fort on timeout when restarting the bot (#3931)

Fix bot stuck between forts when inventory is full

* Fixed references to self.bot.config.walk (#4046)

* Fixed error

* Fixed error

* Updating run.sh and install.sh (#4033)

* Update run.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Fixing typo

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second. (#4058)

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second.

* Added example in config.

* heartbeat_threshold using time delta (#4095)

* changed hearbeat threshold to work on a delta time

* renamed variable for clarity

* tidy up

* Fixing live stats crash on first run (#4088)

* try to fix system platform in init.py (#4068)

Fix for other system we don't know but should run without problem.

* Fix get_top_rank (#3823)

Refresh inventory when opening it
Do not use rare pokemon to xp
Fix an issue when use_lucky_egg=true and evolve_only_with_lucky_egg=false
Save web inventory after refresh
Add parameter evolve_time default to 20.
Rename parameter use_candies_for_xp in evolve_for_xp
Rename parameter minimum_evolve_for_lucky_egg in evolve_count_for_lucky_egg
Rename parameter use_lucky_egg in may_use_lucky_egg
Add 1 percent rule = Do not use rare pokemon candies for xp
Handle lucky egg already active case
Plan bad Eevees for transfer if evolve is deactivated

* Enhancement/sleep schedule check if current sleep is over (#4031)

* SleepSchedule check if current sleep period is over

Enhances #2193

* Add config field "skip_current_sleep_cycle"

* Edit sample config files to include skip_current_sleep_cycle

* Remove skip_current_sleep_cycle

* Add one more check for current sleep

* MoveToMapPokemon: Replacing min_time with reachable distance calculation (#4022)

* * replacing min_time functionality of MoveToMapPokemon by a more sophisticated way of determining reachability on time

* * fixing #3609

* moving config values to top

* Make PokemonOptimizer calculate correct transfer / evolve groups (#4099)

* Humanize & better app simulation for catches (#3872)

* changed 2 second delay between retrying throws to use action_delay
minimum delay is 2 seconds

* quick randomise 2,4 or 6 secs between failed throw and next throw to simulate app better

* added config option to turn randomize_flee_duration off (default = on)

* configurable delay for throwing balls

added action_delay when changing ball or using razzberry

* moved delay for razzberry to more appropriate place

* updated config files with catch_wait_min and catch_wait_max

* updated config files with randomize_flee_duration

* grouped catch simulation and humanization settings
added settings for all catch related sleeps

* Changed the logic for randomly choosing a sleep for flee animation to something reasonable

* docs
clean up import

* re-Wording followPath to more readable, recycle_items.should_run should accept <= for min_empty_space: 0 (#4105)

* re-wording follow path, inventory should have -1 value instead of 0

* remove unused

* refactor: inventory.get_space_left should return 0 so change conditions from recycle.should_run instead

* Send bot through Tor (#4108)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Update setup.sh (#4117)

* Update run.sh (#4123)

typo

* Fixing values on UpdateLiveStatus (#4127)

* Updated wiki, explain how to use Docker under Windows (#4136)

* Bring together CatchVisiblePokemon & CatchLuredPokemon in config (#3966)

* CatchPokemon calls CatchLuredPokemon and CatchVisiblePokemon methods.

Config now only needs one catch related worker.  All catch related config including option to catch lured and/or visible can be kept with the task.

* example config

* indentation

* defaults for catch_lured/visible_pokemon

* deprecated command line options for throw parameters

* catch_throw_parameters defaults match config.json.example

* added deprecation functionality for CatchVisiblePokemon and CatchLuredPokemon

* min_ultraball_to_keep default reflects example config

* tree_config_builder_test uses CatchPokemon instead of CatchLuredPokemon

* deprecation warning message

* catchsim config moved to CatchPokemon

* updated example configs

* updated docs

* User configurable delay when spinning fort (#4109)

* user configurable delay for spin fort

* replaced time.sleep(2) with configurable delay

* updated configs

* fix followCluster & MoveToMapPokemon (#4115)

* * fixed followCluster not following lured clusters because of outdated pokestop data structure
* fixed very annoying followCluster wording (OCD senses were tickling)
* fixed #4022

* no message

* string formatting

* correcting message to display lured only when walking to lured cluster

* message formatting

* forgot to add regester event variable

* Showing detailed sleep info (#4066)

* Windows installation instructions refit (#3898)

* Delete PokemonGo-Bot-Repair.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Removed an update procedure that was making the map not to work.

* Update installation.md

Modified Windows installation instructions to use the batch files.

* Update PokemonGo-Bot-Install.bat

Added links for the configuration instructions. Still missing links for the encrypt files. Need help on it.

* Update manual_installation.md

Recreated the installations instructions for Windows.

* Update installation.md

Removed the need to download PyYAML and modified the instructions to download only the required encrypt files.

* Update manual_installation.md

Removed the requirement to download PyYAML as the installer already downloads it during git pull. Also removed the requirement to download all encrypt files.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Added a pause in the end so the promp wont close in the end if `pokecli.py` goes to error.

* Update PokemonGo-Bot-Install.bat

Added a procedure to deal with the installation path issue. Also, added a command to install protobuff automatically.

* Update installation.md

Removed the requirement to install protobuff as it will be installed automatically by the install batch.

* Update PokemonGo-Bot-Install.bat

* Update manual_installation.md

Removed the requirement for protoc and added command line to download it.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Updated in order to work anywhere as long its inside the windows_bat folder

* Update PokemonGo-Bot-Install.bat

* Update installation.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Update CONTRIBUTORS.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Revert "Update CONTRIBUTORS.md"

This reverts commit 856a0fd.

* Revert "Delete PokemonGo-Bot-Repair.bat"

This reverts commit a459a86.

* Revert "Update PokemonGo-Bot-Start.bat"

This reverts commit 510570d.

* Revert "Update PokemonGo-Bot-Install.bat"

This reverts commit 9db2798.

# Conflicts:
#	windows_bat/PokemonGo-Bot-Install.bat

* Complete refit of all batches

We can now choose an install location and all required software is
automatically installed.

* Added contributors

Added new contributors

* Revert "Added contributors"

This reverts commit a1d364c.

* Deprecate action_wait_min/max in favour of task specific options (#4048)

* RecycleItems uses it's own recycle_wait_min/max instead of action_wait_min/max

* TransferPokemon uses it's own transfer_wait_min/max instead of action_wait_min/max

* PokemonOptimizer uses it's own transfer_wait_min/max instead of action_wait_min/max

* Deprecated action_wait_min and action_wait_max

* fixed mistake

* Update update_live_stats.py (#3985)

* SQLite backend for bot/plugin use (#4129)

* Initial attempt at implementing an SQLite backend for plugin use

* Fixed attribute error when accessing DB

* Patch snipey in move_to_map_pokemon.py (#4146)

to solve issue #4142

* Add files via upload (#4151)

* fix example config

* fix config file

* added a script to check json, and updated .travis.yml

* Update json-validate.py

* Documenting docker-compose with Tor (#4161)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Docker documentation update

Including example command for using the alternate tor proxy command. Additionally changed line 114 to down rather than rm so that the containers are stopped before they are removed in the case that the containers were launched in detached mode.

* Remove `,` at line 112 (#4171)

* Minor config fix (#4173)

Fixes indent

* Fix no pokeballs log spamming (#4000)

* Fix looping between equidstant pokestops

* :D

* emp

* changes

* fix no pokeballs log spamming, fix possible bug

* remove unnesscessary return

* revert pokemongo_bot/cell_workers/move_to_fort.py

* solve merge conflicts

* Remove extra whitespace

* Update pokemon.json (#4308)

confirmed

* Revert "Update pokemon.json" (#4315)

* added Mud Slap to Diglett moveset

* added Mud Slap to Golem and Tackle to Starmie (#4325)

* reordered moves alphabetically (#4331)

* reordered moves alphabetically

* removed repeated line

* Fix unicode decode error (#4334)

* Fix: Check inventory for egg incubating (#4336)

* updated movesets (#4338)

* NoPlayerPositionSetException() after re-logging in (#4364)

* Polyline, Altitude bugfix and Polyline support for MoveToFort (#4350)

* bugfix for polyline

* leftovers

* changed default value of pokecli config aswell

* added fix for #4250

* fixed spiral aswell

* original current and last are wrong...

* seems it was ok, reverted partly...

* upside down

* changed message

* cleanup & polyline support for move_to_fort

* fixed default conf to StepWalker

* Transfert pokemon only when we don't have free slots (#4344)

* Transfert pokemon only when we don't have free slots

* Update configuration file

* Added tip

* Typo

* Added PokemonBag to UpdateLiveInventory (#4360)

* Added PokemonBag to UpdateLiveInventory

* Added documentation

* setup.sh: setting exec permission to the file (#4369)

It was not possible to execute the script with
'./'.

* Bug fix for bad PokemonGo-Map response (#4370)

* bugfix for polyline

* leftovers

* changed default value of pokecli config aswell

* added fix for #4250

* fixed spiral aswell

* original current and last are wrong...

* seems it was ok, reverted partly...

* upside down

* changed message

* cleanup & polyline support for move_to_fort

* fixed default conf to StepWalker

* fixed ValueError issue

* Display current candy count after evolution and transfer (#4352)

* Added FollowPath and UpdateLiveStats Settings (#4381)

Added FollowPath and UpdateLiveStats description. The UpdateLiveStats options are taken from the source code.

* Softban/Permban Slack Notifications (#4400)

* Ban Notifications (Slack) PokemonCatchWorker

* Update requirements.txt (slack notif)

* Update pokemon_catch_worker.py

* spin_fort.py slack notifcations

* Update config.json.cluster.example

* Update config.json.example

* Update config.json.map.example

* Update config.json.optimizer.example

* Update config.json.path.example

* Update config.json.pokemon.example

* pokecli.py slack variable

* Update pokecli.py

* Update pokemon_catch_worker.py

* Update spin_fort.py

* Update pokecli.py

* Revert "Softban/Permban Slack Notifications" (#4408)

* Fixed list_pokemon at startup (#4384)

* Fixes: Evolve (#4389)

- Add parameter `candy` to `pokemon_evolved` event.

- Fix PokemonOptimizer evolve problem with `pokemon_evolved` event.

- EvolvePokemon now correctly updates inventory even if evolve_log fails.

- EvolvePokemon now emits evolved event with xp & candy.

* Minor fixes and added updates to Configuration file (#4396)

* Minor update/fix
 * Fixed bad function call at update_live_inventory.py
 * Fixed 'Total eggs' only show not incubating eggs

* Updated configuration file

* Small fix

* Small fix

* Minor fix

* Fixed typo mistake
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.

None yet

7 participants