Architecture of a Narrative Generation System based on a TRPG Model: The use of an Integrated Narrative Generation System

We present a design plan of a narrative generation system based on a scenario generation method for tabletop role-playing game (TRPG). This system is an application of an integrated narrative generation system. The objective is to support the creation of a narrative by using the interactions between a user and the system. A TRPG is analog, wherein one or more players (PLs) play the role of a character within the framework of a narrative prepared by the game master. Role playing by a PL promotes the development of scenes, and as a result, a big narrative is completed. In this study, we describe the overall constitution of the narrative generation system for implementation.


Introduction
We design a narrative generation system based on the game format that refers to a scenario generation method in a tabletop role playing game (TRPG) (1) .This system is an application of an integrated narrative generation system (INGS) (2)(3)(4) that we develop using a method of a game, the system do narrative generation by interaction between user and system.
An INGS integrates various mechanisms for narrative generation that we have proposed and developed (2)(3)(4) .The system consists of a concept generation mechanism to generate a story and to edit a structure of narration (discourse), and a surface representation mechanism to represent a narrative by letter, sound, and picture.First, the framework of a narrative is provided by a game master to amplify and expand the ideas of users and the automatic generation function of the INGS corresponds to the progression of game.
A method that has attracted attention is gamification, wherein elements of game playing are introduced to everyday tasks to increase motivation (5) .As related research, gamification was employed by Hasegawa et al. with "Escape the room" in a college library (6) ; Narumi et al. also conducted research on the visualization of research activities for a graduation thesis using the concept of gamification and the activation of research by it (7) .The proposal of authors also was regarded as a form of gamification, but a point based on the automatic narrative generation mechanism is a big difference.
Games for creating a narrative like a TRPG exists moreover.We show three examples and compare our proposal.Once Upon a Time (8) and Elegy For a Dead World (9) are games that form narratives.The former game forms a narrative like an impromptu play, and a knowledge of fairy tales with a motif and a sense of narrative creation are required.A player in the latter game can read publishing narratives of other players over the internet, and those narratives serve as a stimulus to narrative creation.
To compare the above games, the design system can suggest an action freely to some extent that is simple.In addition, for the case when a certain narrative becomes the material for other narratives is considered in the design system, and performs automatically in most parts, in contrast to create all narrative in handmade in above games.
The OPIATE system (10) is a story generation model in games; the system gives an action purpose to a character (non-Player Character: NPC) to whom a user does not operate directly, and the event of the story is generated.This process of a narrative uses a structured model of a story by employing a prop, and 31 "functions" and seven types of characters are used (11) .
Using the design system, the structural knowledge for narrative generation used is enormous, including "story contents grammar" based on the prop; the conceptual dictionary and the variation in a generated narrative are much bigger.
In the study of other TRPG, there are many examples where attention is paid to the aspect of the talks, including the tool of communication support, than the making of the narrative.For example, Kato and others intended for a university student with autistic spectrum disorder to take part in TRPG and investigate whether the TRPG is useful as a means of communication (12,13) .In addition, there was a study that examined whether the development of the ability for language using a TRPG was feasible (14) .
We provide an overview of the TRPG in section 2, and an overview of the INGS in section 3.In section 4, we describe the flow of processing in detail in the order of the overall configuration of the system.Finally, Section 5 summarizes the content of the manuscript.

