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

[dev] TransferPokemon does not work with the `keep_best_custom` parameter

Open Vvkmnn opened this issue 8 years ago • 10 comments

Expected Behavior

The bot will adopt the keep_best_custom setup and release as per configuration.

Actual Behavior

Bot skips the TransferPokemon with

"any": {
    "keep_best_custom": "iv,moveset.attack.perfection",
    "amount": 2     
    }

but the bot works fine with:

"any": {
    "keep_best_iv": 3       
    }

Config:

{
    "documentation": "https://github.com/PokemonGoF/PokemonGo-Bot/tree/master/docs",

    "auth_service": "google",
    "username": "",
    "password": "",

    "enable_social": true,

    "": "",

    "websocket_server": true,

    "heartbeat_threshold": 10,

    "gmapkey": "",

    "tasks": [{
        "type": "HandleSoftBan"
    }, {
        "type": "SleepSchedule",
        "config": {
            "enabled": true,
            "time": "03:00",
            "duration": "6:00",
            "time_random_offset": "00:31",
            "duration_random_offset": "00:27",
            "wake_up_at_location": ""
        }
    }, {
        "type": "RandomPause",
        "config": {
            "enabled": true,
            "min_duration": "00:00:10",
            "max_duration": "00:01:00",
            "min_interval": "00:05:00",
            "max_interval": "00:15:00"
        }
    }, {
        "type": "RandomPause",
        "config": {
            "enabled": true,
            "min_duration": "00:10:00",
            "max_duration": "00:30:00",
            "min_interval": "00:45:00",
            "max_interval": "02:00:00"
        }
    }, {
        "type": "CompleteTutorial",
        "config": {
            "enabled": true,
            "// set a name": "",
            "// nickname": ""
        }
    }, {
        "type": "CollectLevelUpReward"
    }, {
        "type": "UpdateLiveStats",
        "config": {
            "enabled": true,
            "min_interval": 10,
            "stats": ["uptime", "level", "level_completion", "pokemon_stats", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
            "terminal_log": true,
            "terminal_title": true
        }
    }, {
        "type": "UpdateLiveInventory",
        "config": {
            "enabled": true,
            "min_interval": 120,
            "show_all_multiple_lines": false,
            "items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
        }
    }, {
        "type": "IncubateEggs",
        "config": {
            "longer_eggs_first": true,
            "min_interval": 120,
            "infinite": [2, 5, 10],
            "breakable": [2, 10]
        }
    }, {
        "type": "EvolvePokemon",
        "config": {
            "enabled": true,
            "evolve_all": "Pidgey, Weedle, Caterpie, Rattata, Drowzee, Meowth, Spearow, Ekans, Zubat, Doduo, Goldeen, Krabby, Horsea, Koffing, Cubone, Psyduck",
            "first_evolve_by": "iv",
            "evolve_above_cp": 400,
            "evolve_above_iv": 0.9,
            "logic": "or",
            "min_evolve_speed": 20,
            "max_evolve_speed": 35,
            "use_lucky_egg": false
        }
    }, {
        "type": "TransferPokemon",
        "config": {
            "enabled": true,
            "min_free_slot": 10,
            "transfer_wait_min": 3,
            "transfer_wait_max": 5
        }
    }, {
        "type": "NicknamePokemon",
        "config": {
            "enabled": true,
            "locale": "en",
            "dont_nickname_favorite": true,
            "nickname_template": "{ivcp_pct1}{attack_pct1} {name}"
        }
    }, {
        "type": "RecycleItems",
        "config": {
            "min_empty_space": 15,
            "max_balls_keep": 275,
            "max_potions_keep": 0,
            "max_berries_keep": 50,
            "max_revives_keep": 0,
            "item_filter": {
                "Pokeball": {
                    "keep": 100
                },
                "Greatball": {
                    "keep": 75
                },
                "Ultraball": {
                    "keep": 100
                },
                "Potion": {
                    "keep": 0
                },
                "Super Potion": {
                    "keep": 0
                },
                "Hyper Potion": {
                    "keep": 0
                },
                "Revive": {
                    "keep": 0
                },
                "Razz Berry": {
                    "keep": 50
                }
            },
            "recycle_wait_min": 3,
            "recycle_wait_max": 10
        }
    }, {
        "type": "CatchPokemon",
        "config": {
            "catch_visible_pokemon": true,
            "catch_lured_pokemon": true,
            "min_ultraball_to_keep": 50,
            "berry_threshold": 0.35,
            "vip_berry_threshold": 0.9,
            "treat_unseen_as_vip": true,
            "catch_throw_parameters": {
                "excellent_rate": 0.1,
                "great_rate": 0.5,
                "nice_rate": 0.3,
                "normal_rate": 0.1,
                "spin_success_rate": 0.6,
                "hit_rate": 0.75
            },
            "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
            }
        }
    }, {
        "type": "MoveToMapPokemon",
        "config": {
            "address": "http://localhost:5000",
            "max_distance": 1500,
            "min_ball": 50,
            "prioritize_vips": true,
            "snipe": true,
            "snipe_high_prio_only": true,
            "snipe_high_prio_threshold": 399,
            "update_map": true,
            "mode": "priority",
            "map_path": "raw_data",
            "walker": "StepWalker",
            "max_extra_dist_fort": 10,
            "catch": {
                "Mewtwo": 1000,
                "Mew": 1000,

                "Articuno": 1000,
                "Zapdos": 1000,
                "Moltres": 1000,

                "Dratini": 1000,
                "Dragonair": 1000,
                "Dragonite": 1000,

                "Snorlax": 1000,
                "Lapras": 1000,

                "Charmander": 950,
                "Charmeleon": 949,
                "Charizard": 948,

                "Bulbasaur": 930,
                "Ivysaur": 929,
                "Venusaur": 928,

                "Squirtle": 910,
                "Wartortle": 909,
                "Blastoise": 908,

                "Pikachu": 940,
                "Raichu": 939,

                "Eevee": 900,
                "Vaporeon": 500,
                "Jolteon": 500,
                "Flareon": 500,

                "Chansey": 800,

                "Electabuzz": 300,
                "Magmar": 300,
                "Ditto": 300,

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

                "Seel": 500,
                "Dewgong": 300,

                "Growlithe": 750,
                "Arcanine": 650,

                "Magikarp": 700,
                "Gyarados": 600,

                "Vulpix": 650,
                "Ninetales": 600,

                "Grimer": 650,
                "Muk": 600,

                "Exeggcute": 625,
                "Exeggcutor": 425,

                "Omanyte": 600,
                "Omastar": 500,

                "Kabuto": 600,
                "Kabutops": 500,

                "Slowpoke": 600,
                "Slowbro": 400,

                "Rhyhorn": 550,
                "Rhydon": 450,

                "Nidoran M": 600,
                "Nidorino": 500,
                "Nidoking": 400,

                "Nidoran F": 500,
                "Nidorina": 400,
                "Nidoqueen": 300,

                "Staryu": 500,
                "Starmie": 400,

                "Gastly": 500,
                "Haunter": 400,
                "Gengar": 300,

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

                "Machop": 550,
                "Machoke": 450,
                "Machamp": 350,

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

                "Poliwag": 400,
                "Poliwhirl": 300,
                "Poliwrath": 200,

                "Bellsprout": 400,
                "Weepinbell": 300,
                "Victreebel": 200,

                "Oddish": 300,
                "Gloom": 200,
                "Vileplume": 100,

                "Sandshrew": 200,
                "Sandslash": 100,

                "Farfetch'd": 300,
                "Kangaskhan": 300,
                "Mr. Mime": 300,
                "Tauros": 300,

                "Electabuzz": 300,
                "Magmar": 300,
                "Ditto": 300,

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

                "Seel": 350,
                "Dewgong": 200,

                "Shellder": 200,
                "Cloyster": 100,

                "Drowzee": 10,
                "Hypno": 50,


                "Paras": 100,
                "Parasect": 50,

                "Tentacool": 200,
                "Tentacruel": 100,

                "Mankey": 150,
                "Primeape": 50,

                "Clefairy": 100,
                "Clefable": 50,

                "Jigglypuff": 100,
                "Wigglytuff": 50,

                "Venonat": 100,
                "Venomoth": 50,

                "Diglett": 200,
                "Dugtrio": 150,

                "Meowth": 150,
                "Persian": 100,

                "Psyduck": 150,
                "Golduck": 100,


                "Pinsir": 150,

                "Ponyta": 200,
                "Rapidash": 100,

                "Magnemite": 150,
                "Magneton": 100,

                "Krabby": 150,
                "Kingler": 100,

                "Voltorb": 200,
                "Electrode": 100,

                "Cubone": 250,
                "Marowak": 200,

                "Hitmonlee": 200,
                "Hitmonchan": 200,
                "Lickitung": 200,

                "Koffing": 200,
                "Weezing": 100,

                "Tangela": 100,

                "Horsea": 250,
                "Seadra": 100,

                "Goldeen": 250,
                "Seaking": 100,


                "Caterpie": 10,
                "Metapod": 10,
                "Butterfree": 10,

                "Weedle": 10,
                "Kakuna": 10,
                "Beedrill": 10,

                "Pidgey": 10,
                "Pidgeotto": 10,
                "Pidgeot": 10,

                "Oddish": 100,
                "Gloom": 200,
                "Vileplume": 600,

                "Onix": 10,

                "Rattata": 10,
                "Raticate": 10,

                "Spearow": 10,
                "Fearow": 10,

                "Ekans": 10,
                "Arbok": 10,

                "Sandshrew": 10,
                "Sandslash": 10,

                "Zubat": 10,
                "Golbat": 10,

                "Doduo": 10,
                "Dodrio": 10
            }
        }
    }, {
        "type": "SpinFort",
        "config": {
            "spin_wait_min": 1,
            "spin_wait_max": 3
        }
    }, {
        "type": "FollowPath",
        "config": {
            "enabled": true,
            "walker": "PolylineWalker",
            "path_mode": "loop",
            "path_start_mode": "closest",
            "path_file": "configs/path1.json",
            "number_lap": 10,
            "timer_restart_min": "00:10:00",
            "timer_restart_max": "00:20:00"
        }
    }],
    "map_object_cache_time": 5,
    "forts": {
        "avoid_circles": true,
        "max_circle_size": 50,
        "cache_recent_forts": true
    },
    "logging_color": true,

    "pokemon_bag": {
        "show_at_start": false,
        "show_count": true,
        "pokemon_info": ["cp", "iv_pct", "moveset", "dps"]
    },

    "location_cache": true,
    "distance_unit": "km",

    "walk_max": 11,
    "walk_min": 6,
    "walk_random": true,
    "walk_offset_percent_max": 0.4,

    "alt_min": 70,
    "alt_max": 150,

    "gps_default_altitude": 76.0,
    "replicate_gps_xy_noise": true,
    "replicate_gps_z_noise": true,
    "gps_xy_noise_range": 0.000125,
    "gps_z_noise_range": 12.5,

    "action_wait_min": 2,
    "action_wait_max": 8,

    "debug": false,
    "test": false,
    "health_record": false,

    "daily_catch_limit": 800,

    "reconnecting_timeout": 15,
    "catch": {
        "any": {
            "always_catch": true
        }
    },

    "release": {
        "any": {
            "keep_best_custom": "iv, moveset.attack.perfection, iv_atack, hp_max",
            "amount": 2
        },

        "Snorlax": {
            "keep_best_iv": 9
        },
        "Lapras": {
            "keep_best_iv": 9
        },
        "Gyarados": {
            "keep_best_iv": 9
        },

        "Dratini": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 2
        },
        "Dragonair": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 2
        },
        "Dragonite": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 3
        },

        "Vaporeon": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 3
        },
        "Flareon": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 3
        },
        "Jolteon": {
            "keep_best_custom": "iv, moveset.attack.perfection",
            "amount": 3
        }

    },
    "vips": {
        "any": {
            "catch_above_cp": 1200,
            "catch_above_iv": 0.9,
            "catch_above_ncp": 0.9,
            "logic": "or"
        },

        "Mew": {},
        "Mewtwo": {},

        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "Dragonite": {},
        "Dragonair": {},
        "Dratini": {},

        "Snorlax": {},
        "Lapras": {},

        "Growlithe": {},
        "Arcanine": {},

        "Gyarados": {},

        "Exeggutor": {},
        "Muk": {},

        "Eevee": {},
        "Vaporeon": {},

        "Bulbasaur": {},
        "Ivysaur": {},
        "Venusaur": {},

        "Charmander": {},
        "Charmeleon": {},
        "Charizard": {},

        "Squirtle": {},
        "Wartortle": {},
        "Blastoise": {},

        "Pikachu": {},
        "Raichu": {}

    }
}

