assignment3_coding/starter_code 2/code/policy_network.py
def update_averages(self, rewards, scores_eval):
    """
    Update the averages.

    You don't have to change or use anything here.

    Args:
        rewards: deque
        scores_eval: list
    """
    self.avg_reward = np.mean(rewards)
    self.max_reward = np.max(rewards)
    self.std_reward = np.sqrt(np.var(rewards) / len(rewards))

    if len(scores_eval) > 0:
      self.eval_reward = scores_eval[-1]

    Update the averages.

    You don't have to change or use anything here.

    Args:
        rewards: deque
        scores_eval: list
    
Update the averages.
You don't have to change or use anything here.
Update the averages . You don ' t have to change or use anything here .
def update_averages(self, rewards, scores_eval):
    self.avg_reward = np.mean(rewards)
    self.max_reward = np.max(rewards)
    self.std_reward = np.sqrt(np.var(rewards) / len(rewards))
    if len(scores_eval) > 0:
      self.eval_reward = scores_eval[-1]
def update_averages ( self , rewards , scores_eval ) : self . avg_reward = np . mean ( rewards ) self . max_reward = np . max ( rewards ) self . std_reward = np . sqrt ( np . var ( rewards ) / len ( rewards ) ) if len ( scores_eval ) > 0 : self . eval_reward = scores_eval [ - 1 ]
Update the averages.
Update the averages .
"""
    Update the averages.

    You don't have to change or use anything here.

    Args:
        rewards: deque
        scores_eval: list
    """
self
rewards
None
scores_eval
None