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

Perm Ban Test Results

Open talobear opened this issue 10 years ago • 236 comments

Greetings,

Was a casualty of the first wave of perma-bans. Most of the bot activity was limited to activity in and around the neighborhood where I live and work.

After the ban I created a test account via PTC. I wanted to understand what would trigger a ban. I decided that until I reached level 20 I would keep no Pokemon nor visit a Gym. I would basically walk, spin and transfer whatever I encountered. The longest session would be no more than 1 hour long. I would keep the activity to two locations; home and work. No teleports, just the two locations I happened to be physically. The goal was to keep a low profile and emulate player behaviors.

The new account was setup on 8/12. Over the next four days the bot would run in roughly hour long blocks, 2-4 times a day. Typically in the AM, then lunch, then dinner. Two of the days I did a late night session around midnight. Never encountered any bans with this approach. The last session I ran was during lunch today. I was level 17 at this point. However, this session I forgot to kill it after an hours. It ended up running for about 2 hours. Since Im in a city with dense pokestops and pokemon a ton were encountered.

I went to run the next test. Launched it again and got the "failed to get game data" message. The bot reported "Probably permabanned, Game Over ! Play again at https://club.pokemon.com/us/pokemon-trainer-club/sign-up/"

Used a non-test account and was able to login without issue. This told me it was not a server issue.

There was clearly something that triggered this ban.

Can it be that I reached level 17 too quickly? Could be that the frequency of play was too often? 4-5 hours a day? I was not teleporting and had no inventory of high level pokemon. Could it be the rate at which they were turned in for candy?

Including my config for reference. Going to try another test account and adjust the rate of play. Any other suggestions I'm happy to test out.

{
    "auth_service": "",
    "username": "",
    "password": "",
    "location": "",
    "gmapkey": "",
      "tasks": [
        {
          "type": "HandleSoftBan"
        },
        {
          "type": "SleepSchedule",
          "config": {
            "enabled": true,
            "time": "22:54",
            "duration":"7:46",
            "time_random_offset": "00:24",
            "duration_random_offset": "00:43"
          }
        },
        {
          "type": "CollectLevelUpReward"
        },
        {
          "type": "IncubateEggs",
          "config": {
            "longer_eggs_first": true
          }
        },
        {
          "type": "UpdateLiveStats",
          "config": {
            "enabled": true,
            "min_interval": 10,
            "stats": ["uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
            "terminal_log": true,
            "terminal_title": true
          }
        },
        {
          "type": "TransferPokemon"
        },
        {
          "type": "NicknamePokemon",
          "config": {
            "enabled": true,
            "nickname_template": "{iv_pct}_{iv_ads}"
          }
        },
        {
          "type": "EvolvePokemon",
          "config": {
              "evolve_all": "none",
              "first_evolve_by": "cp",
              "evolve_above_cp": 500,
              "evolve_above_iv": 0.8,
              "logic": "or",
              "evolve_speed": 20,
              "use_lucky_egg": false
          }
        },
        {
          "type": "RecycleItems",
          "config": {
            "min_empty_space": 15,
            "item_filter": {
              "Pokeball":       { "keep" : 25 },
          "Greatball":      { "keep" : 125 },
              "Potion":         { "keep" : 10 },
              "Super Potion":   { "keep" : 20 },
              "Hyper Potion":   { "keep" : 30 },
              "Revive":         { "keep" : 15 },
              "Razz Berry":     { "keep" : 45 }
            }
          }
        },
        {
          "type": "CatchVisiblePokemon"
        },
        {
          "type": "CatchLuredPokemon"
        },
        {
          "type": "SpinFort"
        },
        {
          "type": "MoveToFort",
          "config": {
              "lure_attraction": true,
              "lure_max_distance": 2000
          }
        },
        {
          "type": "FollowSpiral",
          "config": {
            "diameter": 4,
            "step_size": 70
          }
        }
      ],
      "map_object_cache_time": 5,
      "forts": {
        "avoid_circles": true,
        "max_circle_size": 50,
        "cache_recent_forts": true
      },
      "websocket_server": false,
      "walk": 4.16,
      "action_wait_min": 1,
      "action_wait_max": 4,
      "debug": false,
      "test": false,
      "health_record": true,
      "location_cache": false,
      "distance_unit": "km",
      "reconnecting_timeout": 15,
      "catch_randomize_reticle_factor": 0.5,
      "catch_randomize_spin_factor": 0.5,
      "min_ultraball_to_keep": 10,
      "logging_color": true,
      "catch": {
        "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
        "// Example of always catching Rattata:": {},
        "// Rattata": { "always_catch" : true }
      },
      "catch_throw_parameters": {
        "excellent_rate": 0.1,
        "great_rate": 0.5,
        "nice_rate": 0.3,
        "normal_rate": 0.1,
        "spin_success_rate" : 0.5
      },
      "release": {
        "any": {"release_below_cp": 1000, "release_below_iv": 0.9, "logic": "and"},
        "// Example of always releasing Rattata:": {},
        "// any": {"always_release": true},
        "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
        "// Pidgey": {"keep_best_cp": 3},
        "// Example of keeping 2 stronger (based on IV) Zubat:": {},
        "// Zubat": {"keep_best_iv": 2},
        "// Also, it is working with any": {},
        "// any": {"keep_best_iv": 3},
        "// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
        "// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
      },
      "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": {}

      }
  }

