PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

[Feature Request] Run away #3654

Open smfbrooks opened 8 years ago

smfbrooks commented 8 years ago

Short Description

If a pokemon is encountered and the catch rate is calculated to be below 33% (or a user-defined chance) after using a better ball or a razzberry, the the encounter sound be abandoned, unless it is VIP.

Possible Solution

As a novice programmer, I have never worked on a project with so many files, so I would have a hard time implementing this on my own, however, for someone more familiar with the project, I think it would be relatively simple. The logic is fairly easy since we can already calculate the chance to catch, and use logic similar to this (but write that the pokemon will be ignored instead of vanished of course).

Benefits

WIth this new feature, management of pokeballs (especially greatballs at higher trainer level) and razzberries is improved. This helps pathing methods that don't prioritize pokestops such as MoveToMapPokemon.

smfbrooks commented 8 years ago

@GitPupper Very nice, however that's not always the case for everyone. My very unlucky bot actually threw 10 balls to a Jolteon today and it vanished. The capture rate was about 17%.

BriceSD commented 8 years ago

@keugnu which level are you ingame ? Discarding balls is very common for me

2016-08-12 00:09:21,690 [ItemRecycler] [INFO] [item_discarded] Discarded 28x Pokeball).
2016-08-12 00:09:22,115 [ItemRecycler] [INFO] [item_discarded] Discarded 5x Ultraball).
2016-08-12 00:09:22,542 [ItemRecycler] [INFO] [item_discarded] Discarded 12x Potion).
2016-08-12 00:09:22,973 [ItemRecycler] [INFO] [item_discarded] Discarded 6x Super Potion).
2016-08-12 00:09:23,402 [ItemRecycler] [INFO] [item_discarded] Discarded 3x Hyper Potion).
2016-08-12 00:09:23,838 [ItemRecycler] [INFO] [item_discarded] Discarded 11x Revive).
2016-08-12 00:09:24,379 [ItemRecycler] [INFO] [item_discarded] Discarded 1x Max Revive).
2016-08-12 00:09:24,802 [ItemRecycler] [INFO] [item_discarded] Discarded 5x Razz Berry).

edit : very common. 3 min later :

2016-08-12 00:12:38,858 [ItemRecycler] [INFO] [item_discarded] Discarded 36x Pokeball).
2016-08-12 00:12:39,445 [ItemRecycler] [INFO] [item_discarded] Discarded 3x Ultraball).
2016-08-12 00:12:39,848 [ItemRecycler] [INFO] [item_discarded] Discarded 6x Potion).
2016-08-12 00:12:40,272 [ItemRecycler] [INFO] [item_discarded] Discarded 6x Super Potion).
2016-08-12 00:12:40,679 [ItemRecycler] [INFO] [item_discarded] Discarded 8x Revive).
2016-08-12 00:12:41,079 [ItemRecycler] [INFO] [item_discarded] Discarded 6x Razz Berry).
DanielVolz commented 8 years ago

My pokemon rarely (1 out of 10, maybe even less of vip pokemon) flee. And only if they're really high cp.

jrjhealey commented 8 years ago

From the time I've spent watching the bot's progress I too have never had to use more than ~3 pokeballs to successfully capture almost everything.

A better solution would perhaps be a different 'abandon threshold', if number of pokeballs expended is > x defined limit, run away...

I've not had trouble with the bot running out of inventory items anyway so the bot would literally have to p*ss away like 150+ balls before I'd have to consider running away...

smfbrooks commented 8 years ago

@jrjhealey I've only noticed the inventory issue being a problem when using MoveToMapPokemon and I imagine that inventory can be a problem for users that are running bots in areas with low pokestop density and high pokemon density.

jrjhealey commented 8 years ago

@keugnu ah yeah sorry, I completely skipped over the MoveToMap point. I don't use that functionality myself, so can't offer any more insight!

umbreon222 commented 8 years ago

Maybe this could be solved by adding a param to config.json? (This is a hypothetical example as this isn't actually implemented) "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"} => "any": {"catch_above_cp": 0, "catch_above_iv": 0,"catch_above_capture_rate":0.33,"logic": "or"}

k4n30 commented 8 years ago

@keugnu Are you still after this? If so would you mind updating your FR to the new FR template with the following headings so that others may be more likely to assist you

Short Description

Possible solution

How it would help others

smfbrooks commented 8 years ago

@k4n30 I have updated the OP

Gobberwart commented 8 years ago

I have to say I'd rather see improved catch ability (if possible) over simply abandoning anything that's "too hard". After all, things that are hard to catch are often the best, so it's worth the effort.

taimaster043 commented 8 years ago

hi, can we have a manual run away button, :) I do watch my bot and there is time where i want it to run away or stop spinning the pokestop.