Conversation
|
@MikeDX what about extracting softban unban feature into a worker that runs every tick, checks |
|
@douglascamata So, to do this: if bot banned: resume normal operation |
|
SoftBanFixWorker: Add this detail to SeenFortWorker And this SoftBanFixWorker should be added as first element of the worker list, to run first. |
|
Ok, makes sense. should the unban worker be in the root, or as a cell worker? (guessing root) ok it should be a cell. I'll get a new push done soon |
|
@douglascamata How would you suggest we keep the nearest fort between ticks, since currently it is doing its job but moving between forts to try to fix each tick which isn't what we want. |
|
New worker created, removed lots of output when iterating through the spins. Works well, although takes about a minute to complete. Also checks for lures after the ban is lifted |
|
Resolved conflicts / rebased to dev |
9c43129 to
a1f3aeb
Compare
|
Can't wait to see this PR merged |
|
Ah excellent, I really hope this works as expected. It will be a very nice feature to auto-unban. |
|
@MikeDX actually we want it to recalculate the nearest fort at every tick. It should work without |
a1f3aeb to
fe36d88
Compare
|
@douglascamata Using nearest every tick moves to the next one instead of spinning the same stop - I don't think we do want that! Actually if you do want to do it that way, then just scrap the unban worker completely and just don't catch pokemon if banned, and let the bot wander around pokestops until it unbans itself |
fe36d88 to
936b09e
Compare
|
rebased to dev + squashed again. |
|
@MikeDX but |
|
@douglascamata I'm not calling that method or using SpinNearestFort anymore - it doesnt need it. The first time the bot runs, banned = false then it goes through the list, eventually calling SpinNearestFortWorker which does set the nearest_fort value. Even if CatchVisiblePokemonWorker sets the ban to true before SpinNearest runs, SpinNearestFortWorker will still execute and find a stop regardless, so any time the bot is banned and SoftBanWorker is called, it will always have a stop to go to. |
|
@MikeDX hum, I see now. I think of another option other than the attribute As simple as seen in |
|
#1578 makes it even better! Fort search is not in |
|
@douglascamata Would have been handy to have that answer, when I asked the question 7 hours ago... how does #1578 make it better? That method still excludes the forts we have spun recently, which again is not what we want. |
|
#1578 |
|
That sort by distance logic should probably be pulled out as well, we use it in a bunch of places. Side note, @douglascamata I think we need a new place for those types of functions that aren't the bot class. |
|
@TheSavior yes, we need refactor like #1253. But who wants to test/merge? :P |
Limited output when trying to unban
936b09e to
6885cca
Compare
|
@douglascamata I have updated the bot to get its own fort position, but since that function is not yet merged, I have replaced it with my own for now. |
|
@TheSavior give a thumbs up here... I update the SoftBanWorker to use your utility functions after we merge our PR. |
| self.check_session(self.position[0:2]) | ||
|
|
||
| workers = [ | ||
| SoftBanWorker, |
There was a problem hiding this comment.
This should probably be down the list, right before catching pokemon. Since the bot can still transfer and evolve while banned.
There was a problem hiding this comment.
@TheSavior but which pokemon would you transfer or evolve that you didn't the last tick if you cannot catch?
There was a problem hiding this comment.
That's a good point, at least with the current behavior of the workers we have.
|
|
||
| def work(self): | ||
| if not self.config.catch_pokemon: | ||
| if not self.config.catch_pokemon or self.bot.softbanned: |
There was a problem hiding this comment.
we shouldn't need to change this
There was a problem hiding this comment.
it will waste pokeballs if we don't do this
There was a problem hiding this comment.
It will never get to this worker since the softbanned worker returns RUNNING
There was a problem hiding this comment.
If there are more than one pokemon within range, yes it will
|
|
||
| if dist > 10: | ||
| logger.log('Moving towards fort {}, {} left'.format(fortID, format_dist(dist, unit))) | ||
| if self.bot.softbanned == False: |
There was a problem hiding this comment.
We shouldn't be changing this either.
There was a problem hiding this comment.
This is about the only merge comment I agree with!
|
@TheSavior @douglascamata Can I suggest one of you take what I've done and do all the testing and re-implementation of what I have done since you don't agree with any of this pull request. Some of your comments seem to suggest you don't even understand what your own code is doing! |
|
Thanks for working on it @MikeDX |
|
I did a lot of testing yesterday and spent many hours on it getting it to work as it should and bent it to fit "the rules" Since closing this pull request, dev has changed multiple times and a lot has changed meaning most if not all would have to be re-done. I made a lot of changes to rebase with dev, and it still isn't working properly. One worker returns "11" or "0" - whatever that means, certainly not a SUCCESS or RUNNING value. As with my previous pull request, I'm not really willing to waste any more time on it for it to be glossed over and nitpicked. See above comments on the code - almost every single one was based upon a misunderstanding of what the problem was and how to fix it. I have participated in multiple open source projects in the past and I have never seen such a crazy set of rules for merging code before - it is totally hit and miss here. I see garbage merged into the code that breaks the whole system, and even with syntax errors with tabulation, yet when I submit working, tested code, it is pulled apart for not being done in a certain way - and then nitpicked again by someone who did not even understand the problem in the first place. Frustrating and absolutely crazy. |
|
@MikeDX, I hear you and I definitely agree, I did not understand the problem and your solution as a whole while I was reviewing it. Our goal on this project is to be as inclusive as possible and to help contributors feel as good as possible contributing. We failed on this one, and that is entirely my fault. We definitely want to get this feature in, it is valuable to many people using this bot. I understand the lack of interest you have iterating on this more without a clear path to success. Recognizing that, we will probably need to spend our time doing it. Because you deleted your branch, we will probably have to pull out the functionality from the diff itself. We are overwhelmed with pull requests and tend to do a first pass on reviews just pattern matching on the common issues we've seen. Typically that includes things like: implementing a feature that requires changes to lots of workers, workers calling other workers, and PRs that say they do one thing and then actually change a bunch of other things as well. Unfortunately, I pattern matched this PR to the first case, which was not fair to this PR and the work you've done. When spending more time looking at it and making sure I understand the things actually being done, it makes more sense. Again, this is my mistake and thus I need to remedy that by getting this functionality added. I hope this experience won't completely put you off from this project, we always want to value quality contributions and quality contributors. Thank you for contributing this PR. |
|
@TheSavior I appreciate what you are saying, but pull request 1724 is shockingly bad and @douglascamata didn't even follow his own advice that he told me to do after my original commit! I really hope you get your act(s) together on this project. It showed so much promise but arrogance and a certain level of ignorance has definitely put me off almost entirely now which for me is a real shame as there is absolutely no motivation to work on a feature or bug fix since submissions are so poorly vetted. |
|
See issue #2049. As I said before, I have contributed to many projects both open source and within professional environments and this is easily the worst managed one I have ever come across. |
Short Description:
Upon detection of a softban, bot will stop wasting balls and berries on pokemon and travel to a pokestop to try to unban itself.
Fixes:
Softban from travelling too far / quickly
Some small grammar changes (seem -> seems)