DIVERSITY AND SPECIALIZATION IN COLLABORATIVE SWARM SYSTEMS