Adaptive environment control