code: def doEpisodes(self, number=1):
          
          env = self.task.env
          self.Pg = zeros((len(env.case.online_generators), len(env.profile)))
  
          rewards = super(OPFExperiment, self).doEpisodes(number)
  
          # Average the set-points for each period.
          self.Pg = self.Pg / number
  
          return rewards
docs: Does the the given number of episodes.