def increment_lesson(self, measure_val):
        """
        Increments the lesson number depending on the progress given.
        :param measure_val: Measure of progress (either reward or percentage
               steps completed).
        :return Whether the lesson was incremented.
        """
        if not self.data or not measure_val or math.isnan(measure_val):
            return False
        if self.data['signal_smoothing']:
            measure_val = self.smoothing_value * 0.25 + 0.75 * measure_val
            self.smoothing_value = measure_val
        if self.lesson_num < self.max_lesson_num:
            if measure_val > self.data['thresholds'][self.lesson_num]:
                self.lesson_num += 1
                config = {}
                parameters = self.data['parameters']
                for key in parameters:
                    config[key] = parameters[key][self.lesson_num]
                logger.info('{0} lesson changed. Now in lesson {1}: {2}'
                            .format(self._brain_name,
                                    self.lesson_num,
                                    ', '.join([str(x) + ' -> ' + str(config[x])
                                        for x in config])))
                return True
        return False
def increment_lesson ( self , measure_val ) : if not self . data or not measure_val or math . isnan ( measure_val ) : return False if self . data [ 'signal_smoothing' ] : measure_val = self . smoothing_value * 0.25 + 0.75 * measure_val self . smoothing_value = measure_val if self . lesson_num < self . max_lesson_num : if measure_val > self . data [ 'thresholds' ] [ self . lesson_num ] : self . lesson_num += 1 config = { } parameters = self . data [ 'parameters' ] for key in parameters : config [ key ] = parameters [ key ] [ self . lesson_num ] logger . info ( '{0} lesson changed. Now in lesson {1}: {2}' . format ( self . _brain_name , self . lesson_num , ', ' . join ( [ str ( x ) + ' -> ' + str ( config [ x ] ) for x in config ] ) ) ) return True return False
Increments the lesson number depending on the progress given.
        :param measure_val: Measure of progress (either reward or percentage
               steps completed).
        :return Whether the lesson was incremented.