<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def doEpisodes(self, number=1):
 """ Does the the given number of episodes. """

        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