def normalize_score(score, mean, std):
    """
    Normalizes the score by centering it at 0.5 and scale it by 2 standard deviations. Values below 0 or above 1
    are clipped.
    :param score: The score to standardize.
    :param mean: The mean score for this subject.
    :param std: The standard deviation of scores for the subject.
    :return: The score centered at 0.5 and scaled by 2 standard deviations.
    """
    score -= mean
    if std != 0:
        score /= std*2  # We don't want to clip to much of the distribution
    score += 0.5
    if score < 0:
        score = 0
    elif score > 1:
        score = 1
    return score