About TRPG
TRPG is an analog game where a Player (PL) becomes a character and plays each role within the framework of a narrative that the game master (GM) prepared.This role act by the character comes to a conclusion as the scene develops, and as a result, one big narrative is completed.
The terms in our design system are listed in Table 1.Each term overlaps with the term that is usually used in real TRPGs semantically, except for GM and PL, which express other words in an original term for this study.
In other one, Fig. 1 shows the relation between the same concepts of "Scenario".In other words, "Scenario" includes "World setting" and "Scene sequence".A "scenario" forms through the progression of a game by interaction between the GM and PL.
We mention the TRPG in detail.First, a "scenario" is created that integrates "Where it happened (the place or time of occurrence)" and "What happened?(incident or event)".A setting "Scenario" by the GM is changed and expanded as a game progresses.
Two big components are "World setting" and "Scene sequence"."World setting" includes the setting of a game such as place and time and carries out the role of being a limitation or rule in a "Scenario".
For example, a "realistic world setting" could be "A human can't fly in the sky."In contrast, "A human can fly in the sky" could be "fantasy world setting".In this way, the constrict here is not necessarily the meaning called a thing narrowing field of activities of PL and should say that it is a kind of rule to give it to the action possibility."Scene sequence" implies a sequence consisting of several scenes where events happen.
"Scene sequence" is a set that ranges same "Scene" organically, that is, understand a form semantically.There is a case where divergence occurs during a game, which finally becomes a liner sequence by the PL's selections continuity.Each scene influences the behavior of the characters in time and space within a bounded range; it is associated with characters, items, etc., in the world setting.
"World setting" imposes rules or restrictions in  "Scenario", and it includes components that are operated by limitation and rules.The limitation is a type of rule prescribing a range of action possibilities of PLs for feasibility, and the component is a character, item, or location that is possible under a certain limitation.The character has a purpose, and it has the ability to achieve the purpose using its own function and the function of an item at a particular location.The stage setting is decided by items and locations in the component.In other words, among the components placed under a certain limitation, elements such as items and locations that were set concretely in detail are called stage settings.A process for determining the character's purpose is decided concretely in this stage setting.
For example, when a certain character demand the result is referred to as "light a fire", it was either carried out at a writer, whether carried out in the magic of the tool, it is determined specifically by the stage setting.However, in the broad sense, the stage setting includes not only items and locations, but also the clothes and appearance of the character itself.
Each piece of information is necessary for it to be described to an attribute frame mentioned in section 4.3 systematically in the INGS.
An early "Scene sequence" is a framework of the narrative consisting of a few scenes.In particular, the INGS as the GM makes an early "Scene sequence" based on the world setting prepared.In addition, the GM expands this scene sequence based on the suggestion of the PL.The world setting has the role of rules or restrictions in the narrative, and the world setting consists of components defined by its rules and the stage setting of the narrative.
Next, a model of the game progression is shown in Fig. 2. The game progression in a TRPG, same as the process of the initial "Scenario" that the GM has prepared, is going to be shown.The early "Scenario" that the GM prepared for with the game progress in the TRPG is equal to a process shown.It means work to supplement by "Scene" suggestion by PL between the "Scenes" in the early "Scene sequence".We called "Fleshed out" above mentioned work in here, also it includes changes and additions in the "World setting".An interesting point in game progression is that the overall "Scenario", including the initial "Scene sequence" is not exposed to the PL at the start of the game.Therefore the PL suggests a new "Scene" leading to the "Scene" shown by the GM, at points of game progression (if there is more than one PL, PLs can consult with each other).The GM determines how the "Scene" which the PL suggests influences the entire "Scene sequence" and lets a "Scene sequence" reflect the suggestion result.
Furthermore, in an actual TRPG, there are many examples to edit the "Scene sequence" + the "World setting" that is finally completed, namely the "Scenario" here, and to summarize in a book.This design is thought to be possible.In other words, a different narrative is generated during game play on a computer fluidly every time when we use the INGS, but we fix either in the form called a book, and repetition comes to be able to read the same thing.
Ogata arranges the concept of such a narrative generation based on the concept of "fluency and fixation" and tries to place it as an item of "Expanded Literary Theory" for automatic narrative generation (15) .Documents about TRPGs include "Role-Playing Mastery" (16) .

