Text this: Hamiltonian patterns of age-dependent adaptation to novel environments.