docstr: off-policy
  obs: 交互前的obs, s_t
  action: 本次交互选择的action, a_t
  reward: 本次动作获得的奖励r
  next_obs: 本次交互后的obs, s_t+1
  done: episode是否结束
code: def learn(self, obs, action, reward, next_obs, done):
      """off-policy
      obs: 交互前的obs, s_t
      action: 本次交互选择的action, a_t
      reward: 本次动作获得的奖励r
      next_obs: 本次交互后的obs, s_t+1
      done: episode是否结束
      """
      predict_Q = self.Q[obs, action]
      if done:
          target_Q = reward  # 没有下一个状态了
      else:
          target_Q = reward + self.gamma * np.max(
              self.Q[next_obs, :]
          )  # Q-learning
      self.Q[obs, action] += self.lr * (target_Q - predict_Q)
  
file_path: PARL/examples/tutorials/lesson2/q_learning/agent.py
imports: import numpy
label_desc: Use image node_id 4 for calling the QLearningAgent obj's underlying member method code with example usage: obj.learn(obs, action, reward, next_obs, done) without return types