Learning Emotions: A Software Engine for Simulating Realistic Emotion in Artificial Agents