We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5db6c08 commit 5fadcf1Copy full SHA for 5fadcf1
src/poke_env/player/baselines.py
@@ -186,6 +186,9 @@ def choose_move(self, battle: AbstractBattle):
186
active = battle.active_pokemon
187
opponent = battle.opponent_active_pokemon
188
189
+ if active is None or opponent is None:
190
+ return self.choose_random_move(battle)
191
+
192
# Rough estimation of damage ratio
193
physical_ratio = self._stat_estimation(active, "atk") / self._stat_estimation(
194
opponent, "def"
0 commit comments