class_docstr: Agent of Atari env.
  
  Args:
      algorithm (`parl.Algorithm`): algorithm to be used in this agent.
      act_dim (int): action space dimension
      start_lr (float): starting learning rate
      total_step (int): total learning rate and epsilon decay steps
      update_target_step (int): target network update frequency
docstr: Sample an action when given an observation, base on the current epsilon value, 
  either a greedy action or a random action will be returned.
  
  Args:
      obs (np.float32): shape of (3, 84, 84) or (1, 3, 84, 84), current observation
  
  Returns:
      act (int): action
code: def sample(self, obs):
      """Sample an action when given an observation, base on the current epsilon value,
      either a greedy action or a random action will be returned.
  
      Args:
          obs (np.float32): shape of (3, 84, 84) or (1, 3, 84, 84), current observation
  
      Returns:
          act (int): action
      """
      explore = np.random.choice(
          [True, False], p=[self.curr_ep, 1 - self.curr_ep]
      )
      if explore:
          act = np.random.randint(self.act_dim)
      else:
          act = self.predict(obs)
  
      self.curr_ep = max(self.ep_scheduler.step(1), self.ep_end)
      return act
  
file_path: PARL/examples/DQN_variant/atari_agent.py
imports: import parl
  import numpy
  import paddle
  from parl.utils.scheduler import LinearDecayScheduler
label_desc: Use image node_id 2 for calling the AtariAgent obj's underlying member method code with example usage: obj.sample(obs) and returns: act