Adaptation to different environments