Action Tendencies

After defining the emotional reactions, you can start defining the character’s action tendencies (AT). The AT is a reactive component that triggers a certain action when the character experiences a particular emotional state. In authoring principle for the emergent narrative concept, it is best to use the action tendencies for fairly unpredictable behaviour such as cry or insult for instance. It is important not to rely on action tendencies for the development of an episode as if the agent is not in the desired emotional state, nothing will happen.  The main advice is to use goals and sub-goals as much as possible.

There is one important restriction when specifying ATs. Action tendencies can only trigger one-shot actions, i.e., the action selected for execution is sent for execution, but if the action requires a previous action in order to be successful that will not be detected. As example, if a hit-back action tendency is specified but the agent needs to move close to the target to execute the hit-back, the reactive layer will not realize it and the hit back will surely fail. If it is necessary to have this kind of behaviour triggered by emotions, defining goals that are activated by emotions can do it. To see how this type of goals can be defined, examine the subsequent section about goal definition.

In order to define an AT it is necessary to specify a set of preconditions, exactly in the same way that goal activation conditions are specified. Please refer to goal subsection to see the possible types of preconditions and how you should specify them. The AT can only be triggered if the corresponding preconditions are satisfied. In most cases it is not necessary to specify preconditions for an action tendency. However, there are some cases where it is very useful such as in the example bellow.

<ActionTendency action=”SpeechAct([Target],insultgreeting)”>

<Preconditions>

<Property name=”[Target](type)” operator=”=” value=”character”/>

</Preconditions>

<ElicitingEmotion type=”Hate” minIntensity=”2″>

<CauseEvent/>

</ElicitingEmotion>

</ActionTendency>

This AT implement Luke’s reaction of insulting when he sees someone he doesn’t like. The hate emotion is generated when Luke looks at something he doesn’t like. If he experiences the emotion with an intensity equal or greater than 2, it will insult the target. However, there is the restriction that the target of the insult must be a character. If this precondition is removed, Luke will insult everything he doesn’t like, even other objects such as the victim’s books, which doesn’t make much sense.

Additionally to preconditions, its mandatory to define the eliciting emotion that triggers the action. That requires the definition of three fields, the type of the emotion, corresponding to one of OCC’s emotion types, the minimum intensity that is required to activate the action, and finally the event that caused the emotion. The cause event is specified exactly in the same way as events for emotional reaction rules are defined. Therefore you can leave some of its fields unspecified either by omitting them or by using the value “*”. Similarly to emotional reactions, if there is a tie between two AT’s selected for execution (i.e, they are triggered by the same emotion), the rule that defines the most specific cause event is preferred.

The AT selected for execution is the one triggered by the strongest emotion experienced by the agent. When an AT is selected and executed it will be temporarily disabled and will not become active while it is disabled. This is to prevent extremely repetitive behaviour that results in the same AT to be selected over and over again.

Although its good idea to write action tendencies the most generic possible, it will also be necessary to define more specific action tendencies as the next example shows. This AT is triggered by a gloating emotion that is activated by someone crying.

<ActionTendency action=”SpeechAct([Subject],mock)”>

<Preconditions>

</Preconditions>

<ElicitingEmotion type=”Gloating” minIntensity=”2″>

<CauseEvent subject=”*” action=”cry” target=”*” />

</ElicitingEmotion>

</ActionTendency>