class_docstr: An agent specifically for solving the DefeatRoaches map.
class_docstr_tok: ["An","agent","specifically","for","solving","the","DefeatRoaches","map","."]
code: def step(self, obs):
      super(DefeatRoaches, self).step(obs)
      if (
          FUNCTIONS.Attack_screen.id
          in obs.observation.available_actions
      ):
          player_relative = (
              obs.observation.feature_screen.player_relative
          )
          roaches = _xy_locs(player_relative == _PLAYER_ENEMY)
          if not roaches:
              return FUNCTIONS.no_op()
  
          # Find the roach with max y coord.
          target = roaches[numpy.argmax(numpy.array(roaches)[:, 1])]
          return FUNCTIONS.Attack_screen("now", target)
  
      if FUNCTIONS.select_army.id in obs.observation.available_actions:
          return FUNCTIONS.select_army("select")
  
      return FUNCTIONS.no_op()
  
imports: import numpy
  from pysc2.agents import base_agent
  from pysc2.lib import actions
  from pysc2.lib import features
label_desc: Use image node_id 1 for calling the DefeatRoaches obj's underlying member method code with example usage: obj.step(obs) and returns: FUNCTIONS, FUNCTIONS, FUNCTIONS, FUNCTIONS