How Emotional Mechanism Helps Episodic Learning in a Cognitive Agent