From Real-Time Adaptation to Social Learning in Robot Ecosystems