Overview of the Integrated Narrative Generation System (INGS)
The INGS integrates various mechanisms for narrative generation that we have been suggesting and developing (2)(3)(4) .The entire overview is shown in Fig. 4. The system consists of a concept generation mechanism to generate a story and to edit a structure of narration (discourse), and a surface representation mechanism to represent a narrative by letter, sound, and picture.The INGS needs the conceptual dictionary knowledge (noun concept, verb concept, etc.) for constructing an event concept that refers to an occurrence in the narrative, as well as story content knowledge (causal relationship, script, etc,) for constituting the structure of the narrative.Each generation mechanism used needs information for generation from a conceptual dictionary (17) , language notation dictionary (18) , story content knowledge base (store knowledge shown in each relationship between events such as causal relationship, script) (19) , etc.Moreover, each event in the conceptual structure is connected in front and behind by a state-event translation knowledge base (4) .
In particular, in the conceptual dictionary described above, knowledge is related to world setting in Table 1.The conceptual dictionary includes a noun conceptual dictionary, verb conceptual dictionary, and modifier conceptual dictionary (each conceptual dictionary of adjective, adjective verb, and adverb), and stores knowledge in at a conceptual level as components for describing the above story and discourse systematically.A characteristic function is to describe the "restriction" of using elements ("~" in the following example) in events such as "~ do ~".To adjust this "restriction", for example, the system should be able to make a realistic event such as "Taro eats a watermelon" to an unrealistic event such as "The building eats an ice-cream".The conceptual dictionary and its mechanism in the INGS are used for controlling the world setting in a plotted system.

Design for the System
First, we mention the entire narrative generation system based on a TRPG model in section.4.1, and describe a process of the system and design of knowledge acquisition mechanism.

Entire Structure of the System
The INGS assumes a role of the GM, and more than one human user becomes a PL, in the design system (however, the possibility that a human becomes a GM and the INGS becomes PLs conversely can be considered.We will consider a comprehensive design of the system.).The architecture of the system including the INGS is shown in Fig. 5. Specific work of the INGS as the role of a GM involves creating an early scene sequence based on the input world setting, and expanding its sequence based on a suggested scene by PLs.PLs refer a proposed scene that is part of scene sequence by GM and suggest content information of a scene that will append to the scene sequence of the GM.

Flow of the Process
The process is divided into three steps-"preparation of necessary information", "generation", "output for a conclusive result".The "preparation of necessary information" implies preparations for information of an early scenario by the GM.In the "generation" part, according to exchanges with the GM and PL, the scenario including the scene sequence fleshing out progresses.Therefore, this part is the center of the processing in this system.The "output of a conclusive result" refers to a stage to output the information of the scenario in the final stage of this, fleshing out it in one way or another.For example, it is a novel-like sentence is thought to be made and output.In this case, the game process is equivalent to a novel generation process.

Preparation of Necessary Information
This section is divided two processes-(a) Preparing a Scenario by the GM, (b) Preparing Characters for the PLs.

(a) Preparing a Scenario by the GM
The user inputs the information that for a GM that is necessary for generation of the initial state of the world setting and scene sequence.By the world setting, the user inputs the editing contents of the conceptual dictionary, which is given in section 3.For example, a user relaxes the limitation of the doer of an act "buy" and expresses that a cat can buy a thing like a human by adding "a cat".By the early scene sequence, a user inputs a phenomenon to play a key role in the scenario, e.g., "a man obtains treasure".An early scene sequence shall consist of an element to show in Table 2.The scene is a partial structure of a story expressed in conceptual form.Fig. 6 is conceptual structure of the story in the INGS.It is comprised of states indicating the static information of a character, an item, the location at every certain instance, events indicating the dynamic change that is in a state, and the relationships to connect events structurally.The structure consisting of events and relations is described in Fig. 7.As for the state, the information on individual characters, items, and locations is described in Fig. 8 for every instant in time.It is called an attribute frame.It records a property and the characteristic that individual elements have; it is connected to an event by each ID again.The generation method of the structure is illustrated in section 4.4.A "scene (introduction)" suggests it firstly what PL which GM overlooks in a scene shown by PL should form and is the scene which reminds you of a "scene (ending)".A "scene (climax)" is the minimum necessary scene before the progress of the game reaches the "scene (ending)".A "progress condition" is the condition to shift to a "scene (climax)" and a "scene (ending)".

(b) Preparing Characters for the PL
The attribute of the character whom the PL operates is decided based on the world setting.For example, it is family and sex, age, and elements such as occupation.In addition, a possible action is decided in the character.The action that is possible here is the action permitted under the limitation such as family or occupation in the world setting prepared, which will be described as an element in the verb conceptual dictionary in the INGS.The information to input is described using the element of the conceptual dictionary.This refers to a conceptual dictionary edited by the world setting.The input information is inserted in an attribute frame managing the individual character who speaks it at the top.
The purpose of the character is mentioned in section 2, particularly in the case of a character operated by a PL, PL defines the purpose of the character in the progress of a game, in the case of other characters, it is defined by the GM at the time of the start of the game.

