Enigma Architecture Kriegel November 2009

Enigma is an experimental platform for collaborative authoring of the behaviour of autonomous virtual characters in interactive storytelling applications. It originated from our experience in creating character driven interactive storytelling applications like FearNot! [1] in the EU FP6 project ECircus without any supporting authoring technology. The main idea is to overcome the bottleneck of knowledge acquisition that exists in generative interactive storytelling systems through a combination of crowd-sourcing and machine learning.

A client application which can be run directly from the browser allows contributors, who are invited by a principal author (PA) to create/tell a little story within a predefined story universe, e.g. the Little Red Riding Hood Universe. Every story that gets created within this client application will be submitted to a server where many of these stories are collected and processed by machine learning algorithms to infer generative character models that can be used to drive a virtual actor within an interactive drama. These virtual characters can also run in the background while a story is created in the client. This allows the characters to make suggestions at certain points in the story (more about this in [2] and [3]).

Diagram of Enigma architecture


User-friendliness of the authoring client is deemed very important if many contributors are expected to be mobilised. Although the end goal is the creation of a database of symbolic story knowledge, we assume that providing this knowledge ex- and implicitly in the process of telling stories will be easier for invited contributors than editing it directly. We however still have to verify this hypothesis through a series of experiments.

For the same reason (user friendliness and appeal) we have decided against a purely text based tool. Instead we opted for visualisation through a comics generation system [4]. Originally we planned to use a 3D graphics authoring interface, but later found that the comics system is a better choice. Using it allows us to have a thin authoring client (The comics are generated on the server side, a URL to the generated picture is returned) that can be easily distributed. Also, we need to represent event sequences within the authoring tool. With the way they are structured (1 panel = 1 event), comics provide a good mechanism for doing that. Finally this form of visualisation allows for uncomplicated graphics content generation independent of any specific tools (characters are represented by a series of annotated head and body pictures, scenes are simply panoramic pictures). Below is a screen shot of the client’s main editing window:

Authoring Client Screenshot


Storyworld in Enigma Kriegel November 2009

There is no particular limitation to any style/genre of red riding hood stories that can be generated with ENIGMA. If I was the PA responsible for such a project, I would set up the story world in such a way as to encourage the creation of a comical universe, where everything we know about fairy tales is turned on its head, similar to the Red Riding Hood version presented in the movie Hoodwinked!. An attempt of mine to create such a story world conception (originally created for the RRH workshop at TIDSE 2006) that opens up many possibilities of story development by giving characters conflicting goals can be found below.


The magic forest is right in the centre of the magic land. It is well known for its magic lawn, which is the only place in the world where the famous magic potatoes grow. Magic potatoes are loved by all inhabitants of the magic land for their psychedelic feel-good properties. Until recently everyone in the magic land lived peacefully together and there were enough potatoes for everyone to have a constantly good time. However, since the new chancellor is in power, things have changed. Tensions between different magical races that used to get along well are stirring up, certain races have been classified as “dangerous” and this is all fuelled by a constant potato shortage. The chancellor claims that potatoes are government property and that potato export is the key to a wealthier future for the whole magic land. In order to prevent the locals from their usual practice of picking potatoes, a hunter has been installed in the forest who is supposed to enforce the new laws. Citizens who collaborate and help to track down criminals are rewarded with extra potato rations.

Characters: Maia (Red Hood)

Maia is supposed to pay her Granny a visit. It’s a beautiful day and she is wearing her favourite red hood. However, all she can think about is the big party tonight. She only agreed to visit her granny because that gives her the opportunity to collect some magic potatoes for the party tonight. Plus Granny also likes them. Her only worry is that this new overambitious hunter catches her with the potatoes. She could get into a lot of trouble. If only she knew that there is also a dangerous wolf on the loose that she needs to worry about…

Characters: Hans (Hunter)

