Pepper, Artificial Intelligence, Humanoid Robotics Thu, Dec 1, '16
Coding A Conversation: How Pepper Communicates

Pepper’s unique ability to emotionally interact with humans isn’t magic…it’s code! The key component of robotic conversation is the creation of topics, which are a set of rules, concepts and proposals. These elements written into QiChat syntax (language used to write Dialog Topic files) lay out the template for how conversations with Pepper, in this specific application, will flow.

One type of rule associates a user input (talking) to a robot output (response). User input can be as simple as a lone keyword, or more complex with [alternatives “different options” “different choices”] for words, and {even} optional parts. When an utterance from the user matches one of the user inputs among the available rules, the corresponding robot output is triggered.

Here we can see Pepper introducing a topic with a rule

Here we see a subrule that will be initiated dependent on the human response

At that time all sub-rules, if any, of the matching rule will become active. This is how a conversation might go in a mall or shopping center. (Note this is a schematic of the topic file, meaning the content is symbolic.)

Conversation Flow

Here Pepper is initiating the conversation and will introduce itself and may begin the process by asking the gender of who you are shopping for.

Here are the two sets of conversations that could occur.

The ‘~’ symbol has been used in several occasions above. It refers to a concept, which can be static or dynamic. A concept is a listing of one or several options. It allows us to define user inputs that are more comprehensive of all the ways a user could ask for something. It also allows us to define robot outputs that shuffle during your use of the app to avoid the broken record effect. For example:

If the answers given are within the brackets, Pepper will proceed to the next part of the conversation.

In reference to: ~Promo1- ~Promo6

These concepts represent the different products that Pepper could offer that day based on the different promotions that are running. This allows a range of products to be shown without having to change anything in the application. To make this process happen, we use dynamic concepts, these are displayed like this:

dynamic: example_concept

i.e. dynamic: ‘Promotion’

By default a dynamic concept is empty and needs to be provided with content at runtime. Topics will rarely be the only component of an app, more often than not some code will be running alongside it. The most convenient being a Python script. From there, a call to ALDialog::setConcept will allow your application to feed in content. This content could come from a Content Management System (CMS), or from the actual store catalogue!

For example, ~promo1 could be “toy car” “building blocks” “stuffed animal”

This also gives the retailer the opportunity to offer a wider variety of products. This is just a taste of what Pepper’s interactions have the potential to become, to find out more, visit our developer portal!