Skip to main content
Log in

Modeling interactive storytelling genres as application domains

  • Published:
Journal of Intelligent Information Systems Aims and scope Submit manuscript

Abstract

In this paper, we introduce a formalism to specify interactive storytelling genres in the context of digital entertainment, adopting an information systems approach. We view a genre as a set of plots, where a plot is a partially ordered sequence of events, taken from a fixed repertoire. In general, the specification of a genre should allow to determine whether a plot is a legitimate representative of the genre, and also to generate all plots belonging to the genre. The formalism divides the specification of a genre into static, dynamic and behavioral schemas, that reflect a plan recognition/plan generation paradigm. It leads to executable specifications, supported by LOGTELL, a prototype tool that helps users generate, modify and reuse plots that follow a genre specification. To illustrate the use of the formalism, we specify a simple Swords & Dragons genre and show plots generated by the tool.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1

Similar content being viewed by others

References

  • Aarne, A. (1964). The types of the folktale: A classification and bibliography. Helsinki: Suomalainen Tiedeakatemia (Translated and enlarged by Thompson, S., FF Communications, 184).

    Google Scholar 

  • Bal, M. (2002). Narratology—Introduction to the theory of narrative. Toronto: University of Toronto Press.

    Google Scholar 

  • Bloom, H. (2003). A map of misreading. Oxford: Oxford University Press.

    Google Scholar 

  • Borgida, A., & Brachman, R. J. (2003). Conceptual modeling with description logics. In F. Baader, D. Calvanese, D. L. McGuiness, D. Nardi, & P. F. Patel-Schneider (Eds.), The description logic handbook: Theory, implementation and applications. Cambridge: Cambridge University Press.

    Google Scholar 

  • Calvanese, D., & De Giacomo, G. (2003). Description logics for conceptual data modeling in UML. In Proceedings of 15th European summer school in logic language and information, August 2003, Vienna (Austria), pp. 18–29.

  • Cavazza, M., Charles, F., & Mead, S. (2002). Character-based interactive storytelling. IEEE Intelligent Systems, Special Issue on AI in Interactive Entertainment, 17(4), 17–24.

    Google Scholar 

  • Cervesato, I., Franceschet, M., & Montanari, A. (1997). Modal event calculi with preconditions. In Proceedings of 4th international workshop on temporal representation and reasoning, Daytona Beach, FL, U.S.A., pp. 38–45.

  • Chen, P. P. (1976). The entity-relationship model: Towards a unified view of data. ACM Transaction on Database Systems, 1(1), 9–36.

    Article  Google Scholar 

  • Ciarlini, A. E. M. (1999). Geração interativa de Enredos. Ph.D. Thesis, Departamento de Informática, PUC-Rio, Brazil (in Portuguese).

  • Ciarlini, A. E. M., Barbosa, S. D. J., Casanova, M. A., & Furtado, A. L. (2009). Event relations in plan-based plot composition. ACM Computers in Entertainment, 7(3), 198–209.

    Google Scholar 

  • Ciarlini, A. E. M., Camanho, M. M., Doria, T. R., Furtado, A. L., Pozzer, C. T., & Feijó, B. (2008). Planning and interaction levels for TV storytelling. In Proceedings of ICIDS’ 08—1st joint international conference on interactive digital storytelling, Erfurt, Germany.

  • Ciarlini, A. E. M., Casanova, M. A., Furtado, A. L., & Veloso, P. A. S. (2007). Treating literary genres as application domains. Technical Report MCC 19/2007, Dept. of Informatics, PUC-Rio.

  • Ciarlini, A. E. M., & Furtado, A. L. (1999). Simulating the interaction of database agents. In Proceedings of DEXA’99—Database and expert systems applications conference, Florence, Italy.

  • Ciarlini, A. E. M., & Furtado, A. L. (2002). Understanding and simulating narratives in the context of information systems. In Proceedings of 21st international conference on conceptual modeling, Tampere, Finland.

  • Ciarlini, A., Pozzer, C., Furtado, A., & Feijó, B. (2005). A logic-based tool for interactive generation and dramatization of stories. In Proceedings of ACM SIGCHI international conf on advances in computer entertainment technology-ACE.

  • Culler, J. (1977). Structuralist poetics: Structuralism linguistics and the study of literature. London: Routledge.

    Google Scholar 

  • Fikes, R. E., & Nilsson, N. J. (1971) STRIPS: A new approach to the application of theorem proving to problem solving. Artificial Intelligence, 2(3–4), 189–208.

    Article  Google Scholar 

  • Fillmore, C. (1968). The case for case. In E. Bach, & R. Harms (Eds.), Universals in linguistic theory. Geneva: Holt, Rinehart and Winston.

    Google Scholar 

  • Frühwirth, T., & Abdennadher, S. (2003). Essentials of constraint programming. New York: Springer.

    Google Scholar 

  • Furtado, A. L. (1999). Narratives and temporal databases: An interdisciplinary perspective. In P. P. Chen, J. Akoka, H. Kangassalo, & B. Thalheim (Eds.), Conceptual modeling: Current issues and future directions. New York: Springer.

    Google Scholar 

  • Furtado, A. L., & Ciarlini, A. E. M. (1999). Operational characterization of genre in literary and real-life domains. In Proceedings of 18th international conference on conceptual modeling, Paris, France.

  • Furtado, A. L., & Ciarlini, A. E. M. (2000). The plan recognition/plan generation paradigm. In A. Solvberg, S. Brinkkemper, & E. Lindencrona (Eds.), Information systems engineering: State of the art and research themes. New York: Springer.

    Google Scholar 

  • Furtado, A. L., Ciarlini, A. E. M., Feijó, B., & Pozzer, C. T. (2005). Conceptual modelling for storytelling (with a case study). Technical Report MCC 17/2005, Dept. of Informatics, PUC-Rio.

  • Glassner, A. (2004). Interactive storytelling. Natick: Peters.

    Google Scholar 

  • Grasbon, D., & Braun, N. (2001). A morphological approach to interactive storytelling. In Proceedings of CAST01, living in mixed realities. Netzspannung.org/Journal, the Magazine for Media Production and Inter-media Research (Special issue).

  • Karlsson, B., Ciarlini, A. E. M., Feijó, B., & Furtado, A. L. (2006). Applying a plan-recognition/plan-generation paradigm to interactive storytelling. In Proceedings of workshop on AI planning for computer games and synthetic characters, ICAPS06, English Lake District.

  • Kautz, H. A. (1991). A formal theory of plan recognition and its implementation. In J. F. Allen, et al. (Eds.), Reasoning about plans. San Mateo: Kaufmann.

    Google Scholar 

  • Koch, P. (1999). Frame and contiguity. On the cognitive basis of metonymy and certain types of word formation. In K. Panther, & G. Radden (Eds.), Metonymy in language and thought. Amsterdam: Benjamins.

    Google Scholar 

  • Lebowitz, M. (1985). Story-telling as planning and learning. Poetics, 14(6), 483–502.

    Article  Google Scholar 

  • Mateas, M., & Stern, A. (2000). Towards integrating plot and character for interactive drama. In Socially intelligent agents: The human in the loop. AAAI Fall Symposium.

  • Mateas, M., & Stern, A. (2003). Façade: An experiment in building a fully-realized interactive drama. In Proceedings of game developers conference (pp. 4–8).

  • Meehan, J. (1977). TALE-SPIN, an interactive program that writes stories. In Proceedings of 5th international joint conference on artificial intelligence (pp. 91–98).

  • Miller, R., & Shanahan, M. (1994). Narratives in the situation calculus. Journal of Logic & Computation, 4(5), 513–530.

    Article  MathSciNet  Google Scholar 

  • Oinonen, K., Theune, M., Nijholt, A., & Uijlings, J. (2006). Designing a story database for use in automatic story generation. In Proceedings of 5th international conference on entertainment computing, Cambridge, U.K.

  • Pearce, C. (2002). Emergent authorship: The next interactive revolution. Computers & Graphics, 26(1), 21–29.

    Article  Google Scholar 

  • Pozzer, C. (2005). Um sistema para geração, interação e visualização 3D de histórias para TV interativa. Ph.D. Thesis, Departamento de Informática, PUC-Rio, Brazil.

  • Propp, V. (1968). Morphology of the folktale. Austin: University of Texas Press (Translated by L. Scott).

    Google Scholar 

  • Reiter, R. (1978). On closed world databases. In H. Gallaire, & J. Minker (Eds.), Logic and databases (pp 55–76). New York: Plenum.

    Google Scholar 

  • Riedl, M. (2004). Narrative planning: Balancing plot and character. Ph.D. Thesis, North Carolina State University.

  • Riedl, M., & Young, R. M. (2004). An intent-driven planner for multi-agent story generation. In Proceedings of 3rd international conference on autonomous agents and multi-agent systems.

  • Rumelhart, D. E. (1975). Notes on a schema for stories. In D. G. Bobrow, & A. M. Collins (Eds.), Representation and understanding: Studies in cognitive science. New York: Academic.

    Google Scholar 

  • Schank, R. C., & Abelson, R. P. (1977). Scripts, plans, goals and understanding. Hillsdale: Erlbaum.

    Google Scholar 

  • Selden, R., & Widdowson, P. (1993). A reader’s guide to contemporary literary theories. Lexington: The University Press of Kentucky.

    Google Scholar 

  • Turner, S. (1992). MINSTREL: A computer model of creativity and storytelling. Ph.D. Thesis, Computer Science Department, University of California.

  • Ursu, M. F., Thomas, M., Kegel, I., et al. (2008). Interactive TV narratives: Opportunities, progress, and challenges. ACM Transactions on Multimedia Computing, Communications, and Applications, 4(4), 1–39.

    Article  Google Scholar 

  • Velasquez, J. D. (1997). Modeling emotions and other motivations in synthetic agents. In Proceedings of 14th national conference on artificial intelligence, Providence, pp. 10–15.

  • Wardrip-Fruin, N., & Harrigan, P. (Eds.) (2004). First person: New media as story, performance, and game. Cambridge: MIT.

    Google Scholar 

  • Yang, Q., Tenenberg, J., & Woods, S. (1996). On the implementation and evaluation of Abtweak. Computational Intelligence Journal, 12(2), 295–318.

    MathSciNet  Google Scholar 

  • Young, R. (2001). An overview of the mimesis architecture: Integrating intelligent narrative control into an existing gaming environment. In The working notes of the AAAI Spring symp. on artificial intelligence and interactive entertainment.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marco Antonio Casanova.

