Deciding what to learn in complex environments