Improving the performance of multi-robot systems by task switching