Balancing Logic and Emotion in Problem Solving