{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/717","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/717/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/717/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/717/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/issues/717","id":167253039,"number":717,"title":"Proposal: Stepper Refactor","user":{"login":"TheSavior","id":249164,"avatar_url":"https://avatars.githubusercontent.com/u/249164?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSavior","html_url":"https://github.com/TheSavior","followers_url":"https://api.github.com/users/TheSavior/followers","following_url":"https://api.github.com/users/TheSavior/following{/other_user}","gists_url":"https://api.github.com/users/TheSavior/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSavior/subscriptions","organizations_url":"https://api.github.com/users/TheSavior/orgs","repos_url":"https://api.github.com/users/TheSavior/repos","events_url":"https://api.github.com/users/TheSavior/events{/privacy}","received_events_url":"https://api.github.com/users/TheSavior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/new%20feature","name":"new feature","color":"bfd4f2"},{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/second%20review%20required","name":"second review required","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-24T20:42:25Z","updated_at":"2016-07-24T21:05:53Z","closed_at":null,"body":"We have almost refactored everything we need to start implementing the [behavior tree proposal](https://github.com/PokemonGoF/PokemonGo-Bot/issues/142). The biggest hurdle we have left (that I know of) is the current stepper.\r\n\r\nRight now the stepper keeps track of the spiral it needs to walk, and moves towards the center of each part the spiral, and then calls work_on_cell for each cell. In order for it to be compatible with an event loop style system (and thus the behavior trees), is for it to take a single step in the correct direction and update some piece of memory with the current cell, and then have work_on_cell run ​*after*​ the stepper and process that cell.\r\n\r\nEssentially what that would require is for the stepper to not walk ​*all*​ the way to its goal but to instead take a certain number of steps towards that goal and then return control to the rest of the program.\r\n\r\nMore concretely, I propose we split the current stepper into two parts:\r\n\r\n1. Utility class `walk_towards`\r\n2. Spiral Walker\r\n\r\nThe `walk_towards` class should keep track of where it was initialized, where it's end goal is and take steps in that direction every time a function like `take_step` is called. This same api would be able to be implemented with the current walk_towards, as well as a more complicated approach like the Polyline one in #697\r\n\r\nThe spiral walker would keep track of where it's center point is, and on every tick, do nothing if walk_towards hasn't finished, and if it has, call walk_towards to the next point. This would enable us to have different walkers. Such as one that walked to specified hotspots, or walked from LA to NY and back. \r\n\r\nAny thoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments/234802343","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/issues/717#issuecomment-234802343","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/717","id":234802343,"user":{"login":"MikeDX","id":853931,"avatar_url":"https://avatars.githubusercontent.com/u/853931?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeDX","html_url":"https://github.com/MikeDX","followers_url":"https://api.github.com/users/MikeDX/followers","following_url":"https://api.github.com/users/MikeDX/following{/other_user}","gists_url":"https://api.github.com/users/MikeDX/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeDX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeDX/subscriptions","organizations_url":"https://api.github.com/users/MikeDX/orgs","repos_url":"https://api.github.com/users/MikeDX/repos","events_url":"https://api.github.com/users/MikeDX/events{/privacy}","received_events_url":"https://api.github.com/users/MikeDX/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T21:05:53Z","updated_at":"2016-07-24T21:05:53Z","body":"Can I suggest we use the tsp package for this https://pypi.python.org/pypi/tsp\r\n\r\nFrom our starting location (wherever the bot starts) we should search the map around us (based on max steps) to find all the pokestops with the distance limit\r\n\r\nthen visit each one based on the solve() method of tsp\r\n\r\n"}}
{"actor":{"display_login":"MikeDX"}}