Appendix A—Example: a swords and dragons genre

Appendix A—Example: a swords and dragons genre

1.1 A.1 Example scenario

The example scenario consists of an ample field, on which certain landmarks can be distinguished. These are the White Palace, the Gray Castle, the Red Castle, the Church and the Green Forest. The White Palace is the home of Princess Marian and also houses a temporary visitor, a knight called Hoel. The Gray Castle is the home of Hoel and of Brian, an even worthier knight. The Red Castle is occupied by Draco, a flying dragon. In the Green Forest lives the magician Turjan. The White Palace and the Red Castle are protected by armed guardians, and the Green Forest by magical trees; the other places, including the Gray Castle, have no such defenses.

These creatures, both the persons and the dragon, can be described in terms of their good or evil nature and of their strength. As to nature, the princess and the knights are reputed to be on the side of goodness, whereas the dragon is evil; contrasting with all others, the magician is neutral. In the beginning, unsurprisingly, all creatures are alive, and no one is stronger than the dragon. Differently from these leading characters, the protecting guardians figure as mere extras, individually undistinguishable. Relevant only in groups, they are a feature of the places they are charged to protect, and the protection afforded is characterized by the size of the group and by kind (which reflects the nature of the place-owners).

The inter-personal relations are simple. All creatures are acquainted with each other, but demonstrate no mutual feelings initially, except for the two knights, who have a strong positive affection for the princess. At a later time, one of the heroes and the princess may eventually get married. On the negative side, the dragon may subsequently kidnap the princess, and keep her under custody. The creatures are all in their homes at the beginning (with the single exception of Hoel), and the princess, the knights and the dragon are normally free to be at different places in other occasions; the magician, however, is confined to his sylvan refuge.

