Dynamic quest plot generation using Petri net...

6
Copyright © 2012 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Permissions Dept, ACM Inc., fax +1 (212) 869-0481 or e-mail [email protected]. WASA 2012, Singapore, November 26 – 27, 2012. © 2012 ACM 978-1-4503-1835-8/12/0011 $15.00 Dynamic Quest Plot Generation using Petri Net Planning Young-Seol Lee * Sung-Bae Cho Yonsei University Abstract In most cases, the story of popular RPG games is designed by pro- fessional designers as a main content. However, manual design of game content has limitation in the quantitative aspect. Manual story generation requires a large amount of time and effort. Be- cause gamers want more diverse and rich content, so it is not easy to satisfy the needs with manual design. PCG (Procedural Content Generation) is to automatically generate the content of the game. In this paper, we propose a quest generation engine using Petri net planning. As a combination of Petri-net modules a quest, a quest plot is created. The proposed method is applied to a commercial game platform to show the feasibility. CR Categories: D.2.2 [Software]: Design Tools and Techniques—Petri nets K.8.0 [Personal Computing]: General— Games; Keywords: procedural content generation, Petri net, quest gener- ation, computer game 1 Introduction Game players are rapidly consuming game contents including graphics and stories. The speed of game content consumption is growing faster in RPGs (Role Playing Games), or MMORPGs (Massively Multi player Online Role-Playing Games). Players want diverse and interesting content, which requires a lot of time and effort. Especially, quest is a mission for players [Doran and Parberry 2011], and is designed by professional designers in most popular RPGs. Manually designed content has limitation on the quantitative aspect. It is necessary to develop a method to create game content in response to rapid speed of the game content con- sumption. Procedural Content Generation (PCG) is to generate the content of the game automatically. It generates content by pre-developed algorithms. Therefore, it theoretically provides infinite content in games regardless of consumption of content. In addition, it main- tains the diversity of game content to keep player’s interest. RPGs usually use a hand-built quest which requires a player to complete a set of tasks for a reward. A quest is a storytelling mechanism by encouraging players to interact with non-player characters and allowing them to observe dramatic events as the game progresses. Players control an avatar and solve various quests throughout the game [Tychsen et al. 2006]. Mostly, a quest is given to a player by Non-Player Characters (NPCs) that cannot be controlled by players and interact with them through dialogues [Bielikov´ a et al. 2008]. e-mail:[email protected] e-mail:[email protected] In most cases, RPG game companies tried to make a player play games through the expansion pack or additional modes. Many fa- mous games such as Elder Scroll or Might and Magic, Ultima are constantly expanded by releasing new series. On the while, online RPG game such as World of Warcraft (WOW) constantly appeal new content to players by update for the content renewal. PCG helps these companies reduce effort and cost to develop new con- tent. It also has potential to generate a dynamically changing quest according to player’s choice and dynamic environment. In this paper, we propose a novel algorithm to generate a quest using Petri net planning. A quest plot consists of some major events ex- pressed with Petri net modules. The events for a quest are selected by goal state and initial state. This study extends the types of con- ditions from our previous work [Lee and Cho 2011a] and discuss analysis of the game plot using Petri net based method. Some quest plots for a commercial game, Never Winter Night, are generated by the proposed method to show its feasibility. 2 Related Works 2.1 Game Content Generation There are some kinds of approaches for automatic game content generation. The approaches can be classified according to automat- ically generated content. First case is to create game space which is a background of the game and is an important factor in which game characters act to create a game. Many researchers have proposed automatic gener- ation of game spaces. It is not easy to make complex and realistic game spaces in the recent games by hand. These methods are use- ful to increase the realism of the game, and to reduce time for game development and design. Secondly, there is an approach to produce NPC (Non Playable Character) ’s diverse actions and dialogue. In several types of games, various characters appear as assistants of players or ene- mies. Actions that have the same result may have variations. Re- peating same activities make player be bored. It is necessary to di- versify NPCs’ behaviors to make game interesting. NPC’s dialogue is an important content in the games that focus on conversation such RPG, mystery, or adventure games. In these games, automatically generated conversation with NPC increases a player’s interest by various talks. However it is difficult to keep coherence of the story of the game. Third approach is to generate a story of the game. The story of the game is also so important content and it takes plenty of time to write the story in the case of RPG or MMORPGs. However, it is very difficult to generate game story using a simple algorithm. Because random combination of the story is not very meaningful, it is necessary to make a plot to complete goal of a quest. 2.2 Story Generation There are three kinds of story generation approaches which are agent-based, script-based, and hybrid approaches [Theune et al. 2003]. First, agent-based approaches can generate flexible story, but they require necessary information for current agent’s situation and environment such as agent’s purpose, emotion, and activities. 47

