Redcap

Linear Logic System Architecture Champagnat November 2009

Our architecture is based on two components: an Interactive Storytelling rendering and an Interactive Storytelling controller.

The controller aims to manage the unfolding of the history by taking into account the player actions and according to the structure of the narrative pre-defined. The controller is based on a computational model of Interactive Storytelling: Linear Logic. We adapt Greimas analysis to the constraints of Interactive Storytelling.

Greimas was the first to develop narrative formalism as an abstract formula to represent an action (narrative program). He proposed to define an action as a transition from one state to another state where the subject gains or loses an object (conjunctive or disjunctive narrative program).

Linear Logic has been introduced by J.-Y. Girard as a restriction of classical logic. Unlike classical logic, Linear Logic is not used to determine whether an assertion is true or not but rather the validity of how formulas are used (and then consumed) when proving an assertion. Linear Logic is well suited to derive a computational model to partially ordered problems with resource sharing.

The main connector of Linear Logic are:

 

  • ⊸: Implication (imply), express the possibility of deduction. Example: 2€ ⊸ trawberries . Means that I can give 2 € to buy strawberries.
  • ⊗: Multiplicative conjunction (times), a set of resources (not ordered). Example: strawberry strawberry . Means that there are two different strawberries (strawberry 2)
  • ℘: Multiplicative disjunction (par). Example: strawberry ⊗2 ℘ strawberry ⊗5. Means that there is two set of strawberries (one belongs to Alice and the other one to Bob for instance)

  • ⊕: Additive disjunction (plus), external choice. Example: strawberry ⊕ raspberry . Expresses a choice (external to the process). The player can choose strawberry or raspberry 
  • &: Additive conjunction (with). Example: strawberry & raspberry . Expresses a choice (internal to the process). The game can choose strawberry or raspberry 

  • ⊢: Turnstile, separate the left part (antecedent) and the right part (consequent) of a sequent. Example: D , D E E Linear implication express the possibility to produce a copy of E by consuming a copy of D AND a copy of ⊸ E 

 

A sequent of Linear Logic expresses all the possible narratives of a story. Each narrative corresponds to a proof of the sequent (Proving a sequent consists in rewriting the sequent by making a substitution of the formulas in order to have an initial sequent). As the proof is not unique, we can deduce various narratives.

The following sequent: A, C , D , A C B C , D E , E C F C B C  F; gives the following proof graph (simplified to the substitution of the linear implication).

It is then possible to compute a sequent by using Petri nets. It has been proved that there is an equivalence between a sequent of Linear Logic and a Petri net (with some restrictions). A token player algorithm is then used to compute the model of Interactive Storytelling.

 

 

LRRH Storyworld in Linear Logic Champagnat November 2009

Our system aims to derive an interactive storytelling where the player can influence the unfolding of the story (the discourse). As a consequence for a given storyworld we define various possible discourses (that are base on the same pattern of story structure).

The storyworld (character, setting, etc.):  the Little Red Riding Hood history. The Little Red Riding Hood, the mother, the grandmother, the wolf, the hunters, a wood between the two houses, a cake and a little pot of butter.

The player is cast as the Little Red Riding Hood and act within the time and space of the fictional world of the Little Red Riding Hood history.

Three possible narratives :

- N1: Folk tales: based on Grimms’ narrative. The Little Red Riding Hood walks through the woods to deliver food to her sick grandmother. The wolf wants to eat her, and goes to the grandmother house. A hunter help her to kill the wolf.

- N2: Fairy tales: a witch put a spell on the little Red Riding Hood. She has one day to marry a prince otherwise she will become a dwarf. The wolf, who is a princess that was put a spell, fells in love with the Little Red Ridding Hood and try to seduce her. Finally the Little Red Riding Hood gives a kiss to the wolf that becomes a wonderful prince. They get married, etc.

- N3: Action tales: the Little Red Ridding Hood wants to kill the wolf. The wolf escapes and meets hunter that protect him against the Little Red Riding Hood. The Wolf encounter Grandmother, take her as hostage, and there is a final fight. The Little Red Riding kills the wolf.

 

