Selection, adaptation, and predictive information in changing environments