Hans is the new hunter in the magic forest. He takes law enforcement very seriously. He has already made the forest a much safer place by arresting most of its dangerous inhabitants including bears, wolfs and squirrels. However, there is one wolf that he could not catch so far but he won’t be able to hide forever. Hans is also fighting a determined battle against potato theft much to the dislike of the locals. This morning he built a big fence around the magic potato lawn. The only key to the gate is in his pocket. Right now he is having a well deserved rest and is taking a nap but the slightest sound will wake him up, his loaded gun next to him…

Characters: Lupo (Wolf)

Lupo is the only wolf left in the magic forest. He feels discriminated and all he wants is to leave the country. However he needs some disguise because Hans has his spies everywhere. A hood would be ideal. The other big problem is that Lupo would give anything for a few potatoes but since this morning they are all behind a big fence: another trick of this new hunter to make his life more difficult. Lupo, a convinced vegetarian, realizes that the lack of potatoes makes him aggressive and when he starts feeling hungry he is for the first time in his life actually fancying some meat. That is when this girl in red comes along the way….


Enigma Example Scene Kriegel November 2009

Given the story world concept, an excerpt of a story that a contributing author creates with Enigma could for example look like the following: first frame of example story second frame of example story third frame of example story fourth frame of example story fifith frame of example story

Creation Process with Enigma Kriegel November 2009

As mentioned in the Tool Architecture description, authoring work is split between a principal author (PA) and numerous contributors, who the PA invites. In general the system design assumes minimal technical knowledge from contributors, however the PA needs a deep technical understanding of how the system works.

Creation process for the principal author:

In order to collect red riding hood themed stories with the Enigma authoring client the principal author (PA) has to first create a story world, in which the invited contributors can create stories. This involves defining which characters, objects and locations are available and setting up an initial repertoire of actions, speech acts, properties and types (the contributors will be able to create more of those) to give the contributors a starting point. All of this is done by editing XML files. Also the PA should provide some backstory (such as in Story World Concept) for the contributors to read before they go about the authoring task.

Finally the PA also has to make sure that graphical resources, which allow a comics visualisation of characters, places and events, are in place. Using the comics system, this process can be much faster than it would be if 3D graphics were involved. Also the comics system is useful for rapid prototyping. The comics library for the Red Riding Hood Story World that was used to create the Example Scene was relatively easy to set up, it involved scanning in 4 hand drawn characters and finding some backgrounds images from the internet. Of course if it is a serious authoring project, this can and should be extended by for example creating more expressions for characters and creating original background images that fit perfectly with the style of the characters.

Creation process for invited contributors:

Contributors tell stories by creating events in the authoring client. First they select a subject, then an action. Depending on the action’s signature (number and type of parameters) they have to make additional selections in order to create the event. For example, if the author selects the action steal, they also will have to select an item to steal and a person to steal from.

Authors can also create new actions through a wizard. Since the graphics library will not contain any content for visualizing this action, the author can provide a narration text that will be used as a place holder for visualizing this action. The PA or an additional “artist in the loop” could later add visualisation for this action.

In the case of dialogue, contributors can reuse existing speech acts (units of dialogue) or create new ones. In the latter case they can not just enter a new line of dialogue; they also have to provide a name to identify the dialogue line as a speech act.

Finally authors can also control the narrative time and place and cause scene changes, character entries and exits, etc.


The user interface of the authoring tool will also ask contributors to annotate the stories they create in order to collect additional semantic context information for the processing of the stories by the Enigma Server. After creating a new event, authors can specify how characters’ emotions changed due to this event and which properties change. For example a character can have a property with the name “awake” and the data type boolean that is changed from true to false through the action “go to sleep”. A contributor specifies this by choosing properties and their values from lists. If a property that is needed to describe an event is not yet part of the domain model, the contributor can also define new properties at this stage (this might also involve defining new data types).

After finishing the story, authors will also be asked to specify which goals characters had during the story, at which point in the story they started, succeeded or failed and which events contributed to these goals. We will have to determine through user trials of the tool, whether most authors are willing to perform this annotation and whether the concepts involved in the annotation (properties, types, goals) etc are understandable for non-experts. In case they are not, the PA might have to perform the annotation himself. Alternatively we might adopt an intermediate solution where the annotations are written in natural language by the contributors and the PA has to translate them into machine readable format afterwards.