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