code: def compute_rewards(self, scores):
          
          # get the k + 1 best scores in descending order
          best_scores = sorted(scores, reverse=True)[:self.k + 1]
          velocities = [best_scores[i] - best_scores[i + 1]
                        for i in range(len(best_scores) - 1)]
  
          # pad the list out with zeros to maintain the length of the list
          zeros = (len(scores) - self.k) * [0]
          return velocities + zeros
docs: Compute the "velocity" of (average distance between) the k+1 best
          scores. Return a list with those k velocities padded out with zeros so
          that the count remains the same.