In our limited Swords and Dragons genre, actions are mostly physical. Heroes, villains and even victims are able to fight and take measures to raise their chance of victory. Before engaging in personal battle, the attacker often has to penetrate through the group of guardians surrounding the prospective victim’s present location; this may be quite hard, unless the victim foolishly dismisses a number of guardians. And the combat proper will consume the energies of a fighter. Is the attacker’s strength enough to defeat and kill the adversary? If not, he should seek a powerful magician to obtain a surplus of fighting power.

But, as donors tend to be in folktales, a magician is a capricious being, easily ill-disposed when approached without due courtesy. He may then pretend to yield to the hero’s request but will in fact reduce his strength to the bare minimum necessary to start a combat—just to be inevitably defeated in the sequel.

Heroic knights are destined to love damsels, who in turn may not respond to their entreaties at the beginning. But, if a villain kidnaps a princess and a hero successfully frees her, then gratitude and admiration should change her inclination.

Many actions are closely associated with places. So, to say that a villain kidnaps a victim means that he brings her to his lair, and marriage can only be celebrated at a church. All characters, except donors, continually move across the scene to accomplish their missions.

The various characters are motivated to act by their inner drives. Typically, a knight like Brian is anxious to be invested with superior heroic force, so that some day he can become a dragon-slayer. By contrast, Princess Marian does not even imagine that there may be any possibility of violence, and she finds no use for the presence of so many guards around her palace.

