Stimulus coding rules for perceptual learning