Transcript of Dynamic quest plot generation using Petri net...

Page 1: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

Copyright © 2012 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Permissions Dept, ACM Inc., fax +1 (212) 869-0481 or e-mail [email protected]. WASA 2012, Singapore, November 26 – 27, 2012. © 2012 ACM 978-1-4503-1835-8/12/0011 $15.00

Dynamic Quest Plot Generation using Petri Net Planning

Young-Seol Lee∗ Sung-Bae Cho†

Yonsei University

Abstract

In most cases, the story of popular RPG games is designed by pro-fessional designers as a main content. However, manual designof game content has limitation in the quantitative aspect. Manualstory generation requires a large amount of time and effort. Be-cause gamers want more diverse and rich content, so it is not easyto satisfy the needs with manual design. PCG (Procedural ContentGeneration) is to automatically generate the content of the game.In this paper, we propose a quest generation engine using Petri netplanning. As a combination of Petri-net modules a quest, a questplot is created. The proposed method is applied to a commercialgame platform to show the feasibility.

CR Categories: D.2.2 [Software]: Design Tools andTechniques—Petri nets K.8.0 [Personal Computing]: General—Games;

Keywords: procedural content generation, Petri net, quest gener-ation, computer game

1 Introduction

Game players are rapidly consuming game contents includinggraphics and stories. The speed of game content consumptionis growing faster in RPGs (Role Playing Games), or MMORPGs(Massively Multi player Online Role-Playing Games). Playerswant diverse and interesting content, which requires a lot of timeand effort. Especially, quest is a mission for players [Doran andParberry 2011], and is designed by professional designers in mostpopular RPGs. Manually designed content has limitation on thequantitative aspect. It is necessary to develop a method to creategame content in response to rapid speed of the game content con-sumption.

Procedural Content Generation (PCG) is to generate the contentof the game automatically. It generates content by pre-developedalgorithms. Therefore, it theoretically provides infinite content ingames regardless of consumption of content. In addition, it main-tains the diversity of game content to keep player’s interest. RPGsusually use a hand-built quest which requires a player to completea set of tasks for a reward. A quest is a storytelling mechanismby encouraging players to interact with non-player characters andallowing them to observe dramatic events as the game progresses.Players control an avatar and solve various quests throughout thegame [Tychsen et al. 2006]. Mostly, a quest is given to a player byNon-Player Characters (NPCs) that cannot be controlled by playersand interact with them through dialogues [Bielikova et al. 2008].

∗e-mail:[email protected]†e-mail:[email protected]

In most cases, RPG game companies tried to make a player playgames through the expansion pack or additional modes. Many fa-mous games such as Elder Scroll or Might and Magic, Ultima areconstantly expanded by releasing new series. On the while, onlineRPG game such as World of Warcraft (WOW) constantly appealnew content to players by update for the content renewal. PCGhelps these companies reduce effort and cost to develop new con-tent. It also has potential to generate a dynamically changing questaccording to player’s choice and dynamic environment.