Log

# With keep_best_custom:

2016-08-24 14:06:21,252 [UpdateLiveStats] [INFO] [log_stats] Uptime : 0:00:09 | Level 22 | 147,555 / 175,000 XP (84%) | Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
2016-08-24 14:06:21,252 [UpdateLiveInventory] [INFO] [show_inventory] Items: 234/350 | Pokeballs: 83 | GreatBalls: 15 | UltraBalls: 4 | RazzBerries: 4 | LuckyEgg: 4
2016-08-24 14:06:21,474 [IncubateEggs] [INFO] [next_egg_incubates] Eggs incubating: [2.35/5.0 km] (Eggs left: 8, Incubating: 1)
2016-08-24 14:06:21,618 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Rattata [IV 0.87] [CP 223] [66 candies] [+500 xp]
2016-08-24 14:06:46,237 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Rattata [IV 0.44] [CP 222] [42 candies] [+500 xp]
2016-08-24 14:07:15,119 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Rattata [IV 0.36] [CP 299] [18 candies] [+500 xp]
2016-08-24 14:07:42,902 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Pidgey [IV 0.69] [CP 289] [32 candies] [+500 xp]
2016-08-24 14:08:20,868 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Pidgey [IV 0.58] [CP 335] [21 candies] [+500 xp]
2016-08-24 14:08:46,368 [EvolvePokemon] [INFO] [pokemon_evolved] Evolved Pidgey [IV 0.31] [CP 323] [10 candies] [+500 xp]
2016-08-24 14:09:14,281 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 52 Pidgey renamed to 53 Pidgeotto
2016-08-24 14:09:15,547 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 29 Pidgey renamed to 23 Pidgeotto
2016-08-24 14:09:17,057 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 43 Rattata renamed to 40 Raticate
2016-08-24 14:09:18,250 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 43 Rattata renamed to 46 Raticate
2016-08-24 14:09:19,256 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 88 Rattata renamed to 82 Raticate
2016-08-24 14:09:20,578 [NicknamePokemon] [INFO] [rename_pokemon] Pokemon 40 Pidgey renamed to 49 Pidgeotto
{u'pokemon_id': 92, u'expiration_timestamp_ms': 1472062693444L, u'longitude': -79.38610699040521, u'latitude': 43.66787770132467, u'spawn_point_id': u'882b34b1f79', u'encounter_id': 7339313715999207853L}
2016-08-24 14:09:20,742 [PokemonCatchWorker] [INFO] [pokemon_inventory_full] Your Pokemon inventory is full! Could not catch!