Each narrative follows a basic structure:

1- Introduction

2- The task

3- Encounter with the Wolf

4- The two ways

5- The Wolf and the Grandmother

6- Arrival of Little Red Ridding Hood

7- First dialogue

8- Second dialogue

9- Conclusion

Example Scene in Linear Logic Champagnat November 2009
Three possible narratives :
- N1: Folk tales: based on Grimms’ narrative. The Little Red Riding Hood walks through the woods to deliver food to her sick grandmother. The wolf wants to eat her, and goes to the grandmother house. A hunter help her to kill the wolf.
- N2: Fairy tales: A witch put a spell on the little Red Riding Hood. She has one day to marry a prince otherwise she will become a dwarf. The wolf, who is a princess that was put a spell, fells in love with the Little Red Ridding Hood and try to seduce her. Finally the Little Red Riding Hood gives a kiss to the wolf that becomes a wonderful prince. They get married, etc.
- N3: Action tales: the Little Red Ridding Hood wants to kill the wolf. The wolf escapes and meets hunter that protect him against the Little Red Riding Hood. The Wolf encounter Grandmother and there is a final fight. The Little Red Riding kills the wolf.
 
Basic structure :
BS1- Introduction
BS2- The task
BS3- Encounter with the Wolf
BS4- The two ways
BS5- The Wolf and the Grandmother
BS6- Arrival of Little Red Ridding Hood
BS7- First dialogue
BS8- Second dialogue
BS9- Conclusion
 
Each narrative gives plot at each stage of the basic structure.
 
- BS1: It is more a triggered event
N1: LRRH asks for her Grandmother’s health
N2: LRRH asks for eating a cake
N3: LRRH takes a gun
 
- BS2:
N1: Her mother gives cake and a pot of butter to deliver to Grandmother
N2: A witch puts a spell on her
N3: Her mother tells her about a wolf that eat goats
 
Character states
- Wolf
We: aims to eat the LRRH
Ws: aims to seduce the LRRH
Wr: escapes from the LRRH
Wd: dead
 
- Little Red Riding Hood
Lw: aims to kill the wolf
Lh: was putted a spell
Lv: goes to visit her grandmother
 
Player inputs:
- Little Red Riding Hood
ILs: shoots the wolf
ILk: kisses the wolf
IL1: walks way 1
IL2: walks way 2
ILh: asks for her Grandmother’s health
 
Narrative program:
LRRHAsksForGMHealth : BS1 \tprod Lo \tprod ILh \limp BS2N1 \tprod Lv
LRRHAsksForEatingACake : BS1 \tprod ILc \limp BS2N2
LRRHTakesAGun : BS1 \tprod Lo \tprod ILg \limp BS2N3 \tprod Lw \tprod Lg
MotherAsksToBringCake : BS2N1 \tprod IMa \imp BS3N1
LRRHShootsTheWolf : BS3N1 \tprod ILs \tprod Lv \tprod We \limp Lw \tprod BS3N3 \tprod Wr
WGivesAWrongWay : BS3N1 \tprod IWw \limp BS4N1
WEatsGM : BS4N1 \tprod IWg \limp BS5N1
WAsksGMtoHelpHim : BS4N1 \tprod IWa \limp BS5N2
WTaksGMAsHostage : BS4N1 \tprod IWh \limp BS5N3
LRRHEntersTheHouse : BS5N1 \tprod BS6N1
LRRHEscapesTheWolf : BS6N1 \tprod ILe \limp BS7N1
WitchPutASpell : BS2N2 \tprod IW \tprod Lo \limp BS3N2 \tprod Lh
LRRHKissesTheWolf : BS3N2 \tprod Lh \tprod ILk \limp lr
WSeducesLRRH : BS3N2 \tprod IWs \limp BS4N2
 
An output of the game partial execution:
 
Creation Process with Linear Logic Champagnat November 2009

 An authoring tool gives the storyworld and the narrative program.

It is then transformed into a sequent of Linear Logic. An automatic translator transforms the sequent into a Petri net. Finally the Petri nets performs the execution of the model and can interact with the Interactive Storytelling Rendering.