Generation
A narrative is generated by mutually communication between the system and user.In a word, the progression of a game equals the narrative generation.In addition, "game progression = narrative generation".

(a) Game Progression = Narrative Generation
This processing is ②～⑦ of Fig. 5. Based on a scene shown by the GM, the PL suggests a scene.Fig. 9 is an image of the screens in the processing.The left upper part of the figure is the picture image space and the system searches the image data to agree with the word included in the current scene from a knowledge base and displays it.It is the input department of the user, and the right upper part of the figure inputs suggestion content of the PL for the current scene.The under part of the figure shows a sentence in shown a scene by GM to PL.This sentence is generated using the sentence generation mechanism of the INGS.The scene to input here is structure of a story comprising one or more events.However, the event included in there compares the limitation of the event with the attribute of the character whom PL operates, and all elements must be delivered to limitation.
The expansion handling of the scene sequence uses a story generation function in the INGS.The story generation in the INGS is carried out by generation and expansion of the conceptual structure of the story.We show the process in Fig. 10.The story technique assumes structure (A) of the story of the origin of expansion input by a formal technique in the story generation, and from the structural knowledge included in the story contents knowledge base, generates part structure (B) of the story.It is story (A)' where the two results are generated.The event included in the structure of the story is generated for the case structure of the verb concept that is referred to as the verb conceptual dictionary by inserting a concrete value in the objects of a doer and the act.The extended scene sequence is shown as a series of scenes in the PL by the above-mentioned process.When a progress condition is reach the present attribute frame of a character, a thing, a place after this processing, system stop that GM receives the suggestion of the scene from the PL temporarily and show a "scene (climax)" or a "scene (ending)".State 5 When a system generates the partial structure of the story from the suggestion of the scene by a PL, or early scene sequence reaction generation, the above-mentioned knowledge that was acquired is used.This acquirement of knowledge contributes to a role avoiding a variation decreasing while it is formed many times.Furthermore, the information of a character produced by the input of the user is saved individually.This knowledge is used as a character in the world setting afterwards.

Output for a Conclusive Result
This is the work processing after the game ends in an actual TRPG.It is output as one text by gathering up a sentence shown in a process of the generation that was mentioned above.The image of the text is shown in Fig. 11.This output result becomes the structured text by compiling the sentence that a system was shown every scene.The user gives the name more in the scene and completes a story by editing the output end results.The system outputs a sentence shown in the process of the generation that we mentioned in section 4.2 as a summary.We show the image of the text in Fig. 11.The user gives the specific name to scenes, and the user can edit the output end results more.In addition, the form called the book can edit one finished narrative.

Conclusion
In this paper, we suggested the design of a narrative generation system based on the game format that refers to a scenario generation method in a TRPG.This is aimed for "the game progression = narrative generation" by the interaction with the user and acquirement of knowledge in an INGS that is used by a design system.The acquired knowledge is used for the following narrative generation.
The INGS is a system in progress now, but because, as a whole, it has been already come true as a running system at the same time, the main part in conjunction with the narrative generation of the design system links the development of the INGS.It is not necessary to build all systems from zero.The main novelty in the design system is having set a user definitely by connecting story generation processing with the mutual exchanges-like methods of the game, and realizing acquisition handling of knowledge stored away by the INGS through game progression.In addition, the INGS aims at the general-purpose mechanism of not limiting a theme and the genre of a generated narrative, and it is considerably difficult to perform the experiment and inspection; however, experiment or inspection is easier for the construction of the INGS application system, which limits them to some extent or the INGS incorporation system, and in a sense, as for the applied system, means of the middle experiment and inspection in the construction process of INGS functions as a demonstration system effectively more.This design system has such a meaning with one side.By a system called KOSERUBE (20) , which limits the story world to the rationality of Iwate, the system became able to do so it until now.

Fig. 5 .
Fig. 5. Narrative generation system by the game format based on the TRPG model