# With keep_best_iv:

2016-08-24 14:18:33,102 [UpdateLiveStats] [INFO] [log_stats] Uptime : 0:00:08 | Level 22 | 150,655 / 175,000 XP (86%) | Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
2016-08-24 14:18:33,102 [UpdateLiveInventory] [INFO] [show_inventory] Items: 240/350 | Pokeballs: 87 | GreatBalls: 15 | UltraBalls: 4 | RazzBerries: 4 | LuckyEgg: 4
2016-08-24 14:18:33,235 [IncubateEggs] [INFO] [next_egg_incubates] Eggs incubating: [2.36/5.0 km] (Eggs left: 8, Incubating: 1)
2016-08-24 14:18:33,239 [TransferPokemon] [INFO] [keep_best_release] Keeping best 3 Bulbasaur, based on iv
2016-08-24 14:18:34,562 [TransferPokemon] [INFO] [pokemon_release] Exchanged Bulbasaur [IV 0.16] [CP 38] [36 candies]
2016-08-24 14:18:39,187 [TransferPokemon] [INFO] [pokemon_release] Exchanged Bulbasaur [IV 0.29] [CP 383] [37 candies]
2016-08-24 14:18:44,661 [TransferPokemon] [INFO] [pokemon_release] Exchanged Bulbasaur [IV 0.29] [CP 68] [38 candies]

