How does the brain make flexible, categorical decisions?