Category Learning and Comparison in the Evolution of Similarity Structure