Jofthomas commited on
Commit
9765700
·
verified ·
1 Parent(s): 1694ef3

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +2 -4
agents.py CHANGED
@@ -17,8 +17,6 @@ import time
17
 
18
  # --- Poke-Env ---
19
  from poke_env.player import Player
20
- from poke_env.environment.move import Move
21
- from poke_env.environment.pokemon import Pokemon
22
  from typing import Optional, Dict, Any, Union
23
 
24
  class MaxDamagePlayer(Player):
@@ -166,7 +164,7 @@ class LLMAgentBase(Player):
166
  f"Opponent Side Conditions: {battle.opponent_side_conditions}"
167
  return state_str.strip()
168
 
169
- def _find_move_by_name(self, battle, move_name) -> Optional[Move]:
170
  normalized_name = normalize_name(move_name)
171
  # Prioritize exact ID match
172
  for move in battle.available_moves:
@@ -179,7 +177,7 @@ class LLMAgentBase(Player):
179
  return move
180
  return None
181
 
182
- def _find_pokemon_by_name(self, battle, pokemon_name) -> Optional[Pokemon]:
183
  normalized_name = normalize_name(pokemon_name)
184
  for pkmn in battle.available_switches:
185
  # Normalize the species name for comparison
 
17
 
18
  # --- Poke-Env ---
19
  from poke_env.player import Player
 
 
20
  from typing import Optional, Dict, Any, Union
21
 
22
  class MaxDamagePlayer(Player):
 
164
  f"Opponent Side Conditions: {battle.opponent_side_conditions}"
165
  return state_str.strip()
166
 
167
+ def _find_move_by_name(self, battle, move_name):
168
  normalized_name = normalize_name(move_name)
169
  # Prioritize exact ID match
170
  for move in battle.available_moves:
 
177
  return move
178
  return None
179
 
180
+ def _find_pokemon_by_name(self, battle, pokemon_name):
181
  normalized_name = normalize_name(pokemon_name)
182
  for pkmn in battle.available_switches:
183
  # Normalize the species name for comparison