Robots with spatial and temporal memory