Robots can now learn to swarm on the go