In this paper, we propose a novel algorithm to generate a quest usingPetri net planning. A quest plot consists of some major events ex-pressed with Petri net modules. The events for a quest are selectedby goal state and initial state. This study extends the types of con-ditions from our previous work [Lee and Cho 2011a] and discussanalysis of the game plot using Petri net based method. Some questplots for a commercial game, Never Winter Night, are generated bythe proposed method to show its feasibility.

2 Related Works

2.1 Game Content Generation

There are some kinds of approaches for automatic game contentgeneration. The approaches can be classified according to automat-ically generated content.

First case is to create game space which is a background of thegame and is an important factor in which game characters act tocreate a game. Many researchers have proposed automatic gener-ation of game spaces. It is not easy to make complex and realisticgame spaces in the recent games by hand. These methods are use-ful to increase the realism of the game, and to reduce time for gamedevelopment and design.

Secondly, there is an approach to produce NPC (Non PlayableCharacter) ’s diverse actions and dialogue. In several types ofgames, various characters appear as assistants of players or ene-mies. Actions that have the same result may have variations. Re-peating same activities make player be bored. It is necessary to di-versify NPCs’ behaviors to make game interesting. NPC’s dialogueis an important content in the games that focus on conversation suchRPG, mystery, or adventure games. In these games, automaticallygenerated conversation with NPC increases a player’s interest byvarious talks. However it is difficult to keep coherence of the storyof the game.

Third approach is to generate a story of the game. The story ofthe game is also so important content and it takes plenty of timeto write the story in the case of RPG or MMORPGs. However, itis very difficult to generate game story using a simple algorithm.Because random combination of the story is not very meaningful, itis necessary to make a plot to complete goal of a quest.

2.2 Story Generation

There are three kinds of story generation approaches which areagent-based, script-based, and hybrid approaches [Theune et al.2003]. First, agent-based approaches can generate flexible story,but they require necessary information for current agent’s situationand environment such as agent’s purpose, emotion, and activities.

47

Page 2: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

There are practical difficulties to collect the information at all thetime. Talespin [Meehan 1976] and Aylett’s virtual system [Aylett1999] belong in the class. Script-based approaches such as storygrammar [Propp ], story tree [Correira 1980], and narrative model[Lang 1999] cannot give enough flexibility and diversity to the storyexcept some fixed situations.

Hybrid approaches include the merits of both above methods. Storygraph and narrative mediation belong in the hybrid approaches.Story graph [Riedl and Young 2006] is a directed graph of storyfragments connected by arcs and it has a branching story structureby character’s choices. Character’s action in the branch decidesnext story fragment. Every path in the graph represents a story. Inthe story graph, user has to select an action in fixed story branches.If user does not choose one from action candidates in a story branch,the story generation stops and the story cannot arrives to the end.

Narrative mediation creates a linear story-line that represents themost appropriate story [Riedl and Young 2006]. It has the sameexpressive power with acyclic story graph and allows user’s unde-fined actions that in story branch. The author in narrative mediationdesigns an ideal storyline. It is possible a user to perform user’sexceptional action that distorts the original storyline. When an ex-ception occurs, the system eliminates the exception or generates anew storyline that includes the exception. In this method, authorshould design an original storyline which varies story branches byuser’s action or exception in.

Agent-based approaches are so difficult to generate a story withcoherence and causality but general script based approaches havedifficulties to generate diverse content enough for characteristics ofgame content. Also, these methods are not able to reflect player’sexperience or type. For example, random quest generation methodallows player to enjoy various kinds of quests, but the generatedquests do not reflect the player’s orientation without interactionwith players. Our proposed system in this paper generates a questby suitable events with Petri net representation.

3 Quest Generation Using Petri Net

3.1 Pre-defined quest types

According to Doran’s research [Doran and Parberry 2011], mostRPG games are based on the quest. The basic structure of a questwas determined by the motivation of the quest.

A casual player basically tends to prefer easy quests such as meet-ing new characters, visiting strange places, and discovering fantas-tic creatures. It also contains visiting a dangerous place and gainingrare or expensive items.

