This document describes implementing emotional intelligence in a machine by providing a pseudo-code algorithm. The pseudo-code builds on a previous work that implemented a complete cyber personality. It includes functions to analyze input text, understand word meanings and context using linguistic rules and databases, infer emotions, and generate natural language responses based on the inferred emotions and context. The goal is to endow artificial agents with the ability to understand human emotions and have more human-like conversations.