Adapting to environmental dynamics with an artificial circadian system. (June 2020)