Environment-adaptable polymers