Draco is continually in the alert for signs of a weakening in her protection, awaiting a chance to come and achieve the maiden’s abduction. Attempts to kidnap may meet resistance, with considerable risk to the victim. On purpose or by accident, the dragon may end up killing his fragile prey.

Depending on the outcome of the villainy—abduction or death of the princess—one hero, or both, are impelled to either rescue or, in the worst case, avenge her. If released alive from captivity, the princess will be full of tender feelings for her savior. Both would love each other and would thus be anxious to have their marriage celebrated.

If the two knights participate of a heroic quest on behalf of the princess, they may or may not collaborate. They both love her, and are bound to compete, loyally or not, to win her hand.

Finally, the magician Turjan does not seem to wish anything. He stands still in the forest, where people sometimes seek him. The heroes come to demand a gift of fighting energy and his reaction depends on how he is disposed toward the newcomer. Desiring nothing, he never initiates any plans. But, when one least expects, he can with a gesture transmute a kind person into a powerful evil creature.

1.2 A.2 Description of the mini-world—static schema

Figure 2 displays an ER diagram that helps understand the static schema. The static language contains the following database symbols:

  • creature, an entity class, identified by \(\texttt{name}\), with attributes \(\texttt{nature}\), strength, \(\texttt{gender}\) and \(\texttt{alive}\) (of Boolean type)

  • person and \(\texttt{dragon}\), specializations of creature

  • \(\texttt{princess}\), \(\texttt{knight}\), and \(\texttt{magician}\), specializations of person

  • \(\texttt{place}\), an entity class, identified by \(\texttt{place\_name}\) with a composite attribute \(\texttt{protection}\), composed of \(\texttt{kind}\) and \(\texttt{level}\)

  • \(\texttt{home}\) and \(\texttt{current\_place}\), two n-1 relationships between creatures and \(\texttt{places}\)

  • acquaintance, a relationship involving creature twice, with attribute affection

  • \(\texttt{married}\), a 1-1 relationship involving person twice

  • \(\texttt{kidnapped}\), a n-1 relationship between persons and creatures (more than one person can be simultaneously held by one kidnapper)

  • \(\texttt{hero}\), \(\texttt{victim}\), \(\texttt{villain}\) and \(\texttt{donor}\), the roles adopted

For our purposes, we have not specialized place, but this is largely a matter of taste; one might readily come up with a variety of distinguishing criteria applicable to our scenario. The choice of a convenient type for attribute values is crucial. For example, one could at first consider good and evil as possible values for nature, as well as for kind of protection. We preferred instead 1 and −1, which permits their use in various arithmetic comparison formulas, involving strength and level of protection (as will be seen in Appendix A.3). An even more important choice was for the type of affection. Again, the intuitive preference might be some word indicating, for a pair of creatures A and B, in this order, the current feeling of A for B. Here, our choice was motivated by what is practically a consensus in affective computing (Velasquez 1997) research: drives and emotions are better expressed as points in numerical scales within a given range (typically from 0 to 100). This makes it easier to describe gradual increases and decreases in emotional intensity. Also, we decided to allow zero and negative values to denote, respectively, neutral and adverse feelings. Finally, in order to take advantage of the real-number constraint programming package of the Prolog version used, we write all numbers as real numbers, although we are only concerned with integer values.

Our choice of roles — hero, victim, villain and donor — is a subset of the seven dramatis personae proposed by Vladimir Propp (1968) for Russian fairy-tales. Roles hero and donor are here assigned only to knights and magicians, respectively. On the other hand, although it is more natural to assign the role of victim to a princess, and that of villain to a dragon, we also allow in our specified genre that knights may figure as victims or villains. Any entity instance to which one or more roles have been assigned is a aa (one of the dramatis personae) in the story.

A number of static integrity constraints are assumed. The most obvious is that whatever attribute a creature may have should only retain any significance while it is alive. All attributes here are single-valued. If a creature is playing the role of villain, his nature must be −1, whereas heroes and victims, who act as “good” characters, are rated 1. Thus, in view of the single-valuedness of attributes, a knight can be at the same time hero and victim, but not hero and villain. A donor does not take sides, his neutrality being marked by an intermediate 0 value. Reflecting the inclination of the owners, the kind of protection of the several places coincides with the nature of the characters who make them their home.

