This paper studies the effects of changing environments on the evolution of bodies and brains of modular robots. Our results indicate that environmental history has a long lasting impact on the evolved robot properties. We show that if the environment gradually changes from type A to type B, then the evolved morphological and behavioral properties are very different from those evolving in a type B environment directly. That is, we observe some sort of “genetic memory”. Furthermore, we show that gradually introducing a difficult environment helps to reach fitness levels that are higher than those obtained under those difficult conditions directly. Finally, we also demonstrate that robots evolved in gradually changing environments are more robust, i.e., exhibit a more stable performance under different conditions.