PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Sniping problem: PokemonCatchWorker doesn't commence after teleporting back to previous location

Open xty opened this issue 10 years ago • 9 comments

Expected Behavior

When sniping at Pokémon, the bot should follow the following steps: ① [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to AAA. (x.xxkm) ② [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: AAA ③ [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (xx.xxxxxx, yy.yyyyyy) ④[PokemonCatchWorker] [INFO] [pokemon_appeared] A wild AAA appeared! …

Actual Behavior

As stated in the title, the PokemonCatchWorker doesn't kick in after step ③. This behaviour is not only problematic but also potentially DANGEROUS, as it keeps encountering Pokémon at different locations at a very fast rate, which might easily lead to a ban.

Your FULL config.json (remove your username, password, gmapkey and any other private info)

{
    "websocket_server": false,
    "heartbeat_threshold": 10,
    "enable_social": false,
    "live_config_update": {
      "enabled": true,
      "tasks_only": true
    },
    "tasks": [
      {
        "type": "TelegramTask",
        "config": {
          "enabled": false,
          "master": "@xxxxx",
          "// old syntax, still supported: alert_catch": ["all"],
          "// new syntax:": {},
          "alert_catch": {
            "all": {"operator": "or", "cp": 1300, "iv": 0.92}
          }
        }
      },
      {
        "//NOTE: This task MUST be placed on the top of task list": {},
        "type": "RandomAlivePause",
        "config": {
          "enabled": false,
          "min_duration": "00:00:10",
          "max_duration": "00:10:00",
          "min_interval": "00:05:00",
          "max_interval": "01:30:00"
        }
      },
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "RandomPause",
        "config": {
          "enabled": false,
          "min_duration": "00:00:10",
          "max_duration": "00:10:00",
          "min_interval": "00:10:00",
          "max_interval": "02:00:00"
        }
      },
      {
        "type": "CompleteTutorial",
        "config": {
          "enabled": false,
          "// set a name": "",
          "nickname": "",
          "// 0 = No Team, 1 = Blue, 2 = Red, 3 = Yellow": "",
          "team": 0
        }
      },
      {
        "type": "CollectLevelUpReward",
        "config": {
          "collect_reward": true,
          "level_limit": -1
        }
      },
      {
        "type": "IncubateEggs",
        "config": {
          "enabled": true,
          "infinite_longer_eggs_first": false,
          "breakable_longer_eggs_first": true,
          "min_interval": 120,
         "infinite": [2,5,10],
         "breakable": [2,5,10]
        }
      },
      {
        "type": "UpdateLiveStats",
        "config": {
          "enabled": true,
          "min_interval": 10,
          "stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
          "terminal_log": false,
          "terminal_title": true
        }
      },
      {
        "type": "UpdateLiveInventory",
        "config": {
          "enabled": false,
          "min_interval": 120,
          "show_all_multiple_lines": false,
          "items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
        }
      },
      {
        "type": "ShowBestPokemon",
        "config": {
          "enabled": true,
          "min_interval": 120,
          "amount": 5,
          "order_by": "cp",
          "info_to_show": ["cp", "ivcp", "dps", "hp"]
        }
      },
      {
        "type": "TransferPokemon",
        "config": {
          "enabled": true,
          "min_free_slot": 100,
          "transfer_wait_min": 3,
          "transfer_wait_max": 5
        }
      },
      {
        "type": "NicknamePokemon",
        "config": {
          "enabled": true,
          "nickname_above_iv": 0.9,
          "nickname_template": "{name:.8s}_{iv_ads_hex}",
          "nickname_wait_min": 3,
          "nickname_wait_max": 5
        }
      },
      {
        "type": "EvolvePokemon",
        "config": {
          "enabled": false,

            "evolve_list": "all",
            "donot_evolve_list": "none",

          "first_evolve_by": "cp",
          "evolve_above_cp": 500,
          "evolve_above_iv": 0.8,
          "logic": "or",
          "min_evolve_speed": 25,
          "max_evolve_speed": 30,
          "use_lucky_egg": false
        }
      },
      {
        "type": "UseIncense",
        "config": {
          "use_incense": false,
          "use_order": [
            "ordinary",
            "spicy",
            "cool",
            "floral"
          ]
        }
      },
      {
        "type": "RecycleItems",
        "config": {
          "enabled": true,
          "min_empty_space": 15,
          "max_balls_keep": 350,
          "max_potions_keep": 350,
          "max_berries_keep": 120,
          "max_revives_keep": 100,
          "item_filter": {},
          "recycle_wait_min": 3,
          "recycle_wait_max": 5,
          "recycle_force": true,
          "recycle_force_min": "00:01:00",
          "recycle_force_max": "00:05:00"
        }
      },
      {
        "type": "CatchPokemon",
        "config": {
          "enabled": true,
          "catch_visible_pokemon": true,
          "catch_lured_pokemon": true,
          "min_ultraball_to_keep": 5,
          "berry_threshold": 0.35,
          "vip_berry_threshold": 0.9,
          "treat_unseen_as_vip": true,
          "daily_catch_limit": 800,
          "catch_throw_parameters": {
            "excellent_rate": 0.1,
            "great_rate": 0.5,
            "nice_rate": 0.3,
            "normal_rate": 0.1,
            "spin_success_rate" : 0.5,
            "hit_rate": 0.75
          },
          "catch_simulation": {
            "flee_count": 3,
            "flee_duration": 2,
            "catch_wait_min": 3,
            "catch_wait_max": 6,
            "berry_wait_min": 3,
            "berry_wait_max": 5,
            "changeball_wait_min": 3,
            "changeball_wait_max": 5,
            "newtodex_wait_min": 20,
            "newtodex_wait_max": 30
          }
        }
      },
      {
        "type": "SpinFort",
        "config": {
          "enabled": true,
          "spin_wait_min": 3,
          "spin_wait_max": 5,
          "daily_spin_limit": 1900
        }
      },
      { "type": "UpdateWebInventory",
        "config": {
          "enabled": true
        }
      },
      {
        "type": "MoveToMapPokemon",
        "config": {
          "enabled": true,
          "address": "http://localhost:5000",
          "//NOTE: Change the max_sniping_distance to adjust the max sniping range (m)": {},
          "max_sniping_distance": 10000,
          "//NOTE: Change the max_walking_distance to adjust the max walking range when snipe is off (m)": {},
          "max_walking_distance": 500,
          "min_ball": 20,
          "prioritize_vips": true,
          "snipe": true,
          "snipe_high_prio_only": true,
          "snipe_high_prio_threshold": 400,
          "update_map": false,
          "mode": "priority",
          "map_path": "raw_data",
          "walker": "StepWalker",
          "max_extra_dist_fort": 10,
          "skip_rounds": 5,
      "update_map_min_distance_meters": 500,
      "update_map_min_time_sec": 120,
      "snipe_sleep_sec": 2,
      "snipe_max_in_chain": 2,
      "debug": false,
          "catch": {
            "Aerodactyl": 400,
            "Snorlax": 1000,
            "Articuno": 1000,
            "Zapdos": 1000,
            "Moltres": 1000,
            "Dratini": 1000,
            "Dragonair": 1000,
            "Dragonite": 1000,
            "Mewtwo": 1000,
            "Mew": 1000,

            "Lapras": 900,
            "Electabuzz": 300,
            "Magmar": 300,
            "Ditto": 900,

            "Bulbasaur": 500,
            "Ivysaur": 600,
            "Venusaur": 900,

            "Squirtle": 500,
            "Wartortle": 600,
            "Blastoise": 900,


            "Porygon": 200,
            "Scyther": 200,
            "Jynx": 200,

            "Grimer": 200,
            "Muk": 400,

            "Gastly": 200,
            "Haunter": 300,

            "Growlithe": 1000,
            "Arcanine": 900,

            "Clefairy": 150,
            "Clefable": 500,

            "Geodude": 300,
            "Graveler": 300,
            "Golem": 400,

            "Eevee": 600,
            "Vaporeon": 800,
            "Jolteon": 300,
            "Flareon": 300,

            "Shellder": 600,
            "Cloyster": 800,

            "Magikarp": 400,
            "Gyarados": 800,

            "Slowpoke": 600,
            "Slowbro": 800,

            "Exeggcute": 900,
            "Exeggcutor": 900,

            "Rhyhorn": 200,
            "Rhydon": 400,

            "Nidoran F": 300,
            "Nidorina": 300,
            "Nidoqueen": 600,

            "Oddish": 300,
            "Gloom": 300,
            "Vileplume": 400,

            "Poliwag": 600,
            "Poliwhirl": 600,
            "Poliwrath": 800,

            "Abra": 300,
            "Kadabra": 400,
            "Alakazam": 600,

            "Machop": 300,
            "Machoke": 300,
            "Machamp": 400
          }
        }
      },
      {
        "type": "MoveToFort",
        "config": {
          "enabled": true,
          "lure_attraction": true,
          "lure_max_distance": 2000,
          "walker": "StepWalker",
          "log_interval": 5
        }
      },
      {
        "type": "FollowSpiral",
        "config": {
          "enabled": true,
          "diameter": 4,
          "step_size": 70
        }
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50,
      "cache_recent_forts": true
    },
    "pokemon_bag": {
      "// if 'show_at_start' is true, it will log all the pokemons in the bag (not eggs) at bot start": {},
      "show_at_start": true,
      "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {},
      "show_count": false,
      "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {},
      "show_candies": false,
      "// 'pokemon_info' parameter define which info to show for each pokemon": {},
      "// the available options are": {},
      "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {},
      "pokemon_info": ["cp", "iv_pct"]
    },
    "walk_max": 6,
    "walk_min": 3,
    "alt_min": 500,
    "alt_max": 1000,
    "sleep_schedule": [
      {
        "time": "12:00",
        "duration": "5:30",
        "time_random_offset": "00:30",
        "duration_random_offset": "00:30",
        "wake_up_at_location": ""
      },
      {
        "time": "17:45",
        "duration": "3:00",
        "time_random_offset": "01:00",
        "duration_random_offset": "00:30",
        "wake_up_at_location": ""
      }
    ],
    "gps_default_altitude": 8.0,
    "replicate_gps_xy_noise": false,
    "replicate_gps_z_noise": false,
    "gps_xy_noise_range": 0.000125,
    "gps_z_noise_range": 12.5,
    "debug": false,
    "test": false,
    "walker_limit_output": false,
    "health_record": false,
    "location_cache": false,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "logging": {
      "color": true,
      "show_datetime": true,
      "show_process_name": true,
      "show_log_level": true,
      "show_thread_name": false
    },
    "catch": {
      "any": {"candy_threshold" : 800 ,"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "release": {
      "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
      "Pidgey": {"keep_best_iv": 40},
      "Weedle": {"keep_best_iv": 20},
      "Caterpie": {"keep_best_iv": 15},
      "Magikarp": {"keep_best_iv": 2},
      "Magmar": {"keep_best_cp": 1, "keep_best_iv": 2},
      "Eevee": {"keep_best_iv": 3},
      "Bulbasaur": {"keep_best_iv": 2},
      "Charmander": {"keep_best_iv": 2},
      "Squirtle": {"keep_best_iv": 2},
      "Nidoran F": {"keep_best_iv": 2},
      "Poliwag": {"keep_best_iv": 3},
      "Abra": {"keep_best_iv": 2},
      "Exeggcute": {"keep_best_iv": 3},
      "Growlithe": {"keep_best_iv": 3},
      "Arcanine": {"keep_best_iv": 2}
    },
    "vips" : {
        "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {},
        "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {}
    }
}

Output when issue occurred

[2016-09-03 09:41:08] [  SpinFort] [INFO] [spun_pokestop] Spun pokestop George Leung Chen Bench . Experience awarded: 50. Items awarded: 1x Pokeball, 2x Super Potion
[2016-09-03 09:41:12] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Exeggcute. (0.05km)
[2016-09-03 09:41:12] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Exeggcute
[2016-09-03 09:41:15] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.663144, -79.30811)
[2016-09-03 09:41:17] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Exeggcute. (0.21km)
[2016-09-03 09:41:17] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Exeggcute
[2016-09-03 09:41:19] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.663144, -79.30811)
[2016-09-03 09:41:21] [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop Pantry Park - 0.64km
[2016-09-03 09:41:23] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Exeggcute. (0.28km)
[2016-09-03 09:41:23] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Exeggcute
[2016-09-03 09:41:25] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.6631506329, -79.308049793)
[2016-09-03 09:41:27] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Exeggcute. (0.36km)
[2016-09-03 09:41:27] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Exeggcute
[2016-09-03 09:41:29] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.6631506329, -79.308049793)
[2016-09-03 09:41:31] [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop Pantry Park - 0.63km
[2016-09-03 09:41:33] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Eevee. (0.09km)
[2016-09-03 09:41:33] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Eevee
[2016-09-03 09:41:35] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.6631774891, -79.3079949058)
[2016-09-03 09:41:37] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Shellder. (0.60km)
[2016-09-03 09:41:37] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Shellder
[2016-09-03 09:41:40] [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.6631774891, -79.3079949058)
[2016-09-03 09:41:42] [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop Pantry Park - 0.63km

Steps to Reproduce

Edit: ① Run the bot with the above configurations for at least 5 mins and make sure you did successfully snipe at some of the Pokémon that are above the snipe_high_prio_threshold. ② Terminate the program or make an update to your config.json file. ③ Restart the bot at once (if an update is made to config.json , it will restart automatically) and observe your terminal output.

Other Information

OS: Ubuntu 16.04.1 LTS 64-bit Branch: dev Git Commit: 14884b93c927cffa1c612835baf34d85d9c4cb76 Python Version: Python 2.7.12

xty avatar Sep 03 '16 03:09 xty

~~The problem seems to be intermittent. Although it failed to work consistently previously. When I re-run the bot this time with the exact same config.json file, everything seems to be working fine now. :dizzy_face:~~

Edit: Never mind, after a while the problem emerged again.

xty avatar Sep 03 '16 03:09 xty

try to update pokemap, it works for me

dummyaja avatar Sep 03 '16 08:09 dummyaja

try to update pokemap, it works for me

Do you mean updating the PokemonGo Map to the latest version or setting update_map to true in the your config.json file? I did both to no avail.

xty avatar Sep 03 '16 18:09 xty

try this "enable_social": false,

dummyaja avatar Sep 04 '16 08:09 dummyaja

try this "enable_social": false,

That doesn't work; it has been false all along.

I'm beginning to make out the pattern. The glitch seems to happen every time when the bot is terminated and re-run shortly afterwards or when a change is made to the config.json file (with live_config_update enabled).

Right now, my hypothesis is the following: when the bot is run, the MoveToMapPokemon task fetches the current Pokémon spawns from /raw_data; it goes on to construct internally a list of Pokémon to snipe according to the criteria specified in your config.json file; when you encounter a Pokémon in the list, it is removed so that you don't teleport to the location of that Pokémon over and over again. Whenever you restart the bot or update your config.json, the list is discarded and re-constructed from /raw_data, and that's when things go wrong – not knowing some of the Pokémon in the list has gone (vanished or been captured) in the previous run, it teleports to these locations only to find the Pokémon are not there; it removes the Pokémon from the list and teleports back empty-handed; it keeps on doing this until all the non-existent Pokémon are removed and the list becomes up-to-date again.

If my hypothesis is true, we need to think of a way to store the Pokémon excluded from the list and make use of this information when re-constructing the list.

xty avatar Sep 05 '16 22:09 xty

To reproduce the problem, please refer to the updated Steps to Reproduce in the original post.

xty avatar Sep 05 '16 22:09 xty

According to @YvesHenri, this isn't going to be fixed and we should use Sniper instead. Closing.

Gobberwart avatar Sep 19 '16 01:09 Gobberwart

Actually the old sniper still works (fixed in the above PR). However, they shouldn't be used together since I don't know what could happen. Using the old sniper is pointless, unless used ONLY for walk-to-snipe (which is no sense also). Give the new one a try and you won't regret :)

YvesHenri avatar Sep 19 '16 02:09 YvesHenri

:+1:

Gobberwart avatar Sep 19 '16 02:09 Gobberwart