As the diagram in Fig. 2 shows, but not our Prolog clauses, only relationship acquaintance is unrestricted; the others are either 1-1 or 1-n, which constitutes an obvious static constraint. For a magician, here playing the role of donor, the current_place must coincide with his home at every state, a restriction that does not affect the other creatures. Moreover, married can only hold between persons of opposite gender.

Fig. 2
figure 2

Entity-relationship diagram

A genre is of course compatible with an ample choice of (valid) initial states. Different initial states lead to the creation of possibly very different narratives, all of which are constrained to remain within the limits of the defined genre. In our sample scenario, we assume that, in the initial database, the villainous Draco is stronger than the two knights, of whom Brian is the most vigorous, and that the potential victim, Princess Marian, is indifferent to both knights, despite their perfect love (100 in affection) for her. True to his role as donor, Turjan the Archmage is neither good nor evil (0 for nature).

The closed world assumption (Reiter 1978), familiar to database practitioners, justifies the conclusion that no one is married or kidnapped at the initial state, simply because no such facts are explicitly recorded in the database.

1.3 A.3 Events that change the mini-world—dynamic schema

The dynamic schema of our Swords and Dragons genre has ten operations:

  •  1.  go(CH,PL)

     2.  reduce_protection(CH,PL)

     3.  kidnap(CH1,CH2)

     4.  attack(CH,PL)

     5.  fight(CH1,CH2)

     6.  kill(CH1,CH2)

     7.  free(CH1,CH2)

     8.  marry(CH1,CH2)

     9.  donate(CH1,CH2)

    10.  bewitch(CH1,CH2)

All operations share one evident pre-condition: the agent must be alive. Most operations also require that the agent must not be in a kidnapped status, wherein his freedom to act would be necessarily limited. For operations involving two characters, both must be in the same current_place. Operations involving a physical confrontation are only admitted between characters of opposite nature. A mandatory post-condition is that, when an attribute is modified to receive a new value, the list of effects always prescribes the exclusion of the old value, since all attributes are single-valued in our example. Specific characteristics for each operation are reviewed below (see Ciarlini et al. 2007 for the complete Prolog code):

  • The agent of operation go(CH,PL) can be any character, except a donor; the destination is of course a place. A pre-condition is that the character CH should neither be currently kidnapped (a general requirement, as said above) nor be keeping someone kidnapped. Presumably the kidnapper must be constantly vigilant, to counter any attempt towards the victim’s liberation. The effect of the operation is to make PL the current_place where CH is.

  • Only the potential victim can imprudently dismiss some of the guardians of the place where she currently is, as agent of the reduce_protection(CH,PL) operation, whose object is a place. The current number of guardians serving as sentinels must be positive, and each execution of the operation reduces it by a factor of 10 (written as 10.0, in the required real-number format). The exact decrement will be determined at the dramatization stage.

  • Villain and victim are the roles assigned to CH1 and CH2, the agent and the patient, respectively, of operation kidnap(CH1,CH2). A vital pre-condition is that the strength of the villain be enough to break into the place where the victim is. The formula for the comparison says that his strength should be greater than that of his victim, added to the level of protection of the place. But the kind of protection is also taken into consideration, being multiplied by the level (remember that kind is a number, 1 or −1, to indicate whether the guardians are either on the side of goodness or of evil). As a result, if the victim is currently in a place dominated by evil, the level of protection will actually be subtracted from her strength. Kidnapping results in the victim being imprisoned in the home of the kidnapper.

  • A hero, not currently kidnapped (recall that the same individual who plays the role of hero can simultaneously be a victim), or a villain can be the agent of attack(CH,PL) intent on decimating the group of guardians protecting PL, which stands as the object of the action. The nature of the agent must be the contrary of the kind of protection of the attacked place. The current level of protection (associated with the number of guardians), which must be positive, is reduced by a factor of 30. The operation has the side-effect of displeasing those who have their home in PL: their affection for the attacker now becomes strongly negative (−100).

  • Two characters of opposite nature, but never a donor, currently having strength of at least 10, can play the agent and coagent of fight(CH1,CH2). The level of protection of the place where the combat happens must be null or negative; so the troop protecting such locations must first suffer an attack, before the leading characters can face each other. The confrontation is extenuating for both participants, which is indicated by the mutual subtraction of their strengths as a result.

  • Agent and coagent of kill(CH1,CH2) are as in the preceding operation. The killer’s strength must be strictly greater than 10; and the character killed must either no longer be able to fight or have the bare minimum necessary for that, which is expressed by requiring that his strength be at most equal to 10. The obvious effect is that CH2 is no longer alive.

  • Operation free(CH1,CH2) can be performed by a hero, to the benefit of a kidnapped victim, only after the kidnapper is dead. Besides the effect that CH2 is no longer kidnapped, the operation has the virtue to raise to the maximum value (100) the affection of the grateful victim for her liberator.

  • In our version of marry(CH1,CH2), the agent CH1 must be a hero and the coagent, CH2, a victim, usually representing the proverbial motif of the “maiden in distress rescued by a loving knight”. Their mutual affection has to be greater than 80 (note this might already be true at the initial state, but then there would be no need for heroic action). They must be originally single. To acquire the married status, their presence at the Church is required.

  • The first operation whose agent must exclusively be a donor, a role that is reserved to magicians in our genre, is donate(CH1,CH2), whereby the recipient, always a hero, is given an amount of fighting power. The measure of the new strength of CH2 depends on how he approaches the donor CH1. A courteous attitude is rewarded with an increase of 80 above his current strength, whereas rudeness, demonstrated by a previous attack against the defenses of the magician’s home, is punished by having his strength set to the minimum required for fighting (10), regardless of what the previous value was.

  • The second operation having a donor as agent, namely bewitched(CH1,CH2), has as patient either hero or victim, which are the two classes of characters normally endowed with a good nature. The dreadful double effect of the operation is to instill an evil nature into CH2 who, at the same time, is made very strong (a strength of 100).

