class_docstr: Agent.
  Args:
      algorithm (`parl.Algorithm`): algorithm to be used in this agent.
class_docstr_tok: ["Agent",".","Args",":","algorithm","(","`","parl.Algorithm","`",")",":","algorithm","to","be","used","in","this","agent","."]
docstr: Predict action
  Args:
      state (np.array): representation of current state 
  
  Return:
      action (np.array): action to be executed
docstr_tok: ["Predict","action","Args",":","state","(","np.array",")",":","representation","of","current","state","Return",":","action","(","np.array",")",":","action","to","be","executed"]
code: def predict(self, state):
      """Predict action
      Args:
          state (np.array): representation of current state
  
      Return:
          action (np.array): action to be executed
      """
  
      state_tensor = torch.tensor(state, dtype=torch.float32)
  
      with torch.no_grad():
          action = self.alg.predict(state_tensor).cpu().numpy()
  
      return action
  
file_path: PARL/examples/Baselines/Halite_competition/torch/rl_trainer/agent.py
imports: import os
  import parl
  import torch
label_desc: Use image node_id 3 for calling the Agent obj's underlying member method code with example usage: obj.predict(state) and returns: action