Pātuhitia tēnei: Adaptation in stochastic environments