ArticlePDF Available

Abstract and Figures

MEXICA is a computer model that produces frameworks for short stories based on the engagement-reflection cognitive account of writing. During engagement MEXICA generates material guided by content and rhetorical constraints, avoiding the use of explicit goals or story-structure information. During reflection the system breaks impasses, evaluates the novelty and interestingness of the story in progress and verifies that coherence requirements are satisfied. In this way, MEXICA complements and extends those models of computerised story-telling based on traditional problem-solving techniques where explicit goals drive the generation of stories. This paper describes the engagement-reflection account of writing, the general characteristics of MEXICA and reports an evaluation of the program.
Content may be subject to copyright.
1
MEXICA: a computer model of a cognitive account of creative
writing.
Rafael Pérez y Pérez1
Mike Sharples2
1Laboratorio de Cognición, Cibernética y Aprendizaje de la Ciencia.
(Laboratory of Cognition, Cybernetics and Science Learning)
Centro de Instrumentos, Universidad Nacional Autónoma de México
Circuito Exterior-Ciudad Universitaria, México D.F. C.P. 04510
Tel (52) 5622-8602 ext 110, e-mail: rpyp@servidor.unam.mx
2Educational Technology Research Group
School of Electronic and Electrical Engineering
University of Birmingham
Edgbaston-Birmingham B15-2TT, UK
e-mail: m.sharples@bham.ac.uk
Abstract
MEXICA is a computer model that produces frameworks for short stories based on the
engagement-reflection cognitive account of writing. During engagement MEXICA generates
material guided by content and rhetorical constraints, avoiding the use of explicit goals or story-
structure information. During reflection the system breaks impasses, evaluates the novelty and
interestingness of the story in progress and verifies that coherence requirements are satisfied. In
this way, MEXICA complements and extends those models of computerised story-telling based
on traditional problem-solving techniques where explicit goals drive the generation of stories.
This paper describes the engagement-reflection account of writing, the general characteristics of
MEXICA and reports an evaluation of the program
1. Introduction.
Traditionally, computer models in AI have been developed either with the goal of producing programs
that perform a task in the same way as human beings, or with the goal of producing programs that
perform a task in any way that meets objective criteria of effectiveness, independently of how human
beings do it. In this paper we present a model that stands at a point between these two positions: an
automated story-teller based on a cognitive account of writing. The cognitive account provides a set of
requirements that correspond to mental constraints and the observed behaviour of writers. In this way,
the computer model obtains completeness and rigour from the cognitive account. The program produces
examples of computational creativity that can be matched against human writing, demonstrating the
2
plausibility of the cognitive account through the quality of its productions, and producing insights in the
adequacy and completeness of the cognitive model of writing. MEXICA is a computer program, based
on the engagement-reflection account of writing, that produces novel and interesting story frameworks
about the Mexicas, the old inhabitants of what today is México City. We refer to MEXICA outputs as
“story frameworks” rather than stories, since the system is not capable of producing full natural
language. Figure 1 shows an example of a story framework created by the system.
Insert figure 1 about here.
The paper is organised as follows. We describe the main aspects of the cognitive account of writing: the
role of internal and external constraints, how memory is probed and, the cycle of engagement and
reflection. We then present a description of the MEXICA model: its general architecture, how structures
representing knowledge are created, and the way events are retrieved from memory. Since one of the
main characteristics of the system is the production of material guided by constraints rather that explicit
goals, a section is devoted to explain how internal constraints are represented in the computer model.
Next, we give an explanation of how the whole system interacts to develop a new story framework.
Finally, we present an evaluation of outputs from the program.
2. How we write.
The design of MEXICA is informed by an account of writing as design (Sharples 1999) and it
implements a core part of that account, in which the activity of creative writing is conceptualised as a
cycle of cognitive engagement and reflection. An episode of writing begins with a set of internal and
external constraints that provide a context for linguistic creativity. External constraints include the
writing task, the tools available for writing and the surrounding world of human and physical resources.
The internal, mental constraints consist of content constraints (what to write) and rhetorical constraints
(how to compose the material in order to satisfy the audience and purpose). These act as the tacit
knowledge that guides the composing process.
3
A writer probes long term memory to retrieve ideas that conform to the constraints and expresses these as
written prose. The current context triggers further probes of memory to continue the process. This
engagement with the emerging text may be interrupted when the probe fails to elicit new ideas, when the
writer senses that the emerging text has departed from the constraints, or when the writer decides to
explore a conceptual space to create new content or rhetorical constraint. At that point the writer will
stop and bring the current state of the task into conscious attention, as a mental representation to be
explored and transformed. This may involve reviewing all or part of the written material, conjuring up
memories, forming and transforming ideas, and specifying what new material to create and how to
organise it. The process of mental engagement and reflection forms a productive cycle (figure 2)
whereby a writer forms and explores ideas and conceptual spaces; these provide constraints for the writer
to specify and organise the ideas into a linguistic form; the language is expressed as written text; the
writer reviews and interprets the written material which provokes new ideas and cognitive
transformations. The cycle may be short, such as when a writer generates and reviews a text sentence by
sentence, or longer, when a writer creates a productive space of constraints that leads to a prolonged bout
of engaged writing followed by a period of review and revision.
The MEXICA system is an attempt to model the cycle of engagement and reflection. Thus it both
demonstrates the adequacy of the model as a general specification for generating frameworks of literary
text, and it provides a test-bed for investigating a cognitive account of the writing process. Since
MEXICA is a software system not an embodied being, it is restricted to simulating the mental processes
and constraints and contains no representation of a writer’s external resources or constraining influences.
Throughout this paper the internal processes of the program are described in cognitive terms
(“reflection”, “long term memory” etc.). This is necessary in order to make clear the relationship
between the cognitive account and the computer implementation, however it is not intended to imply that
the computer is a cognitive or self-aware agent nor that the computational processes are direct
representations of human mental activities. MEXICA is not a model of a human writer, but a tool for
exploring a cognitive account of writing.
Insert figure 2 about here.
4
3. General Aspects of MEXICA.
MEXICA (Pérez y Pérez 1999) is divided in two main parts: the engagement state and the reflective
state. During engagement MEXICA generates material driven by content and rhetorical constraints
avoiding the use of explicit goals or story-structure information. This characteristic contrasts with
previous systems which employ explicit goals or story-structure information to generate their outputs
(e.g. Pemberton 1989, Turner 1993). During reflection MEXICA breaks impasses, modifies the story in
progress to satisfy coherence requirements, and evaluates the novelty and interestingness of the story in
progress. As a result of this evaluation MEXICA can modify the constraints that drive the production of
material during engagement. Thus, the stories produced by MEXICA are the result of the interaction
between engagement and reflection.
The system employs a database to create in long-term memory (LTM) a group of structures representing
the content and rhetorical knowledge necessary to construct stories. Such a database is called Previous
Stories and is formed from a set of stories. Stories in MEXICA consist of two different kinds of
components. The first is formed by the explicit elements described in the narrative, i.e. concrete story-
actions such as princess went to the forest. The second is formed by tacit elements (they are never
explicitly shown in the story) that represent emotional links between characters and the dramatic tension
produced in the story. These tacit components are stored in a structure called a story-world context. This
is used as a cue to probe LTM during engagement and retrieve into working memory (WM) subsequent
next actions for the story in progress. Story-world contexts are dynamic structures that can be modified
during the probe of LTM in order to retrieve novel and interesting actions.
To evaluate novelty the system compares the story in progress against the previous stories in terms of
significant differences in content. To evaluate interestingness MEXICA compares patterns of change in
dramatic tension from the sequences of actions in previous stories. MEXICA includes a group of
parameters that can be adjusted to control and modify the writing strategyin the system. In this way, the
user can experiment with different aspects of the computer model.
5
3.1 How MEXICA works.
MEXICA performs two main processes: the first builds in LTM the knowledge necessary to produce a
story; the second triggers an engagement-reflection cycle in order to develop a new story. As mentioned
above, MEXICA builds its knowledge from a set of pre-defined stories called previous stories. Previous
stories are kept in a program's archive and can be written or modified by a user of MEXICA. The process
of analysing the previous stories to build schemas representing content and rhetorical knowledge in LTM
simulates the human writing process in that ‘from reading ... you acquire basic knowledge of the
structural and rhetorical devices that belong to a particular genre or form of writing.’ (Lodge 1996: 171)
A language (resembling a simple computer language) called the Previous Stories Definition Language
(PSDL) was developed to allow the user of the system to specify the set of previous stories, and therefore
to control the type of content and rhetorical knowledge in the system. Figure 3 shows an example of a
previous story defined with the PSDL.
Insert figure 3 about here.
In MEXICA, a story is defined as a sequence of actions. Thus, before a user can define the previous
stories it is necessary to establish a set of valid story-actions. A language, called Story Action Definition
Language (SADL), was developed to allow specifying story actions. Figure 4 shows a typical example of
an action defined through the SADL.
Insert figure 4 about here.
In this way, the general steps to create stories in MEXICA are the following:
The user defines a list of all possible story-actions.
The user defines a set of previous stories.
MEXICA reads the story-actions and previous stories to build in LTM schemas representing content
and rhetorical knowledge.
MEXICA generates new stories through an engagement-reflection cycle.
6
Since the set of previous stories represents examples of well-constructed stories, all structures in memory
represent correct rhetoric and content knowledge. In MEXICA, actions have associated with them a set
of consequences (or post-conditions) that modify the story world each time an action is performed. Post-
conditions are referred to as tacit elements because, by contrast with story-actions, they are never
explicitly shown nor mentioned in the story. MEXICA works with three types of post-conditions:
emotional links between characters, situations that produce tension (see section 4 for an explanation of
tensions) and changes in the physical position of a character in the story-world. For example, the action
princess cures jaguar knight's injuries produces as a consequence that the knight is grateful towards the
princess (an emotional link between characters). MEXICA works with three types of emotional links:
type 1 is brotherly love, type 2 is amorous love, and type 3 can be defined by the user. Emotions of type
1 represents a continuum between love and hate while emotions of type 2 represents a continuum
between being in love with and feeling hatred towards another person.
MEXICA creates for each character in the story a structure called story-world context where post-
conditions are registered. Thus, continuing with the example below, the princess' story-world context and
the knight's story-world context are formed by the emotional link established between the knight and the
princess. The purpose of story-world contexts is to constrain the possible directions that the story in
progress can take. For instance, since princess cures jaguar knight's injuries produces a context where
the knight is grateful towards the princess, the story might continue with an action where the knight
rewards the princess. The same context restricts the possibility that the story continues with an action
where the knight tries to cause damage to the princess.
Each character has its own story-world context. This situation allows the development of stories where
different characters register different events in the story world. The following paragraph illustrates this
situation (thetext in brackets represents actions’ post-conditions):
At the Sunday market, a farmer tries to kill jaguar knight [The knight hates the farmer].In
response, the knight thrashes the farmer [The knight hates the farmer. The farmer also hates the
knight]. In that moment, the princess arrives to the market and sees the knight beating the
farmer...
7
Since the princess is not located in the market when the farmer tries to kill the knight, her story-world
context does not register the consequences of this action, i.e. she is not aware of the killing attempt; she
only sees a knight taking advantage of his position and thrashing a farmer without any reason. This
situation permits driving the story in different directions: for example, from the perspective of the
princess’ story-world context, the story might continue with an event where she punishes the knight;
such an action can trigger a resentment feeling in the knight that would lead to a revenge action towards
the princess, and so on. From the perspective of the knight’s story-world context, the story might
continue with an event where the knight kills the farmer as a punishment and offers his heart to the Gods.
Story-world contexts are not only an accumulation of post-conditions. They are dynamic structures that
change according to the different events occurring during the development of the story in progress. For
instance, MEXICA incorporates a set of post-conditions —named inferred post-conditions— that are
triggered when it detects pre-defined situations. Thus, if MEXICA detects in the story in progress that
two different characters are in love with the same woman, the system triggers in the characters’ story-
world contexts an inferred post-condition representing a love competition between them. If during the
development of the story one of those characters should die —which implies the end of the love
competition— the system eliminates from the story-world contexts the inferred post-condition.
Story-world contexts play an important role in the production of material during engagement. They act as
cues to probe LTM and retrieve sets of possible next actions into working memory in order to continue
the story in progress (see figure 5). That is, LTM is organised in groups of schemas representing story-
world contexts. Each of them has associated a set of possible next actions to be executed in the story in
progress. When an action in a story in progress is performed, it modifies the actual story-world context of
the characters participating in the action. MEXICA utilises those contexts to probe LTM. When
MEXICA finds a schema that matches any of the story-world contexts it retrieves the actions associated
with that schema into working memory. Then, one of the possible next actions retrieved is selected at
random to continue the story in progress. When this action is performed it modifies characters’ context
and the cycle starts again. Whenever it cannot match a schema in LTM, MEXICA declares an impasse
and switches to reflection to break such an impasse.
Insert figure 5 about here.
8
Once the system switches state, it starts to perform the reflective processes. To break an impasse,
MEXICA analyses the previous stories to find alternatives to continue the story in progress. This
simulates the process where some human writers —in order to break an impasse— study how other
authors have sorted out similar situations and try to apply the same strategy. MEXICA evaluates novelty
by comparing the content of the current story against the content of previous stories. MEXICA evaluates
interestingness by comparing changes in the dramatic tension of the story in progress against changes in
the dramatic tension of previous stories. As a result of these evaluations MEXICA sets some guidelines
to constrain the production of material during engagement and in this way to improve the quality of the
story in progress.
4. Analysis of constraints.
Constraints are the core element for the production of material. In MEXICA, the knowledge representing
content and rhetorical constraints has been organised in four types: context constraints, knowledge
constraints, guidelines constraints and general constraints.
Context constraints or story-world contexts encode the emotional links and dramatic tensions
produced in the story in progress. That is, they register the consequences of all actions performed so
far in the tale.
Knowledge constraints represent writer’s experience, knowledge and beliefs about writing goals,
the writing topic and world in general. They apportion the structures necessary for retrieving logical
following actions from LTM during the development of a tale, as well as for producing novel and
interesting stories. Knowledge constraints are constructed from tacit information in the previous
stories when the system starts (i.e. before MEXICA begins to develop a new story).
Guidelines constrain the production of material to satisfy requirements of novelty and interest. They
are updated during reflection each time an evaluation of the story in progress takes place.
General constraints include the knowledge necessary to assure that the events in the story in
progress satisfy basic beliefs about the world, and to assure that the story flows. They are established
by the programmer as part of the code and never changed.
9
Context constraints can be seen as structures representing the story-world state of affairs. There is a
story-world context for each character in the story. They are created each time a new character is
introduced in the story in progress and updated after an action is executed. MEXICA only updates the
story-world context of those characters that are located in the same place as the characters that perform
the action.
Knowledge constraints are divided into three classes: the Abstract Representation, the Tensional
Representation and the Concrete Representation. The abstract representation is formed by structures in
LTM representing story-world contexts —where characters are not instantiated— extracted from the
previous stories. Each of these structures is linked to a set of possible next actions to be performed in the
story in progress (see figure 5). During engagement MEXICA tries to match these structures and retrieve
their associated events into working memory. In this way, the abstract representation embodies all
possible occurrences that MEXICA can retrieve during the developing of a story.
The tensional representation encodes the dramatic tension in the story in progress. Bremond (1996)
describes the sequences of events in a narrative as processes leading towards either an improved or
degraded state, which can or cannot be reached. During a degradation process a state of tension is created
by introducing forces or obstacles that oppose a more satisfactory state. During an improvement process
an obstacle that stands against such a more satisfactory state is eliminated. In MEXICA, a story is
classified as interesting when it includes degradation-improvement processes. Thus, the tensional
representation encodes part of the knowledge necessary to create sequences of events that combine
degradation-improvement processes.
In MEXICA it is assumed that a tension in a story arises when a character is murdered, when the life of a
character is at risk, when the health of a character is at risk (i.e. when a character has been wounded),
when a character is made a prisoner, when a character feels clashing emotions towards other one, when
a character is involved in a situation of potential danger and when two different characters are in love
with a third one producing a love competition. MEXICA can trigger a tension as a direct consequence of
an action (e.g. if an enemy attacks the princess, as a consequence a tension will be produced because her
life is at risk), or as an inferred post-condition (e.g. if the system detects that jaguar knight and eagle
knight are both in love with the princess, a tension due to love competition is triggered). Different
tensions can be active at the same time. Tensions have associated a value between zero and fifty; such a
10
value is modifiable by the user of the system. Each time an action is performed MEXICA calculates and
stores the tension produced in the story in a variable called Tension to the Reader. An array named
Tensional Representation records the different values over time of this variable. In this way, it is possible
to obtain a graphical representation of the story in terms of the Tension to the Reader. For example,
figure 6 shows a story formed by seven actions: actions A to E represents degradation processes where
the tension to the reader increases. Action E represents the climax of the story where the highest tension
is reached. Actions F and G represent improvement processes where the tension decreases, i.e. the
resolution of the story. During reflection MEXICA evaluates the interest of the current story by
comparing its tensional representation against the tensional representation of the previous stories. This
evaluation sets some guidelines that contribute to creating interesting stories (see setting of guidelines
below).
Insert figure 6 about here.
The concrete representation is a copy in LTM of the stories defined in the file of previous stories. It is
used during reflection to break impasses. The abstract and tensional representations are formed from tacit
information in the previous stories, while the concrete representation comes from explicit information.
The abstract, tensional and concrete representations are structures that represent different aspects of the
previous stories at different levels of abstraction.
MEXICA develops a story as a result of an engagement-reflection cycle. Each time MEXICA switches
to the reflective state it evaluates the novelty and interest of the story in progress. As a result of such an
evaluation a group of guidelines are set to constrain the production of material during engagement. For
example, if the system detects that the current story lacks improvement-degradation processes (i.e. that
the story is boring) guidelines requiring interesting actions become active. Thus, when MEXICA
switches back to engagement, a group of routines called filters eliminate from the set of possible next
actions those that do not satisfy the guidelines’ requirements; in this case, those actions that do not
contribute to making the story more interesting. Filters do not perform any evaluation, their only function
is to constrain the universe of actions that can be brought into working memory. This situation seems to
agree with human behaviour in employing schemas to constrain the generation of ideas. For example, if a
11
person is asked to write a Sherlock Holmes story, he probably will retrieve events related to detectives,
gangs, bad and good boys, etc. That is, the universe of possible actions available in his head to continue
the story is constrained to those events that satisfy the task requirements.
The general constraints are requirements that have two purposes: to prevent the story from including
events that do not satisfy basic beliefs about the writing topic and world in general, and to assure the
flow of the story in progress. In MEXICA a story flows when the post-conditions of the last action
performed modify the story-world context of at least one character. In this way, it is assured that either
the story develops in terms of improvement-degradation processes (modification of tensions) or the
emotional links between characters change. It is important to have dynamic emotional links and tensions
because a story becomes interesting when degradation-improvement processes arise. Tensions increase
or decrease either as direct consequences of actions or as a product of inferred post-conditions, i.e. as a
result of combinations of emotional links between characters, such as tension due to love competition. In
this way, if story-world contexts change over time the story is forced to move forward. This procedure
alone does not guarantee that the story is moving in the right direction. All constraints working during
engagement, together with the procedures that operate during reflection, contribute towards developing a
coherent and interesting story. There is also a technical problem related to the flow of a story. MEXICA
employs the story-world context as cue to probe LTM and retrieve the subsequent action in the current
story. If an action that does not modify the story-world context is selected as the next event MEXICA
might retrieve the same action again, which would not modify the story-world context with the resultthat
MEXICA might retrieve the same action again, and so on. Thus, the flowing of the story prevents the
system from being caught in a loop. As in the case of the guidelines, filters are in charge of eliminating
those actions that do not satisfy the general constraints.
5. Generation of a story.
Stories in MEXICA are the result of an interaction between engagement and reflection. The system
allows the user to experiment with different writing strategies. MEXICA can work in four different
modes of operation (see table 1):
12
1) Engaged State 1 (E1).
2) Engaged State 2 (E2).
3) Engaged and Reflective States 1 (ER1).
4) Engaged and Reflective States 2 (ER2).
When MEXICA works under the E1 and E2 operation modes all the routines related to the reflective
state are deactivated. That is, all stories developed by MEXICA are the result of an engagement process.
When the system works under the ER1 and ER2 operation modes both states are active. Thus, stories are
developed as a result of an interaction between engagement and reflection. During the E1 operation
mode the system disables all filters (and therefore the guidelines). During the E2 operation mode the
filters are set as active and the guidelines are set to a fixed value; i.e., since the reflection state is not
active, the guidelines cannot be updated and therefore they retain a fixed value. During the ER1
operation mode the filters and guidelines are deactivated. Finally, during the ER2 operation mode all the
routines in the system work together to develop a new story.
Insert table 1 about here.
To create a new story the user specifies an initial action, the initial location and the characters
participating in the event. The initial action produces story-world contexts that are employed to probe
LTM. MEXICA switches from engagement to reflection after a particular number of events have been
generated in the story in progress (by default this number is set to three although it can be modified by
the user) or when an impasse is declared. An impasse is declared when MEXICA cannot match any of
the story-world contexts in the current story with a structure in LTM, or when all possible next actions
retrieved from memory do not satisfy constraints (e.g. novelty requirements established by the
guidelines) and therefore are removed bythe filters.
13
5.1 Engagement.
During the retrieval process MEXICA follows three strategies to bring into working memory possible
next actions. The first is called the exact-strategy. MEXICA attempts to find structures in LTM that are
identical to any of the story-world contexts, i.e. they are formed by exactly the same elements (the same
emotional links and/or tensions). When the system finds such a structure, it brings into working memory
the possible next actions associated to that structure.
The second is called the inclusive-strategy. It consists of searching LTM for structures that include, as
part of its organisation, the story-world context. For example, if a story-world context is formed by an
emotional link representing two characters in love (1 element), and MEXICA finds in LTM a structure
formed by the same emotional link and a tension representing that the life of one of the characters is at
risk (2 elements), MEXICA assumes that they are similar enough to be matched with each other. Thus,
the system brings into working memory the possible next actions associated to the matched structure.
When using this strategy the system assumes that the structure in LTM cannot contain more than twice
the number of elements found in the story-world context (in this example the structure in LTM contains
two elements while the story-world context includes one) but this parameter can be modified by the user.
The third strategy, named the dynamic-strategy, consists of modifying the organisation of the story-
world context and triggering a new search in LTM. The logic behind this strategy is that as long as the
essential features of the story-world context are conserved, it can be modified to establish new ways of
matching structures in LTM1. In the MEXICA prototype two transformations of the story-world context
can be executed before an impasse is declared. Initially, MEXICA applies the first transformation; if it
does not work the system applies the second transformation. In order to illustrate how these
transformations work, the reader can think of a story-world context that belongs to character A
(remember that each character in the story has its own story-world context). The first transformation
consists of eliminating all the emotional links where character A does not participate, and all tensions
where character A does not participate except life at risk and health at risk. In other words, this new
1This strategy seems to agree with some general theories that explain how concepts are retrieved from
LTM. Following Torrance (Torrance et al. 1996) a retrieval process initiates with a memory probe in
working memory that activates concepts in LTM susceptible to be retrieved. Raaijmakers and Shiffrin
(1981, cited in Torrance et al. 1996) suggest that these probes are formed by permanent and
nonpermanent cues. The former remain unchanged during the retrieval process, while the latter are
constantly modified. If after several attempts a probe is unsuccessful in retrieving something from LTM,
the nonpermanent cues are substituted and a new attempt is performed.
14
structure contains all emotional links where character A participates, all tensions where character A
participates, and all life at risk and health at risk tensions independently of which character participates in
them. The second transformation consists of eliminating from the story-world context all emotional
links; i.e., it retains only those tensions where character A participates, and all life at risk and health at
risk tensions, independently of who participates in them. Once a transformation has been executed,
MEXICA tries again to apply the exact and inclusive strategies. Notice that MEXICA is not transforming
a conceptual space (typical reflective process) but modifying the cue. Thus, the process for retrieving
possible next actions from LTM work as follows:
1. An action is performed and story-world contexts are updated.
2. MEXICA applies the exact-strategy.
3. If no structure is matched, MEXICA applies the inclusive-strategy.
4. If no structure is matched:
If the second transformation has been already performed an impasse is declared,
otherwise, MEXICA modifies the story world context (performing the first or second
transformation) and goes back to step 2.
Once the possible next actions are brought into working memory, a complex instantiation process to
assign the right characters to the retrieved actions takes place. This process is important since the same
action can take a completely different connotation in the story depending on who participates in it and
how. For example, if the system retrieves ApunchedB
, it is not the same to instantiate this action as
princess punched jaguar knight,orasjaguar knight punched princess or as jaguar knight punched
enemy. Also, this instantiation process establishes when to introduce a new character in the story or when
to employ an old one, which is important to keep the coherence of the story (chaos would ensue if after
every performed action a new character were introduced).
The ability to transform the story-world contexts and the inclusive strategy provide the system with an
important flexibility during the retrieval process. Notice that the dynamic strategy is not relaxing
constraints but transforming the story-world context. In this way, constraints, the retrieval strategies and
the instantiation process form the core elements to create novel and interesting stories in MEXICA.
15
5.2 Reflection.
The reflective state performs three main processes: it verifies the coherence of the story in progress,
evaluates its novelty and interest, and breaks impasses.
In MEXICA, a story’s coherence relies on an element that has not yet been introduced in this paper: an
action’s preconditions. Each story-action has associated a set of preconditions, defined by the user, that
help to assure logical sequences of actions. For example, to perform the action princess cured jaguar
knight it is necessary to satisfy the precondition of jaguar knight being ill or wounded. During reflection
MEXICA analyses action by action the story in progress. When it finds an action with some unfulfilled
preconditions an event to satisfy such preconditions is inserted. For example, the action jaguar knight
twisted his foot can be inserted to satisfy the preconditions of the action princess cured jaguar knight.
Now, this new action might also have unsatisfied preconditions. For example, there is a precondition that
every event in MEXICA must satisfy: all characters participating in an action must be in the same
location. Thus, it is necessary to insert a new event —e.g. jaguar knight invited the princes for a walk to
the forest— to locate both characters in the same place and in this way satisfy this precondition.
MEXICA can insert a full new episode to satisfy preconditions. It is necessary to check preconditions
because during engagement the system generates material without verifying preconditions, therefore,
sequences of not very coherent actions might be produced. During reflection MEXICA checks that each
action’s preconditions are satisfied.
To evaluate novelty, MEXICA compares the content of the current story against the previous stories. As
a result of this evaluation MEXICA classifies the story in progress as adequate, similar to a previous
story, or as a copy of a previous story, and sets the novelty guideline to normal, high or strict (see table
2).
Insert table 2 about here
MEXICA records the number of times that an action has been employed in the previous stories. In this
way, the system detects which are the most utilised actions, which are the regularly used actions, and
which are the most unused actions. Thus, if the novelty guideline is set to Strict, MEXICA employs in
16
the story in progress only those actions classified as the most unused, i.e. all other actions are eliminated
by the filters. If the novelty guideline is set to High, the system employs in the story in progress either
those actions classified as regularly used or most unused. Finally, if the guideline is set to Normal, there
is no constraint to employ any action.
MEXICA evaluates interestingness by comparing the tensional representation of the story in progress
against the tensional representations of the previous stories. For instance, if MEXICA detects that most
of the tensional representations of the previous stories tend to increase their values of tension after the
first actions have been performed, the system verifies that the current story follows the same pattern. If it
is the case that there is a difference between them, MEXICA sets the interestingness guideline to
generate material that fulfils this tendency. To illustrate this situation, the reader can think of a story
formed by the actions princess went to the market,princess bought a nice blanket,princess met jaguar
knight. Clearly, it does not follow this pattern (the tension never increases), so MEXICA evaluates the
story as boring and sets the interestingness guideline to “increment tension” in order to reject all those
retrieved actions that do not increase the tension to the reader. Thus, actions like princess went back
home and had a nap are not produced any more, while actions like suddenly the enemy arrived to the
market and kidnapped the princess are encouraged. The interestingness guideline can be set to increment
tension, keep the same tension, or decrement tension.
MEXICA breaks impasses with the help of the concrete representation. An impasse is declared when the
system cannot match a structure in LTM and bring into working memory actions to continue the story in
progress. MEXICA explores the concrete representation to find an action that in previous stories has
followed the action that triggered the impasse. The logic behind this process is that, if in a previous
stories this sequence of events worked, it might also work for the current story.
5.3 Interaction between states.
By default the system starts in the engaged state, although through a parameter controlled by the user the
system can start in the reflective state. Once the system triggers an engagement-reflection cycle, it only
stops (i.e. the story is finished) when:
17
1. All characters in the story are dead.
2. When an unbreakable impasse is declared.
3. When the number of actions in the story in progress is bigger than the number of actions in the
previous stories (this condition is necessary because MEXICA employs the previous stories to
set the guidelines).
4. When the maximum number of actions allowed in a story is reached. The maximum number of
actions allowed in a story is a parameter definable by the user called Maximum Actions.
Optionally, the user can set the system to stop when a degradation-improvement process is completed. In
this way, it is possible to force the system to create stories either with one degradation-improvement
process or with several degradation-improvement processes.
Table 3 shows the relation between each of the processes performed during an engagement-reflection
cycleandthetypeofconstraintemployedinsuchprocess.
Insert table 3 about here
After the engagement-reflection cycle ends MEXICA performs what is called the “final analysis”. Its
purpose is to insert events in the current story to make explicit and clearer the behaviour of the
characters. This process helps to produce more coherent and well structured outputs. MEXICA
accomplishes this objective by inserting actions that represent explicit character’s goals or tensions.
For example, the reader can picture a story with the following events: eagle knight went to the forest
for a walk, suddenly the enemy appeared between the bushes and attacked the knight, the enemy ran
away leaving the knight wounded, the princess decided to go to the forest for a walk, suddenly she
found the wounded knight, the princess looked for some curative plants to heal the knight... At the
beginning of this story an enemy wounds an eagle knight and some events later the princess cures the
knight saving his life. When MEXICA detects this situation it inserts an action, just after the princess
realises about the wounded knight, where the princess’ goal of curing the knight is set: eagle knight
went to the forest for a walk, suddenly the enemy appeared between the bushes and attacked the
knight, the enemy ran away leaving the knight wounded, the princess decided to go to the forest for a
walk, suddenly she found the wounded knight, she knew that it was her duty to help her people: the
18
knight’s life was at risk and she had to save him, the princess looked for some curative plants to heal
the knight... (the new action is underlined). In this way, by inserting an explicit goal, the robustness of
the story improves. MEXICA applies this procedure when it detects that the life of a character is at
risk, the health of a character is at risk, or a character is a prisoner and another character saves, heals
or rescues the first character. A similar procedure is performed when the system detects a tension due
to love competition or clashing emotions between characters.
The last step is to print the final story. As part of the definition ofactions, a user of MEXICAcan specify
one or several texts associated with each story-action. When the system ends a story, it employs these
texts to print the final output. Figures 1 and 7 show complete and unedited outputs from the MEXICA
program.
6. Evaluation.
MEXICA was evaluated by means of an Internet questionnaire. Fifty subjects from twelve different
countries answered it: 38% of them were Americans (from Brazil, Canada, México and the USA) and
62% Europeans (from Austria, UK, Holland, France, Germany, Greece, Norway and Poland). 92% of
them were graduates, 68% possessed postgraduate degrees and 6% did not answer this question (see
table 4).
Insert table 4 about here
The subjects were asked to rate four stories created by MEXICA on a 5 point scale (from “very poor” to
“very good”) for narrative flow and coherence, narrative structure, content, suspense, and overall quality.
One each of the stories was generated under the E2 operation mode (engaged mode only with filters),
E2-boring (engaged mode only with filters and with the variable “tension to the reader” forced to have
low values), ER2 (the complete model with engaged and reflective mode and the full set of constraints,
see figure 1), and ER2-boring (engaged and reflective mode with the variable “tension to the reader”
forced to have low values, see figure 7).
19
Insert figure 7 about here
It was hypothesised that ER2 would gain the highest rates while E2-boring would gain the lowest rates.
No prediction was made about the order of the ratings for E2 and ER2 boring. For comparison, two
stories created by published story generation programs were included in the questionnaire: a story
framework created by GESTER (Pemberton 1989) and a story created by MINSTREL (Turner 1993).
Finally, a framework of a human-generated story using the same type of “computer-story language” but
aiming to satisfy requirements of originality and interest was also included in the questionnaire. The
results are shown in table 5.
Inserts table 5 about here
ER2 obtained the highest rates in all categories. The ER2 and the human stories got the highest rates in
the suspense category while the ER2-boring and E2-boring stories obtained two of the lowest rates.
These results suggest that the degradation-improvement process employed by MEXICA to produce
interesting stories works adequately. In the same way, the results regarding the narrative structure
suggest that the interaction between reflection and engagement produces more robust stories than the
engagement state alone. It is interesting to notice how the human-generated story was rated lower than
the ER2 story in the overall quality category. From these results it is not possible to conclude that
MEXICA is a better storywriter than a human author, but perhaps that the human was less effective in
accomplishing the task of creatinga successful and somewhat contrived story framework
In MEXICA a story is considered novel when it is different in content to the previous stories. To test
MEXICA, six stories were introduced as the set of previous stories. Table 6 compares the themes that
form the previous stories with the themes of two stories created by MEXICA. As it can be observed,
MEXICA is capable of producing novel stories.
Insert table 6 about here
20
7. Conclusions.
MEXICA is a computer program based on a cognitive model of how humans write. The engagement-
reflection account of writing supplies a general framework to build the computer system while the
development of the program provides insights into the adequacy and completeness of the cognitive
model of writing. The main objective of MEXICA is the production of novel and interesting stories as a
result of the interaction between engagement and reflection. During engagement MEXICA generates
material guided by rhetoric and content constraints, while during reflection the system evaluates —and
when necessary modifies— the story in progress to satisfy requirements of consistence, novelty and
interest. A story is considered consistent when all its preconditions are satisfied. A story is considered
novel when it is not similar to any of the previous stories. A story is considered interesting when it
includes degradation-improvement processes.
MEXICA includes four types of constraints:
Context constraints or story-world contexts. They register the consequences of the events in the
story in progress. Each character has its own story-world context and all they are used as cues to
probe LTM.
Knowledge constraints. They are built from the previous stories and encode the main content and
rhetorical knowledge in the system. They are formed by the abstract representation, tensional
representation and concrete representation.
Guidelines. They are updated during reflection according to the results of the evaluation of the story.
Their purpose is to influence the production of material during engagement.
General Constraints. They encode the knowledge necessary to assure that the story flows and that
basic beliefs about the world are satisfied.
These constraints proved to be adequate when driving the production of material during engagement. The
MEXICA model shows:
21
the plausibility of combining, on one hand, traditional problem solving techniques —represented in
MEXICA by the reflective state— where the system focuses on reaching explicit goal-states, and on
the other hand what might be called the “engagement technique”, where the system focuses on the
production of material driven by constraints and avoids using explicit goal-states.
how to use the previous stories as a way to produce novel outputs.
the importance of flow in a story. Since the production of material is not guided by explicit goals
that push the story towards a particular goal-state, it is necessary to establish a method that assures
that the story would move forwards and would not get trapped in a loop.
the importance of instantiation. The way that actions are instantiated and the decision of when to
introduce new characters and when re-introduce characters already in use, play an important role in
the generation of logical and interesting stories.
MEXICA allows the user to define the primitive actions, their preconditions and post-conditions, and the
set of previous stories. In this way, the user can control the knowledge stored in LTM. Furthermore, the
system includes more than 20 different parameters modifiable by the user that permits applying different
strategies of writing (e.g. operation modes). As far as the authors of this work know, no other system
offers this flexibility to experiment with a computer model.
An evaluation of MEXICA suggests that the system is capable of producing frameworks for short stories
that are similar to those produced by a human and by other story-writing programs. The use of the
tension to the reader appears to be an appropriate method of producing interesting stories. The retrieval
strategies, together with the use of constraints, produces stories that satisfy the established requirements
of novelty. MEXICA thus demonstrates the plausibility of implementing computer models of creativity
in writing in terms of engagement and reflection.
A final thought. Some readers may wonder why story generation programs are so far behind human-level
ability. Why are programs that write in a human-like style so difficult to build? We have twoanswers to
this question. Creativity is a process which has not yet been fully understood. This situation limits the
construction of any model. Thus, it is necessary to continue the research into this area in order to be able
to develop more powerful creative computer systems. Furthermore, current explanations of this
phenomenon are so complex that it is difficult to represent a whole theory of creativity in computer
terms, limiting the power of the resulting systems. MEXICA is an example that illustrates this situation:
22
it only includes part of the engagement-reflection account of writing. All aspects involving the effects of
environment on a writer’s work are not represented in the computer model and to include them may
require many years of research. We find similar problems when picturing in computer terms other
theories of creativity; for example Boden’s (1990) ideas on creativity, where she points out the
importance not just of exploration of conceptual spaces but also of the transformation of these spaces,
suggests that it is necessary to represent detailed general world knowledge, knowledge of the particular
context of the writing and of the anticipated audience, in order to be able to constrain the transformations
of the conceptual space to ones that are believable and acceptable to the reader. These types of
representation present a fundamental problem to AI. Another example is given by Gelertner who
describes emotions “as the glue of thought” during the creative process (1994, p.5). Or in words of the
poet Wordsworth, creativity is “emotion recollected in tranquillity”:
The emotion is contemplated till, by a species of reaction, the tranquillity gradually disappears,
and an emotion, kindred to that which was before the subject of contemplation, is gradually
produced, and does itself actually exist in the mind. In this mood successful composition
generally begins, and in a mood similar to this it is carried on. (Wordsworth, cited in Sharples
1999, p.48)
To successfully carry out this type of creative process, it has been argued, it is necessary to be an
embodied human being — to recount authentic human experience. Even if this were not the case and it
were possible to simulate the effects recountedexperience, we are far from being able to producea
complete computational account of emotion.
Computer models of creativity have proved to be useful tools in the research of human cognition. It is
necessary to continue exploring new ways of tackling the problems described in this section in order to
develop more powerful systems. This work is one step towards a better understanding of creativity. It is
hoped that it will encourage research into computer models based on cognitive accounts.
Acknowledgements.
We would like to thank Jorge Barojas for reading an early draft of this paper. The National Council of
Science and Technology (CONACYT) in México sponsored the MEXICA project.
23
References.
Boden, M., 1990, The Creative Mind: Myths and Mechanisms (London: Weidenfeld and Nicolson).
Bremond, C., 1996, La lógica de los posibles narrativos (trad.) In Análisis Estructural del Relato,
(México, D.F: Ediciones Coyoacán),pp. 99-121.
Gelernter, D., 1994, The Muse in the Machine: Computers and Creative Thought (London: Fourth
Estate).
Lodge, D., 1996, The Practice of Writing: Essays, Lectures, Reviews and a Diary (London: Secker &
Warbug).
Pemberton, L., 1989, A modular approach to story generation. In 4th European ACL, Manchester,
UK, pp. 217-224.
Pérez y Pérez, R., 1999, MEXICA: a Computer Model of Creativity in Writing, PhD thesis, University of
Sussex.
Raaijamkers, R. G. W., and Shiffrin, R. M., 1981, Search for associative memory. Psychological Review
(88): 93-134.
Sharples, M., 1999, How we write: Writing as Creative Design (London: Routledge).
Torrance, M., Thomas, G.V., and Robinson, E.J., 1996, Finding Something to Write About: Strategic and
Automatic Processes in Idea Generation. In C.M. Levy and S. Ransdell (eds) Science of Writing:
Theories, Methods, Individual Differences and Applications (Erlbaum Press), pp. 189-205.
Turner, S. R., 1993, MINSTREL: A Computer Model of Creativity and Storytelling, PhD thesis,
University of California.
24
Jaguar_knight was an inhabitant of the great Tenochtitlan. Princess was an inhabitant of the
great Tenochtitlan. From the first day they met, Princess felt a special affection for
Jaguar_knight. Although at the beginning Princess did not want to admit it, Princess fell in love
with Jaguar_knight. Princess respected and admired Artist because Artist's heroic and intrepid
behaviour during the last Flowery-war. For long time Jaguar_knight and Princess had been
flirting. Now, openly they accepted the mutual attraction they felt for each other. Jaguar_knight
was an ambitious person and wanted to be rich and powerful. So, Jaguar_knight kidnapped
Artist and went to Chapultepec forest. Jaguar_knight's plan was to ask for an important amount
of cacauatl (cacao beans) and quetzalli (quetzal) feathers to liberate Artist. Princess had
ambivalent thoughts towards Jaguar_knight. On one hand princess had strong feelings towards
Jaguar_knight but on the other hand Princess abominated what Jaguar_knight did. Suddenly,
the day turned into night and after seconds the sun shone again. Princess was scared. The
Shaman explained to Princess that Tonatiuh (the divinity representing the sun) was demanding
Princess to rescue Artist and punish the criminal. Otherwise Princess's family would die. Early
in the Morning Princess went to Chapultepec forest. Princess thoroughly observed
Jaguar_knight. Then, Princess took a dagger, jumped towards Jaguar_knight and attacked
Jaguar_knight. Jaguar_knight was shocked by Princess's actions and for some seconds
Jaguar_knight did not know what to do.Suddenly, Princess and Jaguar_knight were involved in
a violent fight. In a fast movement, Jaguar_knight wounded Princess. An intense haemorrhage
arose which weakened Princess. Jaguar_knight felt panic and ran away. Thus, while
Tlahuizcalpantecuhtli (the god who affected people's fate with his lance) observed, Princess cut
the rope which bound Artist. Finally, Artist was free again! Princess was emotionally affected
and was not sure if what Princess did was right. Princess was really confused.The injuries that
Princess received were very serious. So, while praying to Mictlantecuhtli (the lord of the land of
the dead) Princess died.
Figure 1. A story framework generated by MEXICA in ER2 operation mode (text in
italics shows those parts produced in ‘reflection’ mode).
Figure 2. The Cycle of Engagement and Reflection in Writing.
REFLECTION
Interpret
Review and interpret
the written material
Contemplate
Form ideas, explore and
transform conceptual spaces
Specify
Select and organise
ideas and language
ENGAGEMENT
Generate
Produce written text
25
Scenery City
Princess Went_Popocatepetl_Volcano
Hunter Kidnapped Princess
Farmer Found_By_Accident Hunter
Farmer Realised Hunter Kidnapped Princess
Hunter Attacked Farmer
Farmer Fought Hunter
Hunter Wounded Farmer
Hunter Ran_Away
Princess Did_Not_Cure Farmer
Princess Went_Tenochtitlan_City
Farmer Died_By_Injuries
Figure 3. An example of a previous story defined with the PSDL.
ACT
Attacked 2
PRE
Eab-2* ;A(-2,*):B
POS
E b a -3 1 ; B(-3,1):A
ELba%1 ;Lb(%,1):A
TEN
T Lr b a + ; Lr(b):a+
TEXT
@A thoroughly observed @B. Then, @A took a dagger, jumped towards @B and attacked @B.
@A's frame of mind was very volatile and without thinking about it @A charged against @B.
Figure 4. A story-action defined with the SADL.
26
Schema 1 Set 1 of possible next actions.
Schema 2 Set 2 of possible next actions.
Figure 5. Retrieval of actions during engagement.
Figure 6. Representation of a story in terms of the Tension to the Reader.
.
.
.
LTM
Retrieved sets
of possible
next actions
Performance of the next action in
the story in progress
New story-world contexts produced
by the last action performed.
workin
g
memor
y
Probe of
LTM
Schema n
Set n of possible next actions.
Selection o
f
one action
Match of
Schema(s)
Bringing
possible
next
actions
into
working
memory
Initial
action given
by the user
Tension
to the
r
eade
r
Actions
ABCDEF G
Climax
Improvement
processes
Degradation
processes
27
Jaguar_knight was an inhabitant of the Great Tenochtitlan. Princess
was an inhabitant of the Great Tenochtitlan. Jaguar_knight was
walking when Ehecatl (god of the wind) blew and an old tree
collapsed injuring badly Jaguar_knight. Princess went in search of
some medical plants and cured Jaguar_knight. As a result
Jaguar_knight was very grateful to Princess. Jaguar_knight rewarded
Princess with some cacauatl (cacao beans) and quetzalli (quetzal)
feathers.
Figure 7. A story generated in ER2-boring operation mode.
Engaged State 1 (E1) No Filtering
Process No guidelines.
Engaged State 2 (E2) Filtering Process Guidelines set by default.
Engaged and Reflective States 1
(ER1) No Filtering
Process No guidelines.
Engaged and Reflective States 2
(ER2) Filtering Process Guidelines set during the
Reflective State
Table 1. Operation modes in MEXICA.
Classification of the current story. Novelty guideline.
Adequate Normal
Similar to a previous story High
A copy of a previous story Strict
Table 2. Possible values for the novelty guideline based on the classification of the current
story.
28
PROCESS CONSTRAINTS EMPLOYED
ENGAGEMENT
Performing of an action in the story.
Retrieval of actions.
Elimination of no useful-actions
(filters).
Story-world contexts.
Story-world contexts
Abstract Representation.
Guidelines.
General constraints.
REFLECTION
Verification of coherence.
Breaking of an impasse.
Evaluation of the current story.
Concrete representation.
Concrete representation.
Tensional Representation.
Guidelines (update).
Table 3. The different processes performed during an engagement-reflection cycle and the
constraintsemployedineachofthem.
Nationality
British Mexican German Brazilian Polish Norwegian Greek US Austrian Canadian Dutch French
20% 20% 16% 12% 10% 6% 4% 4% 2% 2% 2% 2%
Education
Unknown Diploma Bachelor Master MPhil PhD
6% 2% 24% 46% 4% 18%
Table 4. Nationalities and educational level of the subjects that answered the
questionnaire.
ER2 Human MINSTREL ER2-boring E2 E2-boring GESTER
Narrative flow 3.8 3.5 2.9 3.5 2.2 2.8 2.1
Narrative
structure 3.7 3.7 3.2 3.2 2.6 2.7 2.1
Content 4.1 3.7 3.6 2.8 2.8 2.4 2.6
Suspense 3.8 3.8 3.3 2.3 2.3 2.0 2.1
Overall quality 3.8 3.6 3.3 2.9 2.6 2.5 2.4
Table 5. Results of MEXICA’s evaluation on a 5 point scale from ‘very poor’ to ‘very
good’.
29
Story Topic
Previous
Story #1 Love and Disloyalty. This story is about a knight who falls in love with his
brother’s girlfriend and decides to kidnap her.
Previous
Story #2 Love and Obsession. This story is about a princess who falls in love with a
knight. When she realises that he is in love with another woman, the princess
decides to kill her rival.
Previous
Story #3 Envy. This story is about a prince who envies his father position. The prince’s
ambition is so great that he abandons his father in the forest after he suffers an
accident.
Previous
Story #4 Love and Obsession. This story is about a knight who is in love with a woman
who is attracted to a different man. The knight decides to attack his rival.
Previous
Story #5 Valour. This story is about a kidnapped princess who is rescued by a farmer.
The farmer is wounded during the rescue and dies.
Previous
Story #6 Gratitude. This story is about a hunter who saves the life of a Tlatoani (a
Mexica King), and later the Tlatoani does the same for the hunter.
The princess
who cured the
Jaguar Knight
Love and Revenge.This story is about a kidnapped princess who is rescued by
a knight. The princess falls in love with the knight. However, she realises that
the knight murdered her father and decides to kill him.
The lovers. Love and Values. This story is about a princess who is in love with a man
whose values clash with the princess’ values. Thus, she has to decide between
following her values or following her man.
Table 6. Relation of the themes in the Previous Stories and two tales created by MEXICA.
... Automated story generation is the problem of automatically selecting a sequence of events, actions, or words that can be told as a story. To date, most story generation systems have used symbolic planning [10,14,20,23,25] or case-based reasoning [6]. While these automated story generation systems were able to produce impressive results, they rely on a human-knowledge engineer to provide symbolic domain models that indicated legal characters, actions, and knowledge about when character actions can and cannot be performed; these systems are limited to only telling stories about topics that are covered by the domain knowledge. ...
... Automated Story Generation has been a research problem of interest since nearly the inception of artificial intelligence. Early attempts relied on symbolic planning [10,14,20,25] or case-based reasoning using ontologies [6]. These techniques could only generate stories for predetermined and well-defined domains of characters, places, and actions. ...
Article
Full-text available
Automated story generation is the problem of automatically selecting a sequence of events, actions, or words that can be told as a story. We seek to develop a system that can generate stories by learning everything it needs to know from textual story corpora. To date, recurrent neural networks that learn language models at character, word, or sentence levels have had little success generating coherent stories. We explore the question of event representations that provide a mid-level of abstraction between words and sentences in order to retain the semantic information of the original data while minimizing event sparsity. We present a technique for preprocessing textual story data into event sequences. We then present a technique for automated story generation whereby we decompose the problem into the generation of successive events (event2event) and the generation of natural language sentences from events (event2sentence). We give empirical results comparing different event representations and their effects on event successor generation and the translation of events to natural language.
... They introduced three groups of such models: the structural models, planning-based models, and machine learning models. In their survey, they introduced MEXICA [Pérez y Pérez and Sharples, 2001], MINSTREL [Turner, 1993[Turner, , 1994, and the analysis of emotional flow [Mori et al., 2019a] as the stream of understanding and generating stories that incorporate emotions. Bae et al. [2021] conducted a preliminary survey on story interestingness, setting "how to measure story interestingness" as the research question. ...
Preprint
Storytelling has always been vital for human nature. From ancient times, humans have used stories for several objectives including entertainment, advertisement, and education. Various analyses have been conducted by researchers and creators to determine the way of producing good stories. The deep relationship between stories and emotions is a prime example. With the advancement in deep learning technology, computers are expected to understand and generate stories. This survey paper is intended to summarize and further contribute to the development of research being conducted on the relationship between stories and emotions. We believe creativity research is not to replace humans with computers, but to find a way of collaboration between humans and computers to enhance the creativity. With the intention of creating a new intersection between computational storytelling research and human creative writing, we introduced creative techniques used by professional storytellers.
... This search space is then explored by means of genetic algorithms, using as fitness function a combination of story coherence and story interest. Gómez de Silva and Pérez y Pérez [19] propose a model of story construction that combines the MEXICA existing knowledgebased story generator [15] with the GENCAD evolutionary approach for the adaptation stage in case-based solutions to architectural problems [18]. The story construction model relies on the knowledge-based heuristics of MEXICA to build initial populations and applies the evolutionary approach to refine them. ...
... Other storytelling systems are MINSTREL [46], MEXICA [40], and BRUTUS [8]. These are hybrid systems that implement a computer model of creativity in writing. ...
Article
Full-text available
In this article, the Mingei Online Platform is presented as an authoring platform for the representation of social and historic context encompassing a focal topic of interest. The proposed representation is employed in the contextualised presentation of a given topic, through documented narratives that support its presentation to diverse audiences. Using the obtained representation, the documentation and digital preservation of social and historical dimensions of Cultural Heritage are demonstrated. The implementation follows the Human-Centred Design approach and has been conducted under an iterative design and evaluation approach involving both usability and domain experts.
... Existing studies have also tried to generate a story. Early work relied on symbolic planning [4,31] and case-based reasoning [12,65], while more recent work uses deep learning methods. Some of them focused on story ending generation [16,33], where the story context is given, and the model is asked to select a coherent and consistent story ending. ...
Article
Generating a text based on a predefined guideline is an interesting but challenging problem. A series of studies have been carried out in recent years. In dialogue systems, researchers have explored driving a dialogue based on a plan, while in story generation, a storyline has also been proved to be useful. In this paper, we address a new task–generating movie scripts based on a predefined narrative. As an early exploration, we study this problem in a “retrieval-based” setting. We propose a model (ScriptWriter-CPre) to select the best response ( i.e. , next script line) among the candidates that fit the context ( i.e. , previous script lines) as well as the given narrative. Our model can keep track of what in the narrative has been said and what is to be said. Besides, it can also predict which part of the narrative should be paid more attention to when selecting the next line of script. In our study, we find the narrative plays a different role than the context. Therefore, different mechanisms are designed for deal with them. Due to the unavailability of data for this new application, we construct a new large-scale data collection GraphMovie from a movie website where end-users can upload their narratives freely when watching a movie. This new dataset is made available publicly to facilitate other studies in text generation under the guideline. Experimental results on the dataset show that our proposed approach based on narratives significantly outperforms the baselines that simply use the narrative as a kind of context.
... Early work on story generation used planning (Meehan, 1976;Lebowitz, 1987;Cavazza et al., 2003;Porteous and Cavazza, 2009;Riedl and Young, 2010;Ware and Young, 2010) or casebased reasoning (Pérez y Pérez and Sharples, 2001;Peinado and Gervás, 2005;Turner, 2014). In many cases, these systems are provided with a goal or outcome state. ...
Preprint
The advent of large pre-trained generative language models has provided a common framework for AI story generation via sampling the model to create sequences that continue the story. However, sampling alone is insufficient for story generation. In particular, it is hard to direct a language model to create stories to reach a specific goal event. We present two automated techniques grounded in deep reinforcement learning and reward shaping to control the plot of computer-generated stories. The first utilizes proximal policy optimization to fine-tune an existing transformer-based language model to generate text continuations but also be goal-seeking. The second extracts a knowledge graph from the unfolding story, which is used by a policy network with graph attention to select a candidate continuation generated by a language model. We report on automated metrics pertaining to how often stories achieve a given goal event as well as human participant rankings of coherence and overall story quality compared to baselines and ablations.
Chapter
This paper introduces Linguoplotter, a workspace-based architecture for generating short natural language descriptions. All processes within Linguoplotter are carried out by codelets, small pieces of code each responsible for making incremental changes to the program’s state, the idea of which is borrowed from Hofstadter et al. [6]. Codelets in Linguoplotter gradually transform a representation of temperatures on a map into a description which can be output. Many processes emerge in the program out of the actions of many codelets, including language generation, self-evaluation, and higher-level decisions such as when to stop a given process, and when to end all processing and publish a final text. The program outputs a piece of text along with a satisfaction score indicating how good the program judges the text to be. The iteration of the program described in this paper is capable of linguistically more diverse outputs than a previous version; human judges rate the outputs of this version more highly than those of the last; and there is some correlation between rankings by human judges and the program’s own satisfaction score. But, the program still publishes disappointingly short and simple texts (despite being capable of longer, more complete descriptions). This paper describes: the workings of the program; a recent evaluation of its performance; and possible improvements for a future iteration.KeywordsLanguage generationSelf-evaluationWorkspaceCodelet
Chapter
Creativity is a defining feature of human cognition and has fascinated philosophers and scientists throughout history. In the last few decades, the development of rigorous experimental techniques, advances in neuroscience, and the explosive growth of computational methods has led to great advances in the understanding of the creative process. This chapter provides an overview of some of this work. It looks at recent results from studies of the neurological processes underlying creative thinking, and at computational models that attempt to simulate creativity at a phenomenological level. These models span a range of levels, from neurodynamical models attempting to simulate mental processes to more abstract ones. The chapter also looks explicitly at models of collective creativity from small groups to large social networks. Finally, it points to some recent developments in machine learning that are relevant to computational creativity and are influencing the modes of human creativity.
Conference Paper
Full-text available
One way of characterising texts is in terms of the discourse structures on which they appear to be built. Each type of text, or genre, e.g. the sports report, the recipe, the sermon, the proverb, will have associated with it a characteristic organisation of units. In this paper, a general model of the structure of one text type, the story, is described. This model forms the basis of a program which combines the general story structure principles with rules governing a particular sub-genre, the Old French epic, in order to generate story summaries.
Article
Full-text available
s guide the writing process, and a writer re-represents some of these as explicit conceptual spaces. Creativity in writing occurs through a mutually promotive cycle of engagement and reflection, both guided by constraint. A session of engaged `knowledge telling' generates written material for consideration. Reflection involves reviewing and interpreting the material as a source for contemplation. Contemplation generates new ideas which are explored and transformed, producing plans and constraints that drive a further period of engaged writing. --- 2 --- This basic creative mechanism supports a variety of writing strategies, depending on the timing and relative emphasis given to reviewing, contemplation, planning and engagement. Writing as design emphasises the writer as a user of tools and a creator of cognitive artefacts. A writer is a thinker in a self-constructed environment which affords, constrains and mediates the writing process. Writing as design emphasises the use of a prim
Article
Describes search of associative memory (SAM), a general theory of retrieval from long-term memory that combines features of associative network models and random search models. It posits cue-dependent probabilistic sampling and recovery from an associative network, but the network is specified as a retrieval structure rather than a storage structure. A quantitative computer simulation of SAM was developed and applied to the part-list cuing paradigm. When free recall of a list of words was cued by a random subset of words from that list, the probability of recalling one of the remaining words was less than if no cues were provided at all. SAM predicted this effect in all its variations by making extensive use of interword associations in retrieval, a process that previous theorizing has dismissed. (55 ref)
Article
What is creativity? One new idea may be creative, whereas another is merely new: What's the difference? And how is creativity possible? These questions about human creativity can be answered, at least in outline, using computational concepts. There are two broad types of creativity, improbabilist and impossibilist. Improbabilist creativity involves (positively valued) novel combinations of familiar ideas. A deeper type involves METCS: the mapping, exploration, and transformation of conceptual spaces. It is impossibilist, in that ideas may be generated which - with respect to the particular conceptual space concerned - could not have been generated before. (They are made possible by some transformation of the space.) The more clearly conceptual spaces can be defined, the better we can identify creative ideas. Defining conceptual spaces is done by musicologists, literary critics, and historians of art and science. Humanist studies, rich in intuitive subtleties, can be complemented by the comparative rigour of a computational approach. Computational modelling can help to define a space, and to show how it may be mapped, explored, and transformed. Impossibilist creativity can be thought of in "classical" AI terms, whereas connectionism illuminates improbabilist creativity. Most AI models of creativity can only explore spaces, not transform them, because they have no self-reflexive maps enabling them to change their own rules. A few, however, can do so. A scientific understanding of creativity does not destroy our wonder at it, nor does it make creative ideas predictable. Demystification does not imply dehumanization.
Article
Thesis (Ph. D.)--University of California, Los Angeles, 1993. Vita. Includes bibliographical references (leaves 731-738).
La lo! gica de los posibles narrativos (trad
  • C Bremond
Bremond, C., 1996, La lo! gica de los posibles narrativos (trad.) In AnaU lisis Estructural del Relato, (Me! xico, D.F : Ediciones Coyoaca! n), pp. 99± 121.
The Muse in the Machine : Computers and Creative Thought
  • D Gelernter
Gelernter, D., 1994, The Muse in the Machine : Computers and Creative Thought (London : Fourth Estate).
Finding something to write about : strategic and automatic processes in idea generation
  • M Torrance
  • G V Thomas
  • E J Robinson
Torrance, M., Thomas, G. V., and Robinson, E. J., 1996, Finding something to write about : strategic and automatic processes in idea generation. In C. M. Levy and S. Ransdell (eds) Science of Writing : Theories, Methods, Individual DiOE erences and Applications (Mahwah, NJ : Erlbaum Press), pp. 189± 205.
The Practice of Writing : Essays, Lectures, Reviews and a Diary
  • D Lodge
Lodge, D., 1996, The Practice of Writing : Essays, Lectures, Reviews and a Diary (London : Secker & Warbug).