talobear avatar Aug 16 '16 21:08 talobear

I think the real game sends some additional data to server than the fake client, which makes the detection of bots pretty easy. The behavior of bot is not really matter.

ProblemFactory avatar Aug 16 '16 21:08 ProblemFactory

If that is true then it looks like the bot is not viable, correct?

talobear avatar Aug 16 '16 21:08 talobear

I have anecdotal evidence that nullifies this. Where were you playing and how many kilometers were walked total?

smfbrooks avatar Aug 16 '16 21:08 smfbrooks

If the app is sending extra data back to the server then the packets could be sniffed easily and then replicated. Which would make it a pretty bad way to detect if the api calls are coming from the app vs a bot.

There is probably some sort of behavior detection algorithm on their servers, which is why they created the ban-appeal page, in case their algo picked up false positives.

Chances are it's looking for timing of api calls. The UX of the app only allows for the user to perform so many actions within a certain time period. So the server got a spinFort api call within a short time after an evolvePokemon call, then it'd know something is up.

It's probably not exactly that sequence of events, just used that to make my point.

It could have to do with how often the app scans for nearby or how often it reports the user's coordinates. Any number of things can be recorded and then analyzed.

notVitaliy avatar Aug 16 '16 21:08 notVitaliy

Hey, I did more or less the same, with some of the sessions being a bit longer, some a lot shorter, and more sessions too. No teleporting, always running the bot in the same area. The account was created just after the first ban wave a few days ago. I had reached level 24, and got banned between 8:30pm and 10:30pm (GMT + 1) today. I also experienced a soft ban on the first day, because of the 1k pokemons / 24h rule, and get unbanned 12 hours after. The last three were not very active, I have captured more or less 300 pokemons since saturday. And now I get the "Server seems to be busy or offline", only for this account.

GrosCep avatar Aug 16 '16 21:08 GrosCep

  • API always sends altitude as 8
  • API doesn't send a bunch of device info

This makes it easy for Niantic to detect

leftie1 avatar Aug 16 '16 22:08 leftie1

Ok, so that would mean at the moment the bot should not be used on anything except a test account like GrosCep and I setup. Or said another way, use the bot and you will be banned.

talobear avatar Aug 16 '16 22:08 talobear

@keugnu What is the proof? I'm quite curious because my account graveyard is adding up pretty quickly.

mjmadsen avatar Aug 16 '16 22:08 mjmadsen

image I have run this bot for 3 days. It sleeps for about 17 hours a day, so it has been farming for close to maybe 21 hours. Getting close to the 1000 pokemon in 24 hours as you can see. This bot has not had any softban issues whatsoever.

smfbrooks avatar Aug 16 '16 23:08 smfbrooks

@keugnu Wait a bit... My bet is your account will be down by the end of the week. Hopefully I'm wrong... I wonder why my account has been banned while I was not really using it, max 1hr and a half every day during the last three days, always same location etc etc. I guess they gather some data we are not aware of, and two possibilities then, they wait a bit collecting them and ban after a while to avoid too many false positives, or they just do some banning waves twice or three times a week.

GrosCep avatar Aug 17 '16 00:08 GrosCep

