Learn or remember: how to choose?