Reinforcement learning and episodic memory in humans and animals: an integrative framework