On the while, a hard-core player tends to pursue difficult questsincluding fighting strong enemies, and boring repetition. It alsoreturns richness and powerful equipment as well as emotional sat-isfaction.

3.2 Quest plot generation using planning

Planning is a task to make a sequence of actions that will achieve agoal. The process to generate a quest plot is to extract a sequenceof events for a player’s state transition from an initial state to a goalstate. First step is random selection of initial state and a goal state ofa quest. Second step is to extract some events that are appropriateto satisfy the selected quest goal. Final step is to make an eventsequence from the selected events.

A player’s state after an event occurs has to be closer to a quest goalstate. It means that the result of events satisfies one of preconditions

Table 1: Game content generation

Content Author Methods

Game space [Yannakakis andTogelius 2011]

Automatic generationof background forvarious games

[Johnson et al.2010]

Automatic map genera-tion using cellular au-tomata

[Cooper et al.2006]

Fractal based creationfor game environmentsuch as water, tree,road, building, etc.

[Nitsche et al.2006]

Game environment cre-ation

[Togelius et al.2010]

Automatic creation oftrack or environmentfor game

NPC’s ac-tion/dialogue

[Kerr and Szafron2009]

NPC’s dialogue expan-sion for natural conver-sation

[Thawonmas et al.2007]

NPC’s action or gesturechange by NPC’s emo-tion

[Gomez-Gauchıaand Peinado 2006]

NPC’s action or dia-logue change depend-ing on temperament

Quest [Ashmore andNitsche 2007]

Quest generation bylock-key or obstacle-items structure

[Onuczko et al.2006]

Plot generation by com-bination of sub-quests

[Arinbjarnar 2008]

Story generation bymurderer, weapon,and evidences usingBayesian network

for goal state. Unless current state is a goal state, new events mustbe included in the quest plot. This event insertion is repeated untila quest goal is satisfied. Figure 1 shows an example of the questplot generation. A quest is a set of various events.

Quest = {Event1, Event2, ..., Eventn}

3.3 Concept of an event

A conceptual model for the event is introduced in this section. Aquest plot is an event sequence to achieve a quest goal. An eventhas some pre-conditions and a post-condition. An event includesa main action which is a key action to generate post-condition ofthe event. This constraint is a practical method to design a uniqueevent for a cohesive plot with common sense and prior knowledge.A quest is generated by combining the events.

Doran’s research is referred to classify necessary events related tothe quest [Doran and Parberry 2011]. A quest consists of morethan one event which includes inevitable post-conditions to achievea goal of the quest. A post-condition is a basic component of an

48

Page 3: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

event and represents the result of the event. A main action is anaction to generate a post-condition.

For example, a quest like ’delivering an item for study’ usually hasto contain ’obtaining N item’ and ’giving item to NPC’ as mainevents. The post-conditions of the events satisfy the goal of quest.Also, if a player wants to do ’giving item to NPC’ event, it isexpected that the player goes to the location where the NPC is.’Obtaining N item’ and ’giving item to NPC’ may be independentevents. It is natural that the result of an event ’obtaining N item’delivers to next event ’giving item to NPC.’

In this paper, we design an event that contains a main action andsub-actions. The action sequence in an event can be changed bythe result of previous events which can be a precondition or a factorof current events in the quest. If pre-condition for main actions incurrent event remains incomplete, a player has to clear other eventsto satisfy the condition. The conceptual structure of an event isillustrated in Figure 2.

Figure 1: Quest plot generation

Figure 2: Conceptual event structure

3.4 Petri-net based representation for an event

Many RPG games contain numerous items and NPCs and events.Petri net is a useful tool to model a system with many asynchronouselements [Peterson 1981]. Brom et al. use Petri net to design agame plot [Brom and Abonyi 2006], and some researchers appliedit to various applications such as robot control, transportation sys-tem, project management and so on [Lima et al. 1998], [Febbraroand Saconi 1998]. In our previous work, it is used to generate astory for cartoons in the mobile environment [Lee and Cho 2011b].In this paper, Petri-net is used to represent an event.

