docstr: 根据观测值 obs 选择最优动作
          
code: def predict(self, obs):
      """根据观测值 obs 选择最优动作"""
      obs = paddle.to_tensor(obs, dtype="float32")
      prob = self.alg.predict(obs)
      act = int(prob.argmax())  # 根据动作概率选择概率最高的动作
      return act
  
file_path: PARL/examples/tutorials/parl2_dygraph/lesson4/homework/policy_gradient_pong/agent.py
imports: import parl
  import paddle
  import numpy
label_desc: Use image node_id 3 for calling the Agent obj's underlying member method code with example usage: obj.predict(obs) and returns: act