This paper addresses qualitative and quantitative diversity and specialization issues in the frame- work of self-organizing, distributed, artificial systems. Both diversity and specialization are obtained via distributed learning from initially homogeneous swarms. While measuring diversity essentially quantifies differences among the individuals, assessing the degree of specialization implies to correlate the swarm’s heterogeneity with its overall performance. Starting from a stick-pulling experiment in collective robotics, a task that requires the collaboration of two robots, we abstract and generalize in simulation the task constraints to k robots collaborating sequentially or in parallel. We investi- gate quantitatively the influence of task constraints and type of reinforcement signals on diversity and specialization in these collaborative experiments. Results show that, though diversity is not explicitly rewarded in our learning algorithm and there is no explicit communication among agents, the swarm becomes specialized after learning. The degree of specialization is affected strongly by environmental conditions and task constraints, and reveals characteristics related to performance and learning in a more consistent and clearer way than diversity does.