hsahovic / poke-env

A python interface for training Reinforcement Learning bots to battle on pokemon showdown
https://poke-env.readthedocs.io/
MIT License
297 stars 103 forks source link

Unable to deal with accuracy changes #599

Open BaiqingL opened 2 months ago

BaiqingL commented 2 months ago

It seems like the library is somehow unable to deal with accuracy changes, the exact error is shown below:

  File "/home/a/miniforge3/envs/ml/lib/python3.12/site-packages/poke_env/environment/abstract_battle.py", line 571, in parse_message
    self.get_pokemon(pokemon).boost(stat, int(amount))
  File "/home/a/miniforge3/envs/ml/lib/python3.12/site-packages/poke_env/environment/pokemon.py", line 144, in boost
    self._boosts[stat] += amount
    ~~~~~~~~~~~~^^^^^^
KeyError: 'accuracy'
BaiqingL commented 2 months ago

Seems to happen for the evasion key as well

caymansimpson commented 2 weeks ago

Could you add details of how you got to this error?

BaiqingL commented 1 week ago

Standard pokemon game with random strategy, once an opponent used a move that boosts accuracy or evasion the bot crashed stating that there is a key error