Adaptation to habitat