There are some essential features of Petri-net to denote an event ina quest generation. They are locality, concurrency, graphical andalgebraic representation of Petri net. Petri net can be used in var-ious fields, e.g. from computer integrated manufacturing to officeautomation.

Firstly, Petri net helps us identify passive elements (such as con-ditions) and active elements (such as actions). This duality of el-ements is strongly supported by Petri net. Secondly, Petri-net iseasy to modularize independent events because of its locality. Itcan express some specific passive elements as conditions for someactions. A few actions can be executed if and only if relevant con-ditions are satisfied. The restriction reduces labor to design a largequest.

Also, Petri-net based events can also be synchronized by maintain-ing and delivering tokens to other events. All state changes in Petri-net can be simply represented by transferring tokens. It means thatdelivery of result of previous events can be processed by transfer-ring tokens. It also makes a more interesting quest which includesvarious events.

Figure 3: Petri net based event representation

There are following four components in standard Petri-net to repre-sent events and conditions for events. They are a set of places P , aset of transitions T , input function I and output function O. Inputfunction I(tj) means condition-action relationships between tran-sition tj and a set of input places in an event. Output function O(tj)means action-result relationships between transition tj and the setof output places. Place P is a condition to do an action or storageto contain effect of an action. Transition T represents a player’s ac-tion. Petri-net is fundamentally a network of components. Finally,token is expressed as points in a place P which represents current

49

Page 4: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

status of the system. Whenever a player does an action, tokensmove to other place along the arc.

Figure 3 shows a Petri-net based representation for an event.Whenever there is a transition (action) which all connected inputplaces (conditions) have tokens, it can be performed. When a tran-sition is performed, the tokens in the input places are moved intothe output places.

Table 2: Standard Petri net elements

PN element Name Description

PlaceRepresenting preconditionfor an action or storage ofthe result of an action

ArcCausal relationship be-tween an action and itspreconditions

Transition Representing a player’s ac-tion

TokenRepresenting the process ofactions in an event

Table 2 summarizes Petri-net elements to represent an event. Placeis a condition for a player’s action and stores the effect of the action.Transition is an action which can be performed only when condi-tions are satisfied. Arc denotes a link among condition and actionto decide whether a player can do an action in specific conditions ornot. Token moves from place to place whenever a player performsactions.

Petri-net script module is an effective tool to design parallel actionsand conditions formally. It also describes causal dependencies be-tween player’s actions and conditions.

3.5 Expansion of Petri-net elements for an RPG event

Petri-net has an enough ability to express various conditions andstates in an event. Original place in Petri-net covers various condi-tions but Petri net expansion helps designers easily model a quest.The conditions in an event are five types of variables which areItem, Conversation with NPC, Location, Killing NPC, and Generalcondition.

First, Item denotes a condition for player’s action. It is a variableto store item name and number of tokens. The number of tokensin Item represents the necessary number of items to do specific ac-tions. For example, if ’collecting N items’ action can be expressedwith N tokens in Item.

Conversation with NPC stores the result of meeting NPC action andit is used as a pre-condition to represent another event. Tokens areused to identify the number of conversation with the NPC.

Location is used as a condition to describe a necessary location toachieve a player’s goal. For example, ’visiting a dangerous loca-tion’ action requires a related location variable. The token repre-sents current player’s location.

Killing NPC stores the result of killing a specific enemy who isimportant for an event. It sometimes affects next events in the quest.If NPC is unique one, the number of token is 0 or 1.

Finally, General condition represents other conditions except forabove conditions. It can provide temporary storage for results fromprevious actions.

Item, Conversation with NPC, Location, and Killing NPC are storedin a status queue to change other events. They are not disappeareduntil the conditions are used to perform a player’s actions.

