Monday 17 September 2007

Emotions

During reading of a paper on semi-autonomous wolves (called AlphaWolf) I was inspired to think a little about the emotional aspect of the character. At present, my initial thoughts are to essentially have a chatbot with emotions sitting on top - the emotions being reactive to the situation.

Given that I have done some work with Prolog in my AI module last year, it seems to me that it would make sense to manage the emotional state of my character in this way. It might be easier to plug a Prolog "emotion engine" into a C++ program than program something nearly as effective in C++ itself.

The current emotional state at any moment will be given by the previous emotional state, response to certain words and perhaps response the person themselves. It seems that the best way to encode the emotions are in pairs, these are the pairs I've thought of so far (don't want too many as this will over complicate things):
  • happy/sad
  • angry/calm
  • love/hate
  • flirtatious/hostile

These emotions will also be related in certain ways. Again, the ones I have thought of so far are listed here:

  1. increased anger increases sadness (or decreases happiness)
  2. increased sadness doesn't affect anger
  3. increased happiness decreases anger
  4. the character can be calm (i.e. not angry) without being happy
  5. anger should wear off
  6. consistently happy character should lead to increased love
  7. consistently sad/angry character should lead to hate (anger should affect more than sadness)
  8. certain words should evoke love/hate response
  9. strong love/hate emotions should lead to increased emotional response elsewhere
  10. love above a certain level should activate flirtatiousness (?)
  11. hate above a certain level should activate hostility

With regards to response to words, the character should respond not only to words spoken to it, but to the words that the chatbot generate. I think at present that the words coming into the character should have twice the strength of words being spoken. I think it is also important that the character includes some learning ability, whereby it can add words to the love/hate lists.

I mentioned about response to the user. It would seem a good idea that the character remembers a user, even if all it does is remember the emotional state it was in when the user last finished. That way, it will appear to have emotional memory and it's response to a user will be affected by the way the user treats it.

Two last thoughts:
The "speech" of the character should also be affected by the emotional response. An angry person would not answer a question the same way as a flirtatious one.
Last but not least, I've just thought that I've been thinking about speech and emotions, but the character will exist in 3D, it will also need to have gestures! Yet another thing to think about!

No comments: