(self, curr_scores)
Smooth the current prediction score
            by taking the average with previous scores
Smooth the current prediction score
            by taking the average with previous scores
Smooth the current prediction score by taking the average with previous scores
def smooth_scores(self, curr_scores):
        ''' Smooth the current prediction score
            by taking the average with previous scores
        '''
        self.scores_hist.append(curr_scores)
        DEQUE_MAX_SIZE = 2
        if len(self.scores_hist) > DEQUE_MAX_SIZE:
            self.scores_hist.popleft()

        if 1:  # Use sum
            score_sums = np.zeros((len(self.action_labels),))
            for score in self.scores_hist:
                score_sums += score
            score_sums /= len(self.scores_hist)
            print("\nMean score:\n", score_sums)
            return score_sums

        else:  # Use multiply
            score_mul = np.ones((len(self.action_labels),))
            for score in self.scores_hist:
                score_mul *= score
            return score_mul
def smooth_scores ( self , curr_scores ) : self . scores_hist . append ( curr_scores ) DEQUE_MAX_SIZE = 2 if len ( self . scores_hist ) > DEQUE_MAX_SIZE : self . scores_hist . popleft ( ) if 1 : # Use sum score_sums = np . zeros ( ( len ( self . action_labels ) , ) ) for score in self . scores_hist : score_sums += score score_sums /= len ( self . scores_hist ) print ( "\nMean score:\n" , score_sums ) return score_sums else : # Use multiply score_mul = np . ones ( ( len ( self . action_labels ) , ) ) for score in self . scores_hist : score_mul *= score return score_mul