Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study