We describe the workings of a stochastic Interaction Management (IM) module, show-casing a use-case where this IM has been implemented as a part of a robotic tutor who can sense the user’s affect and respond in an empathic manner. The IM is designed to be re-usable across interactive tasks, using a scripting language. We use an Engine-Script design approach, so that the IM can be used as part of the conversational agent as well as user simulations.
The IM can be seen as the central decision making body in the architecture (see Fig 1.). It is responsible for updating and maintaining the context of the interaction and also for deciding how to respond to the input received.
Fig 1. Interaction Manager in EMOTE architecture
The module was designed in two parts: Engine and Script. The engine is a generic implementation of the functionalities of the IM while the script presents the details of the interaction task to the engine. The major advantage of keeping the engine and the script separate is the reusability factor: the IM can be reused for other interactive tasks by simply changing the script.
The IM Engine implements the Information State Update approach (Larsson and Traum, 2000), extended further to include stochastic behaviours and learning capability. When presented with an input, the IM engine executes a two-step process: update context and select next action. Both steps are driven by a set of rules specified in the script. All rules to update context whose preconditions are satisfied are executed. However, for action selection rules, the IM follows one of the following approaches:
- First Fire: Execute the rule whose precondition is satisfied first. In this approach, the order in which the rules are placed in the script file is important.
- Collect and Select: Collect all actions whose preconditions are satisfied and select one at random.
Action selection rules can be stochastic. Within a given rule there can be several actions, each set with a probability of execution, provided the preconditions are met. In addition, the IM can be set to run as a Reinforcement Learning agent, to optimise its choice of actions for a given reward function, instead of randomly selecting one (i.e. in collect and select).
The IM script defines context and behaviour of the Interaction Manager. It informs the IM Engine on how state update and action selection needs to be carried out for any given interactive task. The script also defines the state of the interaction, which is used to maintain the context of the conversation. The script is written in a formal language in the form of an XML document. The top level elements of the script is shown in Figure 2. These include the dialogue state (see Fig 3.) and input specifications, state update and stochastic action selection rules (see Fig. 4).
Fig 2. Top level elements of the script
Fig 3. Example dialogue state
Fig 4. Example action rule
The IM engine can manifest both as a conversational agent as well as a simulated user by using two instances of the IM engine with different IM scripts.
We combined both empathic and pedagogical strategies in a unique and natural way in order to
provide an effective learning experience using the IM script. These scripts were prepared in consultation with experts in education and psychology. The core IM engine is tailored to manage interaction in two EMOTE scenarios by providing it with IM scripts.
The Interaction Manager for EMOTE is made of three modules:
|Module description||Package/folder name|
|XML BASED DIALOGUE MANAGER - This is the core IM engine that was explained in section 2 above. This serves as the rule engine. The IM engine is written in Java.||XSDM|
|EMOTE IM - This is the module that uses the core IM engine providing it with EMOTE specific IM scripts (see scripts folder). In this module, core IM actions are translated into EMOTE messages for inter-module communication. For instance, the core IM’s dialogue actions are translated into performUtterance action that is sent to the Skene module for the robot to present to the user in the form of spoken utterance and associated gestures. EMOTE IM is written in Java.||Interaction Manager|
|IM-THALAMUS INTERFACE - This module serves as the bridge between the EMOTE IM module and Thalamus. This is written in C#. ||IntManInterface|
Download and running instructions:
The source code and binaries for the latest version of the interaction manager can be found here:
The current version of the IM is embedded within the Thalamus framework for EMOTE scenarios. Therefore, in order to run the IM, you will need to run Thalamus which serves as the hub for all other modules to communicate.
EMOTE IM takes input from the learner model for Scenario 1 and Enercities modules for Scenario 2. It outputs EMOTE messages to the SKENE module. These modules need to run as well. However, XSDM module can be independently used as a IM rule engine.
Srinivasan Janarthanam, Helen Hastie, Amol Deshmukh, Ruth Aylett and Mary Ellen Foster, 2015, A reusable interaction management module: Use case for empathic robotic tutoring, In proc. SEMDIAL 2015, Gothenburg.
Larsson and D. Traum. 2000. Information state and dialogue management in the TRINDI dialogue move engine toolkit. Natural Language Engineering, 6:323 340