A computational model of the evolution of antipredator behavior in situations with temporal variation of danger using simulated robots