def isFinished(self):
        #returns true if episode timesteps has reached episode length and resets the task
        if self.count > self.epiLen:
            self.res()
            return True
        else:
            if self.count == 1:
                self.pertGlasPos(0)
            if self.count == self.epiLen / 2 + 1:
                self.env.reset()
                self.pertGlasPos(1)
            self.count += 1
            return False
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/tasks/ccrl.py/CCRLPointVarTask.isFinished/original