It is worksome but not too hard to check how the combined interplay of pre-conditions and post-conditions in this repertoire contributes to the preservation of the static and dynamic integrity constraints, once the validity of the postulated initial state has been verified. As a trivial example with a static constraint, one can readily see that, at every state reachable from the initial state through the operations, the current place of the donor is invariably his home, provided that this was true at the initial state.

Killing an enemy is a task requiring wise tactics, in view of the dynamic constraints involved. If CH1 intends to kill CH2, he may or may not have to fight beforehand, so as to reduce the strength of the adversary. Value 10 is especially critical in this regard: it is not sufficient for CH1 as prospective killer, whereas CH2 can be killed if he has this value (or less). So, there is no need to fight if CH2 already has strength no greater than 10. On the other hand, 10 is the minimum required to start fighting, which may induce an ill-advised character to challenge another with no chance to win (recall how the discourteous recipient is treated in the donate operation described above).

Now let us examine what happens when fighting takes place. Clearly only the situation wherein CH1 is stronger than CH2 needs to be considered. Suppose CH1 has strength 30 and CH2 has 20. As indicated as an effect of the energy-consuming fight operation, the strengths of the two opponents are subtracted from each other, so CH1 ends up with 10 and CH2 with −10. As a consequence, CH2 can now be killed — but not by CH1, who became too weak for that. (Notice that the same happens with strengths of 20 and 10 respectively, which is ironical, since in this case CH1 could have dispatched the enemy directly without fighting).

As an even subtler dynamic constraint, observe that, once kidnapped, a victim has no way to escape from custody by her own action, inevitably needing the initiative of one or more heroes. When dealing with fiction, one is allowed to make certain assumptions that may seem unrealistic. One of the general principles governing the genesis of fictional stories is that functional events (Bal 2002; Culler 1977) should be included, plausible or not entirely so, as a prompt to adventurous deployments. For instance, this “maiden in distress” situation works as an inducement for heroic quest.

In our example specification, if one starts from a valid initial state and only the nine first operations above are used, the generated plots should conform to all constraints and be recognizable as legitimate representatives of the intended genre. The pre- and post-conditions of these operations were carefully balanced for that. However, if the tenth operation—bewitched—happens to be utilized, this may no longer be true. The introduction of a disturbing element serves a purpose here: to create the possibility of transgressing some of the conventions of the genre, such as the understanding that all participants retain their nature throughout their lives. Again, fiction has a latitude that one would hardly admit in business application domains.

1.4 A.4 Motivation of the dramatis personae—behavioral schema

The dynamic behavior of our Swords and Dragons genre has six goal-inference rules and a library of typical plots.