Steps to Reproduce

Replace:

"any": {
    "keep_best_custom": "iv,moveset.attack.perfection",
    "amount": 2     
    }

with:

"any": {
    "keep_best_iv": 3       
    }

OS: OSX 10.10.5 Branch: dev Git Commit: 38b4a0904345cdce275be641e4b5b45f9d7e3972 Python Version: Python 2.7.12

Vvkmnn avatar Aug 24 '16 18:08 Vvkmnn

moveset.attack.perfection moveset.attack_perfection Do you see the difference :)

maxprzemo avatar Aug 24 '16 18:08 maxprzemo

Fml.

K, trying that. I'll close if/when it works on my next release cycle.

My bad guys.

Vvkmnn avatar Aug 24 '16 19:08 Vvkmnn

Tried

    "release": {
        "Dratini": {
            "keep_best_custom": "iv, iv_attack, moveset.attack_perfection",
            "amount": 2
        }
    }

Didn't work:

2016-08-24 15:50:13,617 [IncubateEggs] [INFO] [next_egg_incubates] Eggs incubating: [0.72/5.0 km] (Eggs left: 8, Incubating: 1)
{u'pokemon_id': 29, u'expiration_timestamp_ms': 1472068635460L, u'longitude': -79.3963990011352, u'latitude': 43.67365826943126, u'spawn_point_id': u'882b34a41a9', u'encounter_id': 8093079720136335325L}
2016-08-24 15:50:13,803 [PokemonCatchWorker] [INFO] [pokemon_inventory_full] Your Pokemon inventory is full! Could not catch!
2016-08-24 15:50:13,821 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_to] Teleporting to Eevee. (6679.54km)
2016-08-24 15:50:13,822 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_encounter] Encountered Pokemon: Eevee
2016-08-24 15:50:17,099 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_teleport_back] Teleporting back to previous location (43.6735898875, -79.3962049445)
2016-08-24 15:50:19,219 [PokemonCatchWorker] [INFO] [pokemon_inventory_full] Your Pokemon inventory is full! Could not catch!