Action which means a player’s action is same as a transition instandard Item, Conversation with NPC, Location, Killing NPC, andGeneral condition are preconditions to enable a player’s action. Ifmore than two actions are enabled at the same time, the player canselect one. For example, when ’attacking NPC’ and ’talking NPC’are possible to perform at the same time, the player can select one.Arc connects actions to pre-conditions. Table 3 summarized theexpansion.

Table 3: Expanded Petri net elements

PN element Name Description

ItemRepresenting preconditionfor getting items or post-condition of getting items

Conver-sation withNPC

Representing preconditionfor an action related to con-versation or post-conditionof conversation

Location

Representing preconditionfor an action related to vis-iting a location or post-condition of visiting a loca-tion

KillingNPC

Representing pre-conditionfor an action related tokilling NPC or post-condition of killing NPC

Generalcondition

Representing any other pre-condition for an action andstorage of result of the ac-tion

Action Representing an action

ArcCausal relationship be-tween an action and itspreconditions

A player can be faced dynamic events in heterogeneous environ-ment. However, these characteristics of a game introduce difficul-ties pertaining to modeling and design a game story. To overcomethe problems, we present analysis of a game story using petri-netbased model. Petri net based system can provide a good solutionwhen the model of the environment would be so complicated that amathematical model would be nonlinear or impossible to develop.The model enables us to concurrently design many components andits related complicated behavior in a game environment. It is suit-able for analyzing a player’s and environmental factors in a givengame scenario.

Most of all, the reachability problem is important in a plot design.If some events in an automatically generated plot cannot occur inany conditions, it is very wasteful because each event needs manyresoucres such as objects, NPCs, and locations in a game. Petri netcan analyze the situations by using matrix equations. An alternativeto the (P, T, I, O) definition of Petri nets is to define two matricesD− and D+ to represent the input and output functions. The matrixdefinitional form of a Petri net (P, T,D−, D+) is equivalent to thestandard form we have used but allows the definitions to be recast invector and matrix terms. In this context, D−[j, i] = #(Pi, I(tj))and D+[j, i] = #(Pi, O(tj)). Suppose that e[j] is the unit m-

50

Page 5: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

vector which is zero everywhere except in the jth component andtj is the transition which is represented by the unit m-vector e[j].Each matrix is m rows (one for each transition) by n columns (onefor each place). This is, tj is enabled if µ ≥ e[j]×D− In order toclassify the possibility of the specific event tj , we have to identifythe reachability of the condition for tj from current situation. If wedefine D = D+−D−, the reachability problem is µ′ = µ+x×Dif µ′ is reachable from µ, then the equation µ′ = µ + x × Dhasa solution in nonnegative integers. Unless the equation has anysolutions, then µ′ is not reachable from µ.

4 Experimental Results

In order to show an example of the generated quest in the real gameplatform, we selected ’Never Winter Nights’ which is a RPG gameand includes plot wizard to support a player’s own quest creation.

Our proposed method provides only a plot for a quest but practicalgame platform requires more detailed contents such as arrangementof NPCs and items, all dialogues for NPC, and so on. At plot wiz-ard in Never Winter Night (NWN), all NPCs and items are classi-fied into three types of creatures such as player, plot giver, and castmembers. Player is a playable character as player’s avatar in thegame. Plot giver is a NPC to give a quest a player. Finally, all otheritems and NPCs are cast members.

Figure 4: NWN plot wizard

In this paper, we do not focus on the details but only plot for a quest.In plot wizard of NWN, a plot node is defined as any interaction be-tween the player and a cast member. The nodes are listed from topdown in sequential order. The first one happens and then the nextone follows. Also, once the player has completed a previous node,the plot cannot go back to a previous node. An event in our questgeneration system corresponds to a plot node of NWN. If prede-fined plot nodes are prepared in NWN, it is possible to generate aquest as combination of the plot nodes by the proposed method.

Figure 5: Background for a quest plot