The definition of each rule, in the notation of Section 4.2, is followed by a brief discussion.

  • The first two in our example are activated right at the initial state. The first rule refers to the heroes. At least one hero should be prepared for future missions and so, if there exists some villain stronger than him, he will try to acquire an even superior strength.

    /* (1) The strongest hero wants to become stronger than the villain */

      (villain(VIL)strength(VIL,Lv)

      hero(HERO)strength(HERO,Lh)

      \(\Rightarrow\,\) \(\lozenge\) (strength(HERO,LS)LS > Lv)

  • The second rule applies to the victim. It is very common in folktales that a victim can be blamed as partly responsible for the villainy that she will suffer. As Propp observed, her complicity is revealed as she, for example, exposes herself by weakening the defenses surrounding her. Accordingly, the rule assesses the initial level of protection of the place where she is, and sets its reduction as a goal. As already seen in the pre- and post-conditions of the operations, the nature of the victim and the type of protection of the place appear as coefficients, affecting the sign of the terms in the inequality. A different variable, PLACE2, denotes the location of the victim at future time; this allows two possibilities for achieving less protection: the planner can either apply (one or more times) the reduce_protection operation to the original PLACE1—in which case the two variables will be treated as identical—or can cause the imprudent maiden to go to some different location already offering an inferior protection.

    /* (2) Victim reduces protection of her current location */

      (victim(VIC)nature(VIC,KIND0)

      current_place(VIC,PLACE1)

      protection(PLACE1,KIND1,PROT1))

      \(\Rightarrow\) \(\lozenge\) (current_place(VIC,PLACE2)

           protection(PLACE2,KIND2,PROT2)

           KIND2*KIND0*PROT2 < KIND1*KIND0*PROT1)

  • If the goal of the second rule is reached, the third rule is triggered, producing in the villain a desire to take advantage of the weaker condition of the victim, by having her kidnapped. Although this is the type of villainy that determines the normal continuation of the plot, it may happen instead that the villain perpetrates a different villainy, by murdering the victim. To cover this circumstance, it became necessary to add to the situation part of the rule the seemingly redundant requirement that the victim needs to be still alive if the villain proposes to have her kidnapped. Without this additional requirement, we would have a goal conflict with the fifth rule (described later).

    /* (3) If victim’s protection is reduced, villain will want to kidnap her */

      (victim(VIC) ∧ nature(VIC,KIND0) ∧

      current_place(VIC,PLACE1) ∧

      protection(PLACE1,KIND1,PROT1))

       \(\Rightarrow\) \(\square\) (current_place(VIC,PLACE2) ∧

           protection(PLACE2,KIND2,PROT2)

           KIND2*KIND0*PROT2 < KIND1*KIND0*PROT1

            \(\Rightarrow\) \(\lozenge\) (alive(VIC) ∧

                  kidnapped(VIC,VIL)))

  • The fourth rule says that, if kidnapping has occurred, the goal of reverting this situation will arise. The rule does not explicitly refer to the heroes as the necessary agents who can accomplish the deed, but the overall specification of the genre calls for their participation, effectively excluding any other character.

    /* (4) If victim is kidnapped, hero will want to rescue her */

    \(\square\) (kidnapped(VIC,VIL) \(\Rightarrow\) \(\lozenge\neg\) kidnapped(VIC,VIL))

  • The fifth rule applies to a situation in which the villain has performed the action of killing the victim. All that remains for the heroes (once more not explicitly mentioned) to do is to vindicate her death, by making the villain lose his life. If both this rule and third rule were activated at the same occasion, a contradiction would result: the goal that the villain be not_alive makes it impossible to execute operation kidnap, required to satisfy the goal of rule three. Evidently the motivating situations for the two rules are mutually exclusive and so they should never be simultaneously active, since it does not make sense to kidnap a dead victim—but we find useful to report this as a problem, to illustrate how crucial a careful analysis of the specification is. Indeed, at an early design phase, we overlooked the necessity to spell out in the situation part of rule three that the victim should be alive, and took some time to realize what was causing trouble to the plot generation algorithm.

    /* (5) If victim is killed, hero will want to avenge her */

    \(\square\) ((victim(VIC) ∧ villain(VIL) ∧ kill(VIL,VIC)) \(\Rightarrow\)

    \(\lozenge\neg\) alive(VIL))

  • The sixth and last rule, if ever activated, will lead the plot to a happy ending: if two persons love each other with perfect love (or almost perfect, since the required affection is merely 95), and are still single, they will want to get married. That the married attribute for each person is tested in one direction only should not sound peculiar: operation marry asserts the attribute in both directions (and, as always, we must rely on the correctness of the initial state for complete information about already married people). Note also that the combined effect of the specification clauses restricts marriage to a hero and a victim, roles that are respectively assigned in the example initial state to each knight and to the princess, thus enforcing the opposite gender requirement.

    /* (6) If the affection between two persons is high, then they will want to get married */

    \(\square\) ((affection(CH1,CH2,L1) ∧ affection(CH2,CH1,L2) ∧

        ¬ married(CH1,X) ∧ married(CH2,Y) ∧ L2>95.0 ∧ L1>95.0)

       \(\Rightarrow\) \(\lozenge\) married(CH1,CH2))

The library of typical plots is organized in is-a and part-of hierarchies. Figure 3 shows both hierarchies, where single arrows denote composition (part-of link) and double arrows denote generalization (is-a link) (we refer the reader to Karlsson et al. 2006 for a detailed description of the notation adopted).

Fig. 3
figure 3

Hierarchy of typical plans

As shown in Fig. 3, the library has four levels of operations, numbered from 0 to 3, the level 3 being occupied by the basic operations introduced in Appendix A.3:

  • Level 0—adventure: Located at the root position, operation adventure has components: do_villainy, retaliate, accompany and donate. It specializes into: rescue or avenge.

  • Level 1—rescue, avenge: These are the two specializations of adventure. The rescue variety has components: abduct, liberate, marry, accompany, donate. The other variety, avenge, has components: murder, execute, accompany, donate. As Fig. 3 shows, there are connecting edges to only some of the components; such edges are unnecessary for accompany and donate, which are inherited from adventure via the is-a link. Note that, for both rescue and avenge, the is-a inheritance mechanism would also indicate do_villainy and retaliate as components—but the existence of direct edges to specific forms of villainy and retaliation (the pair abduct, liberate for rescue, the pair murder and execute for avenge) in fact overrules the is-a implicit inheritance discipline. In other words, one can say that the choice of a villainy preempts the choice of the appropriate retaliation.

  • Level 2—do_villainy, retaliate, accompany: Operation do_villainy specializes into: abduct or murder; retaliate specializes into: liberate or execute; accompany specializes into: help or false_help. Names are, as usual, a matter of personal preference, but we tried our best to select meaningful words; accompany, for example, evokes the convention, pointed out by folklorists, that certain persons who aid (or hinder) the hero in his mission march by his side (playing the role of helpers or of false_heroes), while others (the typical donors) usually stay behind and take no part in the main action.

  • Level 3—abduct, murder, execute, liberate, help, false_help: Both villainies have a first component that signals the complicity of the victim. So, abduct has components: reduce_protection, attack, kidnap; while murder has components: reduce_protection, attack, fight, kill. Both retaliations involve killing the villain, and include all preparatory actions which may or may not be needed in view of current circumstances. Variety liberate has components: attack, fight, kill, free, whereas execute has components: attack, fight, kill. Sincere helpers can contribute in various ways, not necessarily doing all actions listed here, and noting that kill should rather be reserved as a prerogative of the main hero. A clever false_helper is likely to enter the battlefield only when the struggle is over, and surreptitiously open the doors of the dungeon to the victim, thereby seducing her with an eye to matrimony. Thus, help has components: attack, fight, free. Effortless false help has components: free, marry.

We left out two basic operations (level 4) from this hierarchy. Pervasive as it is when physical events are contemplated, operation go is in fact an ultimate component of practically all actions, and therefore is assumed to be present even if not indicated explicitly. On the other hand, bewitch was deliberately excluded. As noted before, plots including bewitch are to be considered transgressive rather than typical in the context of our genre. They reveal the magician’s inclination to subvert an until then innocent world, by acting as a trickster.

1.5 A.5 Example of a plot

Figure 4 shows a simple plot generated by the plan generation prototype (a number of other examples are shown in Furtado et al. 2005). The contents of the boxes indicate the executed operations (and also the goals, in “gen_goal” clauses) prefixed by numerical tags, used internally to record the partial order requirements. The connecting edges are manually inserted by the user to choose a fully linearized sequence compatible with the partial order requirements, which must be done as a preliminary step to dramatization.

Fig. 4
figure 4

Example plot

Upon traversing the plot, a simple-minded template-based facility can “read” it and produce the coarse text of Fig. 5. The resulting animation is illustrated in Fig. 6.

Fig. 5
figure 5

Template-based text

Fig. 6
figure 6

Draco attacks the White Palace

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ciarlini, A.E.M., Casanova, M.A., Furtado, A.L. et al. Modeling interactive storytelling genres as application domains. J Intell Inf Syst 35, 347–381 (2010). https://doi.org/10.1007/s10844-009-0108-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10844-009-0108-5

Keywords

Navigation