def isFinished(self):
        # Criterion for ending an episode.
        # When the agent reaches the goal, the task is considered learned.
        # When the agent falls down, the episode is over.

        if self.max_tilt > np.abs(self.env.getTilt()):
            return True

        dist_to_goal = self.calc_dist_to_goal()
        if dist_to_goal == 0:
            print 'reached goal'
            return True

        #elapsed_time = self.env.time_step * self.t
        #if elapsed_time > self.max_time:
        #    print 'hit max time.', self.t, elapsed_time
        #    return True    
        return False
dataset/ETHPy150Open chrisdembia/agent-bicycle/randlov1998/tasks_gotorewards.py/LinearFATileCoding3456GoToTask.isFinished/swapped operands of `>`