Here, a quest plot about assassination is generated to show the fea-sibility of proposed method in an environment like Figure 5. Adragon in Figure 6 gives a quest for assassination of NPC B. Inorder to satisfy the quest goal, there are many NPCs as NPC B inthe field as shown in Figure 5. If player kills a NPC B, the questgoal is complete. Figure 7 shows the quest start event and Figure8 represents a ’Killing NPC B’ event. After the killing event, theplayer gets NPC’s head in his inventory.

5 Summary and Future Work

To sum up, a method to generate a quest plot consisting of Petri netbased event representation. A quest is defined as an event-sequencewhich is expressed by Petri-net based modules. An experimentshows the potential of the proposed method to generate a quest ina commercial game platform. The generated plot can be used for aquest. The proposed method provides a more formal script-basedmethod.

Our future work is to develop a game for the proposed method.NWN is not able to control all modules freely because it is a com-mercial game. In this paper, we copied a quest plot by proposedmethod to plot wizard of NWN manually. Additionally, we maytry to change the structure in Petri net modules with a genetic algo-rithm.

Figure 6: NPC dragon (a quest giver)

Figure 7: Conversation with a quest giver

Figure 8: Killing NPC B

51

Page 6: Dynamic quest plot generation using Petri net planningsclab.yonsei.ac.kr/publications/Papers/IC/Dynamic Quest Plot Genera… · Petri net planning. A quest plot consists of some major

Acknowledgements

This research was supported by Korea Communications Commis-sion (KCC) as a project, ”Development of UX based Smart TVEnvironmental Status Recognition Technology.”

References

ARINBJARNAR, M. 2008. Dynamic plot generating engine. In ITIS2008, ICST (Institute for Computer Sciences, Social-Informaticsand Telecommunication Engineering), ICST, Brussels, Belgium,H. Barber and D. Thue, Eds., 1–5.

ASHMORE, C., AND NITSCHE, M. 2007. The Quest in a Gener-ated World. In DiGRA 2007 Conference.

AYLETT, R. 1999. Narrative in virtual environments-towards emer-gent narrative. In Narrative Intelligence Symposium.

BIELIKOVA, M., DIVEKY, M., JURNECKA, P., KAJAN, R., ANDOMELINA, L. 2008. Automatic generation of adaptive, educa-tional and multimedia computer games. Signal, Image and VideoProcessing 2, 4, 371–384.

BROM, C., AND ABONYI, A. 2006. Petri nets for game plot. InProceedings of Artificial Intelligence and Simulation Behaviourconvention, 6–13.

COOPER, S., RHALIBI, A. E., MERABTI, M., AND WETHER-ALL, J. 2006. Procedural content generation and level designfor computer games! In Proceedings of the Third InternationalSymposium on AI and Games.

CORREIRA, A. 1980. Computing story trees. Comput. Linguist. 6,3-4 (July), 135–149.

DORAN, J., AND PARBERRY, I. 2011. A prototype quest genera-tor based on a structural analysis of quests from four mmorpgs.In Proceedings of the 2nd International Workshop on Procedu-ral Content Generation in Games, ACM, New York, NY, USA,PCGames ’11, 1:1–1:8.

FEBBRARO, A. D., AND SACONI, S. 1998. Hybrid modelling oftransportation systems by means of petri nets. In Proceedings ofIEEE International Conference on Systems, Man, and Cybernet-ics, 131–135.

GOMEZ-GAUCHIA, H., AND PEINADO, F. 2006. Automatic cus-tomization of non-player characters using players temperament.In Proceedings of the Third international conference on Tech-nologies for Interactive Digital Storytelling and Entertainment,Springer-Verlag, Berlin, Heidelberg, TIDSE’06, 241–252.

JOHNSON, L., YANNAKAKIS, G. N., AND TOGELIUS, J. 2010.Cellular automata for real-time generation of infinite cave levels.In Proceedings of the 2010 Workshop on Procedural ContentGeneration in Games, ACM, New York, NY, USA, PCGames’10, 10:1–10:4.

KERR, C. M., AND SZAFRON, D. 2009. Supporting dialoguegeneration for story-based games. In AIIDE, The AAAI Press,C. Darken and G. M. Youngblood, Eds.