Switched to

    "release": {
        "Dratini": {
            "keep_best_iv": 3
        }
    }

and it worked again:

2016-08-24 15:51:11,831 [TransferPokemon] [INFO] [keep_best_release] Keeping best 3 Dratini, based on iv
2016-08-24 15:51:12,090 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.64] [CP 177] [106 candies]
2016-08-24 15:51:15,645 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.6] [CP 460] [107 candies]
2016-08-24 15:51:19,061 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.69] [CP 396] [108 candies]
2016-08-24 15:51:22,450 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.84] [CP 128] [109 candies]
2016-08-24 15:51:25,786 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.49] [CP 12] [110 candies]
2016-08-24 15:51:29,524 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.51] [CP 224] [111 candies]
2016-08-24 15:51:33,497 [TransferPokemon] [INFO] [pokemon_release] Exchanged Dratini [IV 0.64] [CP 387] [112 candies]

Am I still fucking up?

Vvkmnn avatar Aug 24 '16 19:08 Vvkmnn

Set "min_free_slot": 999,

Should help.

maxprzemo avatar Aug 24 '16 20:08 maxprzemo

Swapped min_free_slot to that and used the keep_best_custom setup. Still nothing, even though now it should run every time it checks the bag.

I'll just keep using keep_best_iv for now.

Vvkmnn avatar Aug 24 '16 20:08 Vvkmnn

So is this a bug?

k4n30 avatar Aug 25 '16 05:08 k4n30

Seems like it; on my bot at least.

Vvkmnn avatar Aug 25 '16 13:08 Vvkmnn

I tried keep_best_custom using the default setting from config.json.example (for "any", not just Zubat lol), and it wasn't doing any transferring. Couldn't figure out for the life of my why my bag kept being full.

wearysky avatar Aug 26 '16 16:08 wearysky

@supercourgette any ideas?

mjmadsen avatar Aug 28 '16 10:08 mjmadsen

@mjmadsen update?

k4n30 avatar Oct 05 '16 11:10 k4n30