code: def __init__(
      self, obs_n, act_n, learning_rate=0.01, gamma=0.9, e_greed=0.1
  ):
      self.act_n = act_n  # 动作维度，有几个动作可选
      self.lr = learning_rate  # 学习率
      self.gamma = gamma  # reward的衰减率
      self.epsilon = e_greed  # 按一定概率随机选动作
      self.Q = np.zeros((obs_n, act_n))
  
file_path: PARL/examples/tutorials/homework/lesson2/sarsa_frozenlake/agent.py
imports: import numpy
label_desc: Use image node_id 1 to create a new SarsaAgent object from inherited base classes: object with example: obj = SarsaAgent(obs_n, act_n, learning_rate, gamma, e_greed)