LANG, R. R. 1999. A declarative model for simple narratives. InProceedings of the AAAI Fall Symposium on Narrative Intelli-gence, AAAI Press, 134–141.

LEE, Y.-S., AND CHO, S.-B. 2011. Context-aware petri net for dy-namic procedural content generation in role-playing game. Com-putational Intelligence Magazine, IEEE 6, 2 (may), 16 –25.

LEE, Y.-S., AND CHO, S.-B. 2011. Exploiting mobile contextsfor petri-net to generate a story in cartoons. Applied Intelligence34, 1 (Feb.), 1–18.

LIMA, P., GRACIO, H., VEIGA, V., AND KARLSSON, A. 1998.Petri nets for modeling and coordination of robotic tasks. InSystems, Man, and Cybernetics, 1998. 1998 IEEE InternationalConference on, vol. 1, 190 – 195 vol.1.

MEEHAN, J. R. 1976. The metanovel: writing stories by computer.PhD thesis, New Haven, CT, USA.

NITSCHE, M., ASHMORE, C., HANKINSON, W., FITZPATRICK,R., KELLY, J., AND MARGENAU, K. 2006. Designing Proce-dural Game Spaces: A Case Study.

ONUCZKO, C., SZAFRON, D., SCHAEFFER, J., CUTUMISU, M.,SIEGEL, J., WAUGH, K., AND SCHUMACHER, A. 2006. Au-tomatic Story Generation for Computer Role-Playing Games. InAIIDE, The AAAI Press, J. E. Laird, J. Schaeffer, J. E. Laird,and J. Schaeffer, Eds., 147–148.

PETERSON, J. L. 1981. Petri Net Theory and the Modeling ofSystems. Prentice Hall PTR, Upper Saddle River, NJ, USA.

PROPP, V. A. Morphology of the Folktale, 2 ed. Publications of theAmerican Folklore Society. University of Texas Press.

RIEDL, M. O., AND YOUNG, R. M. 2006. From linear story gen-eration to branching story graphs. IEEE Comput. Graph. Appl.26, 3 (May), 23–31.

THAWONMAS, R., KAMOZAKI, M., AND OHNO, Y. 2007. A rolecasting method based on emotions in a story generation system.In ICEC, Springer, L. Ma, M. Rauterberg, and R. Nakatsu, Eds.,vol. 4740 of Lecture Notes in Computer Science, 182–192.

THEUNE, M., FAAS, S., FAAS, E., NIJHOLT, A., AND HEYLEN,D. 2003. The virtual storyteller: Story creation by intelligentagents. In Proceedings of the Technologies for Interactive Dig-ital Storytelling and Entertainment (TIDSE) Conference, 204–215.

TOGELIUS, J., YANNAKAKIS, G., STANLEY, K., AND BROWNE,C. 2010. Search-Based Procedural Content Generation. In Ap-plications of Evolutionary Computation, e. c. i. l. i. a. Di, Chio,S. Cagnoni, C. Cotta, M. Ebner, A. Ekart, A. Esparcia-Alcazar,C.-K. Goh, J. Merelo, F. Neri, M. Preuß, J. Togelius, and G. Yan-nakakis, Eds., vol. 6024 of Lecture Notes in Computer Science.Springer Berlin / Heidelberg, Berlin, Heidelberg, ch. 15, 141–150.

TYCHSEN, A., TOSCA, S., AND BROLUND, T. 2006. Person-alizing the Player Experience in MMORPGs. In Technologiesfor Interactive Digital Storytelling and Entertainment, S. Gobel,R. Malkewitz, and I. Iurgel, Eds., vol. 4326. Springer Berlin Hei-delberg, Berlin, Heidelberg, ch. 26, 253–264.

YANNAKAKIS, G. N., AND TOGELIUS, J. 2011. Experience-driven procedural content generation. IEEE Transactions on Af-fective Computing 2, 147–161.

52