Good warning guys.

avexus avatar Aug 17 '16 00:08 avexus

yeah just make new account if you got banned, leveling fast and get banned again. Everytime i open issue page there are some people afraid about banned, if u are afraid dont use bot, chickens!

ubu13 avatar Aug 17 '16 01:08 ubu13

It's not afraid. If you know the possibility of getting banned is high and avoid using it, it's called cautious.

avexus avatar Aug 17 '16 02:08 avexus

API always sends altitude as 8 API doesn't send a bunch of device info

Could you point out more precisely the source code you are referring to? Based on this bot source code it seems it always send 0 not 8. So are you referring to the pogoapi library used by the bot? If so could you show the exact lines and files concerned by that?

Thanks

jboffel avatar Aug 17 '16 04:08 jboffel

The bot capture rate was unrealistic and captured pokemon at an impossible rate ignoring animation times. I just saw a commit added to make capturing more realistic! I hope this prevents detection:

"catch_simulation": {
        "flee_count": 3,
        "flee_duration": 2,
        "catch_wait_min": 2,
        "catch_wait_max": 6,
        "berry_wait_min": 2,
        "berry_wait_max": 3,
        "changeball_wait_min": 2,
        "changeball_wait_max": 3
      }

I'd like to see an option setting to occasionally miss with a pokeball though

pickerflicker avatar Aug 17 '16 05:08 pickerflicker

I added something similar to pokeball miss already on my local source code. It's not clean but it does the job currently.

In human_behaviour.py:

def miss_pokeball_percentage(factor):
    value = uniform(0, 99)
    logger.info('Pokeball miss throw percentage: {}, chance percentage: {}'.format(factor, value))
    if value >= factor:
        return 1
    else:
        return 0

Used in pokemon_catch_worker.py as it:

response_dict = self.api.catch_pokemon(
                                encounter_id=encounter_id,
                                pokeball=pokeball,
                                normalized_reticle_size=reticle_size_parameter,
                                spawn_point_id=self.spawn_point_guid,
                                hit_pokemon=miss_pokeball_percentage(50),
                                spin_modifier=spin_modifier_parameter,
                                normalized_hit_position=1
                            )

I try to miss basically 50% of my pokeball throw... However it's totally possible I misunderstood how works some of the API parameters. So use at your own risk...

Also rather than adding a specific configuration per action on any thing involving API call, I added a random timer directly on all API call. However I agree that it does not care much about the animation time. Based on the values above, set the minimal random value for the timer to 6 would be sufficient but it will make the bot quite slow.

jboffel avatar Aug 17 '16 05:08 jboffel

Hey all, I've been running my own tests as well! So far I don't have much evidence for anything but maybe it might help:

First bot: Kept most configs standard and ran for about ~10 hours a day for a week. Got banned on the first ban wave. The bot had spent a lot of time trying to catch pokemon without balls right before the ban hit...

Second bot: Tried to make the configs as human like as possible but still ran it for maybe ~10 hours a day. Took 1 day to reach permban. Here I'd manually switch between different paths and turn off and on pokemon catching to vary what it was doing.

Third bot: As humanlike and slow as I could make it with the current options. Only running in a path around my home. I run it for maybe ~2 hours total each day. Going strong 5th day in.

To me it seems like it might have something to do with play time + distance walked. At least this makes me believe that they are NOT detecting something specifically sent from this bot.

lillelilje avatar Aug 17 '16 06:08 lillelilje

Having the NicknamePokemon task enabled probably doesn't help preventing bans either?

EmDee avatar Aug 17 '16 08:08 EmDee

I tested 1 account only after the first wave. Path mode no teleports, running 10hrs a day never ever got soft banned. 2nd wave hit it.

AcorpBG avatar Aug 17 '16 08:08 AcorpBG

I made a similar test, with a PTC account, I let it run about an entire day, and got to lv 20 very quickly. No softbans, no permabans hit that account. My only banned account, was the one which got softbanned more often, due to quick location changes...

Moreover, I know fair players which plays 10 hour a day, so I don't think Niantic will ban accounts according to long running games. I think it could be more probably due to impossible location changes and (maybe?) IP mismatch between location and connection (I mean, I shouldn't have an Italian IP if my bot is running in NY)

iruy avatar Aug 17 '16 09:08 iruy