Functionalist Emotion Model in Artificial General Intelligence