'Modifies reward by a small random values s to pull it towards the mean.
If reward is above the mean, s is subtracted; if reward is below the mean,
s is added. The random value is in the range 0-0.2. This function is helpful
to ensure that the model does not become too certain about playing a
particular note.
Args:
reward: A reward value that has already been computed by another reward
function.
Returns:
Original float reward value modified by scaler.'

def random_reward_shift_to_mean(self, reward):

    s = (np.random.randint(0, 2) * 0.1)
    if (reward > 0.5):
        reward -= s
    else:
        reward += s
    return reward
