class_docstr: An agent specifically for solving DefeatRoaches using raw actions.
class_docstr_tok: ["An","agent","specifically","for","solving","DefeatRoaches","using","raw","actions","."]
code: def step(self, obs):
      super(DefeatRoachesRaw, self).step(obs)
      marines = [
          unit.tag
          for unit in obs.observation.raw_units
          if unit.alliance == _PLAYER_SELF
      ]
      roaches = [
          unit
          for unit in obs.observation.raw_units
          if unit.alliance == _PLAYER_ENEMY
      ]
  
      if marines and roaches:
          # Find the roach with max y coord.
          target = sorted(roaches, key=lambda r: r.y)[0].tag
          return RAW_FUNCTIONS.Attack_unit("now", marines, target)
  
      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 2 for calling the DefeatRoachesRaw obj's underlying member method code with example usage: obj.step(obs) and returns: FUNCTIONS, RAW_FUNCTIONS