<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>An API-based Approach to Co-creation in Automatic Storytelling</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Eugenio Concepcion</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pablo Gervas</string-name>
          <email>pgervas@sip.ucm.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gonzalo Mendez</string-name>
          <email>gmendez@fdi.ucm.es</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Facultad de Informatica</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Instituto de Tecnolog a del Conocimiento Universidad Complutense de Madrid</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>The basic idea behind this paper is the development of a collaborative environment for generating stories. Hence, the authors put forward an architectural model for knowledge interchange between story generation systems, namely Propper, STella and Charade, in the interest of enhancing the interoperability and fostering the co-creation process. For this reason, this paper proposes an API Economy model based on the interchange of knowledge and services between story generation systems. The proposed architecture is based on an API-based microservices ecosystem connected according the REST architectural model. This approach aims at starting with a reduced set of services for extending it later with new capabilities.</p>
      </abstract>
      <kwd-group>
        <kwd>Computational creativity</kwd>
        <kwd>Story generation systems</kwd>
        <kwd>Software architecture</kwd>
        <kwd>Service-Oriented Architecture</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Digital assets are increasingly becoming the most valuable resources that
underlie much of the present economics. The digital artefacts are the key components
in many organizations, whose businesses rely heavily on their ability to manage
them. Making these key capabilities available by publishing them as APIs
accelerates the innovation and provides uniform data and functionalities to internal
and external actors. According to Willmott and Balas [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ], an API Economy is
de ned as the emerging economic e ects enabled by companies, governments,
non-pro ts and individuals using APIs to provide direct programmable access
to their systems and processes.
      </p>
      <p>
        Automatic story generation is a part of a wider research area in Arti cial
