Emotions and Motivations as behaviour architecture
June 13, 2014
Hi all, a few days ago, I started designing the behaviour-based architecture for my robot Hurby. I thought to design it as a Subsumption architecture (see my previous blogs) in which different behaviours compete to be selected as dominant, and hence move Hurby accordingly.
In one of my previous posts, I receive a comment from a LMR user (mtriplett) - thanks again Martin -. He suggested me making use of different motivations to drive those behaviours (like MIBE architecture). Motivations depends on emotions that Hurby can feel at different moments.
I've been reading a lot about Emotion and Motivation behaviour-based methologies during last days, and now, I'm really sure that this is the way I want to follow, so I will change the focus and rethink all I have done till now.
What I had already developed was a subsumption architecture in which different behaviours compete to win (see figure):
I had only developed the most basic behaviour "Happiness". According with its happiness level, Hurby would move faster or slower and emit voices or sounds.
Now, what I want to do is redesign the whole architecture to enable emotions in Hurby's behaviours. I've (by the way) identified these primary emotions:
These emotions will flow into several motivations, like:
- Find someone to play with
- Maximise playing time
- Avoid damage from someone
These motives pursue several goals: reduce boredom and frustation and get satiation. But all of them can be resumed into a great one: Happiness.
So, graphically, the architecture I want to implement now would look like something similar to this one:
Let's talk a bit deeper about each motive.
Find someone to play with
When Hurby is inactive (nobody is playing with it) it can measure time elapsed since last time somebody played with it. It is what I've named TSLP (time since last play). This variable measures its boredom level, I will use a Fuzzy inference system (FIS) to get boredom deegre in a range from 0 to 1.
On the other hand, Hurby has a presence IR detector and a voice recognition module. Both sensors serve to detect if someone is moving nearby.
According with its boredom level, Hurby will try to catch the attention of someone who moves around it. This motivation to find someone to play with, will increase as more and more bored it is.
The goal that pursues this motivation is reached when someone around, after seen Hurby's movements or voice/sound callings, starts playing with it: touching it or talking to it (telling a known command that Hurby can recognise).
When goal is reached, TSLP variable will go to 0 (last action has just occured and hence time elapsed since last play is zero). As this variable (TSLP) represents boredom level, now this motivation is satisfied and Hurby will give less importance to this motive, allowing other motives to be selected as dominant.
Also, as this motive flows into Happiness behaviour, actions driven by this motive will be modulated by its happiness state. For example, if Hurby is unhappy, it will catch someone's attention with sad words: "Hi, there is a long time without you. Are you fine??, Come here and tell me!!". On the other hand if happy it would try to catch your attention with funny movements and cheerful comments: "Hi again! I've got a joke for you, come here!!, Come on!!".
Maximise playing time
In this case, satiation is the emotion which drives this motive. Hurby is hungry of playing time and it wants to be satiated of it. To meet this goal it will try that someone playing with it, don't stop until a minimum time will be elapsed (satiation time).
This motive is directed by 2 main inputs:
- Time since first action: elapsed time since someone started to play with it. It is proportional to its satiation level.
- Playing time trend: measured in seconds elapsed between actions (touches and/or recognised voice commands).
According with both inputs, Hurby will try to keep playing if it detects that playing time trend decreases while not yet satiated. It would make you questions or ask you about actions to do: "Ohh please, tickling me, I want to laugh loud!!". If the person playing with it, go on with the play and tickled it, then its satiation level will increase.
Once maximum satiation level is reached (at least a minimum period of time (T) played) this motive will loose strength against others.
Avoid damage from someone
Even if Hurby is trying to catch someone's attention or it is playing, if it is lifted by its ears, it hurts. In this case its only motivation is stopping you doing that.
This motive is driven by 2 inputs:
- Time being lifted: measures time since damage condition started.
- Hurt status: tells if it is lifted by an ear or not.
In this case, when Hurby detects someone is lifting it by an ear, it will start moving strongly, and telling commands like "Please, that hurts, let's me go!!". If this situation continues, it will increase the strength of its movements and sounds.
The goal is reached when Hurby detects that its ears aren't pressed anymore, but its frustation degree will be influenced by the time elapsed, and of course it will affect to its basic happiness state.
Happiness as modulating behaviour
Those emotions: boredom, satiation and frustation, flow into a common happiness state, which will modulate all the actions (movements and voice/sounds) that Hurby will do. This modulation allows Hurby to change dynamically its character and showing different behaviours.
As a first approach I think I can code this new architecture quickly. Perhaps next week I could have results (a video or similar). Nevertheless I have the feeling that more in deep motives will raise when I start coding and testing it.
We shall see what happens!!!