Intelligence named Computational Creativity (CC), which aims to develop a
creative behaviour in machines [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. A story generator algorithm (SGA) refers
to a computational procedure resulting in an artefact that can be considered
a story [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. A story generation system, also named storytelling system, can be
de ned as a computational system designed to tell stories [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>From an architectural point of view, automatic story generation systems have
been traditionally designed as monolithic systems. That means that a single
application concentrated all the required functionality and assets. Obviously,
this was a feasible solution for the earlier systems, which were built mainly for
research purposes and implemented a limited-complexity functionality. As the
story generation systems are becoming more complex, they are being designed
in a much more modular way.</p>
      <p>
        The big picture of the presented ecosystem relates to a service-oriented
architecture [
        <xref ref-type="bibr" rid="ref20 ref5">5, 20</xref>
        ], and the microservices model [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. This paradigm provides a
convenient framework for organizing complex software systems. Applied to our
particular research context, this approach, along with an API economy model,
would allow the storytelling systems to create new functionalities and value.
The resulting economy enables many new classes of applications with the
potential to open new ways of hybridize algorithms, models and processes. This new
ecosystem also entails the adoption of new roles, that is, API providers, API
consumers, and the end user |as shown in Figure 1.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>For the purpose of this paper, two research e orts need to be reviewed: a
panorama of the architecture of the most relevant story generation systems { in
order to understand how they operate and what type of architectural model they
follow {, and existing approaches to combine story generation systems together
{ to consider what possible ways of combining them have been attempted.</p>
      <p>
        Generally speaking, the architecture of a good part of the existing story
generation systems usually ts with three main categories: those that are built over
a planner [
        <xref ref-type="bibr" rid="ref14 ref23 ref25 ref4">14, 4, 25, 23</xref>
        ]; the systems developed by applying case-based reasoning
(CBR) [
        <xref ref-type="bibr" rid="ref25 ref9">25, 9</xref>
        ]; and those builts over agent-based architectures [
        <xref ref-type="bibr" rid="ref15 ref24">24, 15</xref>
        ].
      </p>
      <p>
        Despite there is not a vast amount of literature on the subject, several e orts
concerning collaborative story generation have been carried out. Slant [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] can
be considered a remarkable example of storytelling systems interoperating for
producing an enhanced outcome. It is an architecture for creative story
generation that integrates di erent types of story generation systems. It also provides
a convenient framework with a view to other systems to integrate with it. Slant
is the end result of an ambitious integration project that involves the
integration of several di erent components: one based on Mexica [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], one based on
GRIOT [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], and a new one speci cally developed for the combined system.
From a technical point of view, Slant consists of a blackboard architecture that
allows di erent storytelling systems or components to create stories
collaboratively. The goal is to allow the systems to in uence each other for generating an
enhanced result. The blackboard architecture for developing the story
representation, and the Slant story XML format that is used, open up new possibilities
for collaboration between creative literary systems, allowing models of creativity
to be developed and added in di erent con gurations.
      </p>
      <p>
        In a wider context, still within the computational creativity area, it is also
noteworthy the architecture proposed by Veale [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] for creative Web services.
This model tried to combine both the academic and the industry needs in a
solution for enhancing computational creativity systems. The architecture
identi ed three types of services: discovery services, aimed at mining the knowledge
contained in texts, and acquire emergent insights and novel perspectives on the
expressed concepts; composition services, designed to suggest, elaborate, and
comprehend conceptual metaphors, analogies, and blends, as well as services
for accessing the large store of commonsense knowledge that these composition
services will crucially rely upon; and framing services, which can package the
conceptual conceit that underpins a creative act for an audience in a concise,
easily appreciable, and memorable form, such as a linguistic metaphor, simile,
joke, name, slogan, short story, poem, picture, piece of music, or a mixture of
these forms. The proposed architecture is also accompanied by two speci c Web
services: Thesaurus Rex and Metaphor Magnet -as examples of creative
functionality.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Scope</title>
      <p>
        The idea behind the development of a collaborative environment for co-creating
stories is pretty close to a practice referred by Veale [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] when he spoke of how
organizations outsource their creative needs to external agencies. Such agencies
act as option providers, in the sense that they create a universe of potential
solutions, but leave others to make the nal decision. In a co-creation scenario,
several systems interact for creating a variety of feasible stories, but they require
the collaboration of one or more humans to evaluate the results and provide a
feedback.
      </p>
      <p>
        The involved systems, STellA [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], PropperWryter [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and Charade [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], have
been selected because they di er considerably from each other. The three systems
focus on di erent aspects of storytelling. STellA is centred on causality, putting
the stress on the causal order of events and actions. PropperWryter's thrust
is the inner structure of the story. It works using the categories of characters
functions de ned by Propp [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. Charade is basically oriented to the simulation
aspect, giving as a result the evolution of the a nities between the characters.
Thus, the combined operation of the three systems can be fruitful, especially if
every component supplies the rest with its special features.
      </p>
      <p>STellA can bring the basic causal structure of the story. This product can
be re ned by applying the functions de ned in PropperWryter, giving a more
cohesive plot. Charade can provide a more credible behaviour by incorporating
the interaction between the characters of the story.</p>
      <p>
        The choice for REST as the architectural style of the solution comes from
the need of decoupling the distinctive features of each system from the
communication architecture [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
3.1
      </p>
      <sec id="sec-3-1">
        <title>STellA</title>
        <p>
          STellA (Story Telling Algorithm) [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] is a story generation system that controls
and chooses states in a non-deterministically generated space of partial stories
until it nds a satisfactory simulation of events that is rendered as a story.
        </p>
        <p>STellA uses a custom representation for the knowledge it needs. It
manages several di erent structures, including a matrix representation of the world
in which characters live, and a set of rules for evaluating the range of results
associated to the actions.</p>
        <p>In STellA, the generation process involves an iterative creation of new states.
Every simulation is modelled and implemented as a non-deterministic process
in which every step can generate not only one but many others. This simulation
requires the whole world domain to be explicitly represented as a simplistic view
of a realistic environment. This approach provides a very detailed scenario that
allows for a rich set of possibilities in generation. Each iteration generates a set
of candidate versions of the current state, and then the process identi es the
most likely ones by analysing their likelihood in terms of their plausibility and
their narrative properties. This step is carried out by applying constraints and a
generalized version of tension curves to drive story generation. These candidate
partial stories are evaluated insofar they satisfy a given set of constraints and
to what extent their tension curves t with a set of target curves. The results
of this process provide a criterion to decide if a partial story is promising and
whether a story is nished.</p>
        <p>The system requires an initial state and nal conditions (which may also
be a state to be reached). Basically, it generates from a starting point to a
nal condition. One of the most characteristic concepts managed by STellA
is the entropy. The generator is able to generate many scenarios during the
reasoning process; and the more things are invented, the more entropy a story
has. For example, if in the initial state there is a scenario expressed like John
loves Mary and they have a child, and the child would be invented, it generates
little entropy. Conversely, if the scenario expresses that Mary has been abducted
by the Martians, it would be necessary to invent the Martians, who live on Mars,
who want to take Mary (and why), and a few other things. That scenario would
generate a lot of entropy.</p>
        <p>Every state has entropy, and the state entropy is given by every generation
cycle. The user determines how much entropy can be reached. The system
outputs a very detailed sequence of snapshots of what happens at each moment.
The result is a more or less narrative elaboration. Thus, the output is a list of
states, in the same format as the input. Each state contains a timestamp. All
the generated story, that is, all its states, are checked to see if they verify the
established conditions.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>PropperWryter</title>
        <p>
          PropperWryter [
          <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
          ] is a story generation system that creates Russian folktales
according to Propp's generation rules [
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. These rules provide a very clear
description of how the folktales morphology could be used for story generation.
This approach has been previously used in other systems, like [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ].
        </p>
        <p>PropperWryter uses a set of abstractions for representing the essential
concepts de ned by Propp, especially the character function, and de nes a procedure
that rst chooses a sequence of character functions to act as abstract narrative
structure to drive the process, and then progressively selects instantiations of
these character functions in terms of story actions to produce a conceptual
representation of a valid story.</p>
        <p>The generator can work in two forms: it can generate a story with no input,
or it can take an input query (which can be a sequence of narrative tags or a
sequence of actions), and generate a sequence of states. PropperWryter requires
several work resources: a set of actions, a list of possible dependencies between
actions, the mapping of each action to a high-level narrative label (Match,
Return, Clash, Defeat, Prison, Release...), a list of possible dependencies between
narrative labels (Departure-Return, Clash-Defeat, Prison-Release...), and the
mapping of each variable that appears in an action to a narrative role (Hero,
Villain, Victim...). The output of the system consists of a sequence of states,
where each state is described by a set (not necessarily ordered) of predicates in
which the characters are identi ed as variables. In general terms, this seeks to
ensure that if the sequence includes an action that is an instance of a tag that
has dependency on another tag, the sequence will also include an action that is
an instance of this last tag. It is also intended that the assignment of narrative
roles to each character appearing in the sequence (depending on the roles they
play in the set of actions in which they appear) is consistent throughout the
sequence.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Charade</title>
        <p>
          The system developed by [
          <xref ref-type="bibr" rid="ref15 ref16">15, 16</xref>
          ] models the relationship between two characters
using their mutual a nities, and applies it for generating stories. This system
is an agent-based architecture developed using JADE. It consists of two types
of agents: a Director Agent, that sets up the execution environment and creates
the characters; and the Character Agents, one for each character of the story,
whose interactions generate the story.
        </p>
        <p>The main objective of the system were implementing an a nity model as
decoupled as possible from the story domain, and testing it independently from
other factors such as the environment in which the action takes place or the
personality traits and emotional state of the characters. Due to this independence,
it can be easily used to generate di erent kinds of stories.</p>
        <p>The generator is based on a simulation of the characters' interaction.
During the simulation, the characters perform actions between them, varying the
a nity levels between them as a result. According to the a nity level, the
characters can be a couple, friends, mutually indi erent, and enemies. Generation is
independent of the domain; although, since it focuses on a nities, it works best
in domains where this a nity makes sense. The simulation is not directed, so
that it can not be considered to constitute a plot or a story by itself. The input
includes a complete parametrization of possible actions, categorized according
the type of relationship allowed for the characters, the simulated characters, and
their relationships measured in terms of a nity. The output consists of a list of
actions proposed by characters, and the response of their counterparts, that can
accept or reject the proposals, with the variation of a nity between the
characters involved. Despite no text is generated, it would be easy to use a template
for generating a textual description.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Proposed solution</title>
      <p>The proposed architecture aspires to articulate the operation of several
automatic story generators in a way that allows the generation of higher quality
stories by joining the capabilities of each system. The seed of this solution is the
model composed by the three storytelling systems described before.</p>
      <p>
        Every story generator provides a set of key operations in the form of services,
so that each system can be considered as a module in the overall structure. The
communications are based on the well-known REST architectural model [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
This approach aims at simplifying the communication process by means of an
easily achievable representation of the information. From a technical point of
view, every involved system publishes their capabilities as REST-based services.
Every service understands and generates JSON messages containing the required
information in each case. Due to the fact that all these systems existed prior to
the de nition of the API ecosystem, everyone can be considered as a legacy
system that must be adapted to this new purpose. This is the reason why the
core capabilities or every system will be considered as the back-end, and a new
tier, speci cally designed for publishing REST services, will be built for wrapping
them.
4.1
      </p>
      <sec id="sec-4-1">
        <title>Design considerations</title>
        <p>
          Many of the existing story generation systems have been built in a such way that
the collaboration between them is a really complex task. This happens because
almost every system duplicates a considerable part of main storytelling functions.
For example, the generation of the story in natural language is a typical stage
in every story generator. If every storytelling system breaks its architecture into
ner-grain components, such as microservices [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ][
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], these components could
be used separately. Also, every microservice would be autonomous enough to
be independently evolved according to new requirements, without a ecting the
rest of the architecture. But the most remarkable achievement of this approach
would be the possibility of building hybrid coarse-grain services by composing
the existing microservices. This new system would take advantage of using the
best-of-breed for building a collaborative story generation architecture.
        </p>
        <p>One of the key points of the architectural model is to ensure semantic
interoperability. To develop a formalism for knowledge sharing in a collaborative
architecture would make no sense if it is not possible to have an understanding
by all parties of the information being exchanged. In this respect, it seems
necessary a component for orchestrating the di erent microservices, and a repository
to keep the shared knowledge that can be consulted by any microservice every
time it has to interpret a request.</p>
        <p>This model of knowledge base has been designed as centralized for two
reasons: on the one hand, the concept-based framework applied must be necessarily
shared between the various story generators, and on the other hand, it is
necessary to avoid that the messages exchanged become too verbose. This last
requirement is technical. If we understand that a microservice-based architecture
is deployed in a distributed environment, this means that communications rely
on the network, at all costs. If we assume that the communication model is truly
REST, there is no state. This means that for each request it is necessary to send
all the data that the server requires to be able to perform its work. This has the
e ect of sending the complete generated story in every request. In other words,
the entire knowledge base required by the story is appended to the request data,
making the communications inevitably become inoperative after a few requests
between systems.</p>
        <p>Another aspect to consider is that it is not possible to delegate to each system
the de nition of the entities or concepts that it handles. Take, for example, an
action as simple as eating. In the case of Charade, this concept refers to a couple
lunch, and it is an atomic action. Instead, in STellA this is a composite action,
which refers to the physical act of eating and involves several steps such as
bringing food to the mouth, chewing and swallowing. Clearly, a human being
senses that the same concept is not being talked about, but a computer system
needs to have precise de nitions so that it knows what the system is referring to.
It is therefore necessary for the de nition to become universal, and for systems
to know what they are referring to by taking existing concepts to operate.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Methodology</title>
        <p>
          The involved systems will be decomposed in its basic functionalities, that is, as
microservices that will expose their capabilities as REST-based API [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Every
service will understand and generate JSON messages containing the required
information in each case. Due to the fact that all these systems existed prior to
the de nition of the collaboration architecture, some parts can be considered as a
legacy system that must be adapted to this new purpose. This is the reason why
certain core capabilities of the systems will be reconstructed, and a new tier,
speci cally designed for publishing REST services, will be built for wrapping
them. A high-level component, namely the story director, will implement the
orchestration of the whole system, establishing the order in which every system
would make its part. For achieving a full syntactic and semantic interoperability,
the exchanged messages between the di erent components will be based on a
common knowledge representation model [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
        <p>
          The steps for achieving the establishment of a well-grounded API Economy
are widely discussed by specialized literature [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ].
        </p>
        <p>
          Olson [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ], suggested that organizations should treat their API as products
it must nurture. In this regard, she proposed a sequence of steps for achieving
this [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. Notable among them are the importance of understanding the value
chain, and the establishment of goals for every API strategy.
4.3
        </p>
      </sec>
      <sec id="sec-4-3">
        <title>System design</title>
        <p>The general model of joint operation of the three systems is based on the use of
the key capabilities of each of them. The Figure 2 depicts the whole architecture
and its components. Thus, the role of PropperWryter is to develop the main
scheme of the plot, while STellA is responsible for simulating the development
of the di erent low-level scenes, and Charade establishes the evolution of the
relationships between the characters.</p>
        <p>The role of the story director entails the orchestration of the whole system,
establishing the order in which every system would make its part. This is the
central component that will need to preserve the collective knowledge by means
of the common knowledge base. Concerning this point, the need for a common
representation arises. As stated above, every system focuses in a di erent aspect
of story generation, so are its knowledge representation. Every published
service must be considered to provide system-speci c knowledge structure, so the
adaptation step must be performed in the composer module.</p>
        <p>The story director is also related to the maintenance of consistency in the
story that is being generated. As already mentioned, Charade simulates the
evolution of relationships (couple, friends or enemies). Let us suppose a story
in which, in one of the scenes of the plot, the couple has a romantic dinner
and the end result is that their love a nity increases. For Charade, a romantic
dinner is an atomic action, it does not go into the detail of how it evolves. The
story could then be passed to a service of STellA for developing in more detail the
scene of the romantic dinner. During the simulation, STellA generates the actions
performed by the characters, and it turns out that, at a given moment, the couple
conversation becomes a discussion. This result would be clearly inconsistent with
the nal result calculated previously. At this point, the director's role becomes
crucial. It must decide whether to discard the scene generated by STellA, if it
changes the course of events in the relationship (as generated by Charade), or if
it requests STellA to re-evaluate the situation so that after the discussion there
is a reconciliation, and the dinner ends happily.</p>
        <p>In a rst approach, a REST-based interface is being de ned for wrapping
the original story generation systems. This step leads to the de nition of a set
of common concepts shared across the systems, so that the same entities are
expressed in the same way. This step is essential for articulating a generation
pipeline with all the systems. At this point, there are key concepts that must be
managed by the director and clearly informed to the participants: state
transitions, actions and results (understood as a causal chain), sequentiality...</p>
        <p>The key component of the API Economy approach is the API Manager. This
component provides the sca olding for building the service-based API structure.
Usually, an API Manager provides three essential features: a single entry point for
all the consumers requests (API Gateway), a central web-based tool for managing
the various policies to be applied, and a marketplace for developers that allows
them to easily nd the APIs they need to consume (API Portal). All these
component are normally completed by a centralized con guration service, and
the elastic infrastructure for hosting the microservices. The roles and derived
bene ts from this infrastructure are multiple:
{ Centralized con guration, a service that all applications use to specify and
access their respective con guration information in a consistent way.
{ Automatic deployment, a service that invokes and decommissions APIs and
service implementations under administrator control.
{ Single security enforcement point, usually provided by the API Gateway.
{ Auditing and monitoring, provided by the API Gateway.</p>
        <p>
          Another essential component in architecture is the repository of drafts (or
stories). Both PropperWryter and STellA generate story trees from possible
continuations. While the STellA model is less restrictive than the PropperWryter
model, in both cases it is necessary to maintain a draft tree in progress. In order
to avoid having an exchange of excessively large JSON messages, the idea is to
reposition all the drafts, to recover them only when required. The formalism
employed for representing these drafts is detailed in a speci c paper [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
        <p>Thus, the main services are the following:
{ BreadthFabulator (PropperWryter)
{ Re ector (PropperWryter)
{ Simulation engines (STellA)
{ EpisodeGenerationEngine (STellA)
{ DiscourseGenerator (STellA)
{ SuspenseFilter (STellA)
{ NarrativeTensionFilter (STellA)
{ A nitiesEngine (Charade)
{ StoryDirector</p>
        <p>In the development of the plot, the actions of the characters and the events
modify the global state of the narrative universe. In this sense, every action that
takes place in the plot carries information related to the new state in which the
universe remains.</p>
        <p>The joint operation of the microservices ecosystem will be directed by the
Story Director, who will act as an orchestrator of the generation process. It will
request the APIs of the di erent services according to the generation process.
This process will proceed iteratively, generating drafts that will be re ned in each
pass, until the established criteria for story completeness are met. The Re ector
service will analyse the draft for ensuring the compliance of these criteria |as
it originally did in PropperWryter.</p>
        <p>In the case of STellA, it provides a detailed simulation for every scene
generated by PropperWryter in the high-level plot. The service that provides this
is the Episode Generation Engine, which receives as input a draft of the story,
which contains information about the characters, and what must happen in the
scene at a high level. The service then generates a simulation to explore the
universe of possible solutions. Unlike the original operation of STellA, which was
unrestricted, in this case, there are restrictions to apply to the nal state in
which the scene must be found. This means that there will be solutions whose
generation should be truncated by not reaching a state of the narrative
universe compatible with the expected nal state. The result of the simulation will
be a new collection of drafts that will be persisted in the Drafts Repository.
The director of the story, who is responsible for orchestrating the behaviour of
the whole, will analyze the various drafts through by means of the two ltering
microservices (Suspense and narrative tension). The objective is discarding the
stu that should not prosper in the next iteration. The di erent STellA
simulation engines, as well as the knowledge base, will be used at convenience. This
is also the case of the a nity engine of Charade, which will serve to calculate
the evolution of the relationship of the characters as the development of the
plot takes place. In this sense, it is important that a relationship be established
between all the concepts that the three systems handle. For example, in the case
of an action such as dining, which can be interpreted in di erent ways by each
of the systems, especially in the case of STellA, which tends to a strong physical
representation of the actions.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and future work</title>
      <p>The set out approach intends to establish a collaborative model that allows the
free exchange of knowledge between the di erent storytelling systems in order
to develop an iterative improvement process of literary creation. In addition to
this objective, it promotes the development of a knowledge representation model
for creating a common knowledge base that can be fed in the future with the
outcomes of new storytelling systems, without the need to adapt locally their
knowledge representation models.</p>
      <p>The architecture exposed so far has several features to be developed in the
next steps. The main pending task is related to the design and implementation of
the composition service. It is necessary to develop, not only a technical model for
aggregating services, but also a proper interface for interacting with the human
participants in the process.</p>
      <p>Currently, in every iteration, for every draft of the current population, all the
possible continuations are generated and added to the population of the next
iteration. On the generated population, a re ection process is applied (Re ector
class), and drafts that are considered already nished are separated from the
work population. This process continues until the work population is empty (all
drafts are terminated) or a limit of iterations is reached (to guarantee
completion). In the face of future work, the development of a service that helps to decide
is pending. The process for deciding what is the most appropriate level of detail
in each of the scenes is still pending. If we take as an example any novel, it can
be seen that in each scene a di erent level of detail is handled |which greatly
in uences the narrative rhythm, for example. Certain scenes are described at a
high level, without going too deeply into the details, while other scenes related to
very brief moments in time, are treated in detail, because they are very relevant
in the narration. This component will become increasingly important as more
and more systems are incorporated into the proposed ecosystem.</p>
      <p>
        The most immediate roadmap focuses on developing and testing the
described REST-based services. Once these services become available, the next step
will involve the design of a formal representation for the persisted knowledge.
On the basis of this knowledge, the composer could generate a human-readable
output. As stated in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], a suitable solution would be the use of a controlled
natural language (CNL), which is naturally easier to understand by humans than
formal languages, encouraging the co-creation cycle.
      </p>
      <p>Once that all the participants have implemented and made available their
services, the next step will be the development of the process for integrating
them in a generation pipeline making use of the knowledge shared across them.
It is still a matter of study how to apply certain local concepts, such as entropy,
to the whole architecture for enhancing the global outcomes.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This paper has been partially funded by the project IDiLyCo: Digital Inclusion,
Language and Communication, Grant. No. TIN2015-66655-R (MINECO/FEDER).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Concepcion</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendez</surname>
          </string-name>
          , G.:
          <article-title>A common model for representing stories in automatic storytelling</article-title>
          .
          <source>In: 6th International Workshop on Computational Creativity</source>
          , Concept Invention, and
          <string-name>
            <given-names>General</given-names>
            <surname>Intelligence</surname>
          </string-name>
          .
          <source>C3GI</source>
          <year>2017</year>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Concepcion</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendez</surname>
          </string-name>
          , G.:
          <article-title>A microservice-based architecture for story generation</article-title>
          .
          <source>In: Microservices</source>
          <year>2017</year>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Concepcion</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendez</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leon</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Using cnl for knowledge elicitation and exchange across story generation systems</article-title>
          .
          <source>In: International Workshop on Controlled Natural Language</source>
          . pp.
          <volume>81</volume>
          {
          <fpage>91</fpage>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dehn</surname>
          </string-name>
          , N.:
          <article-title>Story generation after tale-spin</article-title>
          .
          <source>In: IJCAI</source>
          . vol.
          <volume>81</volume>
          , pp.
          <volume>16</volume>
          {
          <issue>18</issue>
          (
          <year>1981</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Erl</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Service-oriented architecture: a eld guide to integrating XML and web services</article-title>
          .
          <source>Prentice Hall PTR</source>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Fielding</surname>
          </string-name>
          , R.T.:
          <article-title>Architectural styles and the design of network-based software architectures</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of California, Irvine (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gat</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Succi</surname>
          </string-name>
          , G.:
          <article-title>A survey of the api economy</article-title>
          .
          <source>Cut. Consort</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Story generator algorithms</article-title>
          .
          <source>In: The Living Handbook of Narratology</source>
          . Hamburg University Press (
          <year>2012</year>
          ), http://hup.sub.uni-hamburg.de/lhn/index.php
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Propp's morphology of the folk tale as a grammar for generation</article-title>
          . In: OASIcs-OpenAccess Series in Informatics. vol.
          <volume>32</volume>
          .
          <string-name>
            <surname>Schloss</surname>
          </string-name>
          Dagstuhl-LeibnizZentrum fuer Informatik (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Reviewing propp's story generation procedure in the light of computational creativity</article-title>
          .
          <source>In: AISB Symposium on Computational Creativity, AISB-2014, April 1-4 2014</source>
          . Goldsmiths, London, UK (
          <volume>04</volume>
          /
          <year>2014</year>
          2014)
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Harrell</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          :
          <article-title>Walking blues changes undersea: Imaginative narrative in interactive poetry generation with the griot system</article-title>
          .
          <source>In: AAAI 2006 Workshop in Computational Aesthetics: Arti cial Intelligence</source>
          Approaches to Happiness and Beauty. pp.
          <volume>61</volume>
          {
          <issue>69</issue>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Khare</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Taylor, R.N.:
          <article-title>Extending the representational state transfer (rest) architectural style for decentralized systems</article-title>
          .
          <source>In: Software Engineering</source>
          ,
          <year>2004</year>
          .
          <article-title>ICSE 2004</article-title>
          .
          <article-title>Proceedings</article-title>
          . 26th International Conference on. pp.
          <volume>428</volume>
          {
          <fpage>437</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Leon</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Creativity in story generation from the ground up: Nondeterministic simulation driven by narrative</article-title>
          .
          <source>In: 5th International Conference on Computational Creativity</source>
          , ICCC (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Meehan</surname>
            ,
            <given-names>J.R.</given-names>
          </string-name>
          :
          <article-title>Tale-spin, an interactive program that writes stories</article-title>
          .
          <source>In: In Proceedings of the Fifth International Joint Conference on Arti cial Intelligence</source>
          . pp.
          <volume>91</volume>
          {
          <issue>98</issue>
          (
          <year>1977</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Mendez</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leon</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>A model of character a nity for agent-based story generation</article-title>
          .
          <source>In: 9th International Conference on Knowledge, Information and Creativity Support Systems</source>
          , Limassol, Cyprus. vol.
          <volume>11</volume>
          , p.
          <year>2014</year>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Mendez</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leon</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>On the use of character a nities for story plot generation</article-title>
          .
          <source>In: Knowledge, Information and Creativity Support Systems</source>
          , pp.
          <volume>211</volume>
          {
          <fpage>225</fpage>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Montfort</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perez</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Harrell</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Campana</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Slant: A blackboard system to generate plot, guration, and narrative discourse aspects of stories</article-title>
          .
          <source>In: Proceedings of the fourth international conference on computational creativity</source>
          . pp.
          <volume>168</volume>
          {
          <issue>175</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Newman</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Building microservices: designing ne-grained systems. "</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          ,
          <source>Inc."</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Olson</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>The open api economy: What is it and how do i capitalize on it</article-title>
          ? In: International Service Technology Symposium (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Papazoglou</surname>
            ,
            <given-names>M.P.</given-names>
          </string-name>
          :
          <article-title>Service-oriented computing: Concepts, characteristics and directions</article-title>
          .
          <source>In: Web Information Systems Engineering</source>
          ,
          <year>2003</year>
          .
          <article-title>WISE 2003</article-title>
          .
          <source>Proceedings of the Fourth International Conference on</source>
          . pp.
          <volume>3</volume>
          {
          <fpage>12</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Perez</surname>
          </string-name>
          y Perez, R.:
          <article-title>MEXICA: A Computer Model of Creativity in Writing</article-title>
          .
          <source>Ph.D. thesis</source>
          , The University of Sussex (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Propp</surname>
          </string-name>
          , V.:
          <article-title>Morphology of the folk tale</article-title>
          .
          <source>1928</source>
          (
          <year>1968</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Riedl</surname>
            ,
            <given-names>M.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Young</surname>
            ,
            <given-names>R.M.</given-names>
          </string-name>
          :
          <article-title>Narrative planning: balancing plot and character</article-title>
          .
          <source>Journal of Arti cial Intelligence Research</source>
          <volume>39</volume>
          (
          <issue>1</issue>
          ),
          <volume>217</volume>
          {
          <fpage>268</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Si</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marsella</surname>
            ,
            <given-names>S.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pynadath</surname>
            ,
            <given-names>D.V.</given-names>
          </string-name>
          :
          <article-title>Thespian: Modeling socially normative behavior in a decision-theoretic framework</article-title>
          .
          <source>In: Intelligent Virtual Agents</source>
          . pp.
          <volume>369</volume>
          {
          <fpage>382</fpage>
          . Springer (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Turner</surname>
            ,
            <given-names>S.R.</given-names>
          </string-name>
          :
          <article-title>Minstrel: A Computer Model of Creativity and Storytelling</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of California at Los Angeles, Los Angeles, CA, USA (
          <year>1993</year>
          ), uMI Order no.
          <issue>GAX93-19933</issue>
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Veale</surname>
          </string-name>
          , T.:
          <article-title>A service-oriented architecture for computational creativity</article-title>
          .
          <source>Journal of Computing Science and Engineering</source>
          <volume>7</volume>
          (
          <issue>3</issue>
          ),
          <volume>159</volume>
          {
          <fpage>167</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Wama</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nakatsu</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Analysis and generation of japanese folktales based on vladimir propps methodology</article-title>
          .
          <source>In: New Frontiers for Entertainment Computing</source>
          , pp.
          <volume>129</volume>
          {
          <fpage>137</fpage>
          . Springer (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Willmott</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balas</surname>
          </string-name>
          , G.:
          <article-title>Winning in the api economy</article-title>
          . 3scale,
          <string-name>
            <surname>octobre</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Wol</surname>
          </string-name>
          , E.:
          <article-title>Microservices: Flexible Software Architecture</article-title>
          .
          <string-name>
            <surname>Addison-Wesley Professional</surname>
          </string-name>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>