A Genetic Algorithm Approach To Interactive Narrative Generation TeongJoo Ong and John Leggett Texas A&M University.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Improving Learning Object Description Mechanisms to Support an Integrated Framework for Ubiquitous Learning Scenarios María Felisa Verdejo Carlos Celorrio.
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Set Based Search Modeling Examples II
CS6800 Advanced Theory of Computation
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
Towards Adaptive Web-Based Learning Systems Katerina Georgouli, MSc, PhD Associate Professor T.E.I. of Athens Dept. of Informatics Tempus.
Case Study: Genetic Algorithms GAs are an area of AI research –used to solve search problems with potentially better performance than traditional search.
Genetic Algorithms By: Anna Scheuler and Aaron Smittle.
1 Evolutionary Computational Inteliigence Lecture 6b: Towards Parameter Control Ferrante Neri University of Jyväskylä.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Institute of Intelligent Power Electronics – IPE Page1 Introduction to Basics of Genetic Algorithms Docent Xiao-Zhi Gao Department of Electrical Engineering.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Evolutionary Computational Intelligence
Genetic algorithms for neural networks An introduction.
Applications of Evolutionary Computation in the Analysis of Factors Influencing the Evolution of Human Language Alex Decker.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Chapter 10: Algorithm Design Techniques
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Basic concepts of Data Mining, Clustering and Genetic Algorithms Tsai-Yang Jea Department of Computer Science and Engineering SUNY at Buffalo.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
A New Approach to the Design of Interactive Storytelling Engines TeongJoo Ong and John Leggett Texas A&M University.
Genetic Programming.
Genetic Algorithms: A Tutorial
CHAPTER 12 ADVANCED INTELLIGENT SYSTEMS © 2005 Prentice Hall, Decision Support Systems and Intelligent Systems, 7th Edition, Turban, Aronson, and Liang.
Genetic Algorithm.
Approaches of Digital design part 2 Digital Architecture AE 461 course
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
1 Evolvability Analysis for Evolutionary Robotics Sung-Bae Cho Yonsei University, Korea.
Genetic algorithms Prof Kang Li
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Incident Threading for News Passages (CIKM 09) Speaker: Yi-lin,Hsu Advisor: Dr. Koh, Jia-ling. Date:2010/06/14.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Fuzzy Genetic Algorithm
Chapter 4.1 Beyond “Classic” Search. What were the pieces necessary for “classic” search.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
FINAL EXAM SCHEDULER (FES) Department of Computer Engineering Faculty of Engineering & Architecture Yeditepe University By Ersan ERSOY (Engineering Project)
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
GENETIC ALGORITHMS.  Genetic algorithms are a form of local search that use methods based on evolution to make small changes to a popula- tion of chromosomes.
Effect of Modified Permutation Encoding Mutation in Genetic Algorithm Sandeep Bhowmik Archana Jha Sukriti Sinha Department of Computer Science & Engineering,
1 A New Method for Composite System Annualized Reliability Indices Based on Genetic Algorithms Nader Samaan, Student,IEEE Dr. C. Singh, Fellow, IEEE Department.
Learning Othello The quest for general strategy building.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Genetic Algorithms Abhishek Sharma Piyush Gupta Department of Instrumentation & Control.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
Product Evolution: Computer-aided Recombinant Design by Customer-driven Natural Selection Kamal Malek Noubar Afeyan MIT Media Lab / The Center For Bits.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A schema is a string with fixed and variable symbols 01*1*
Genetic Programming. What is Genetic Programming? GP for Symbolic Regression Other Representations for GP Example of GP for Knowledge Discovery Outline.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Introduction to Genetic Algorithms
Author :Shigeomi HARA Hiroshi DOUZONO Yoshio NOGUCHI
Artificial Intelligence Methods (AIM)
School of Computer Science & Engineering
Case Study: Genetic Algorithms
Genetic Algorithms: A Tutorial
A Gentle introduction Richard P. Simpson
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithms: A Tutorial
Presentation transcript:

A Genetic Algorithm Approach To Interactive Narrative Generation TeongJoo Ong and John Leggett Texas A&M University

Introduction Stories are used to convey information, cultural values, and experiences Stories are used to convey information, cultural values, and experiences New technologies have constantly provided increasingly sophisticated means to tell stories New technologies have constantly provided increasingly sophisticated means to tell stories Recent trend is the convergence of technology, entertainment, and art in the computer Recent trend is the convergence of technology, entertainment, and art in the computer

Background Interactive storytelling is a major research area Interactive storytelling is a major research area Many overlapping approaches have been used: Many overlapping approaches have been used: AI community (Narrative intelligence): AI community (Narrative intelligence): Immersive storytelling Immersive storytelling Emergent storytelling Emergent storytelling Plot-based systems Plot-based systems Interactive authoring of stories Interactive authoring of stories Character-based systems Character-based systems

Background (cont.) Hypertext community: Hypertext community: Hypertext narratives Hypertext narratives Adaptive hypermedia Adaptive hypermedia Sculptural hypertext Sculptural hypertext Partial listing of related work from these areas: Partial listing of related work from these areas: CHOROS (N. M. Sgouros) CHOROS (N. M. Sgouros) Façade (M. Mataes, A. Stern) Façade (M. Mataes, A. Stern) Card Shark and Storyspace (M. Bernstein) Card Shark and Storyspace (M. Bernstein) Metalinear Cinematic Narrative (K.M. Brooks) Metalinear Cinematic Narrative (K.M. Brooks) StoryBeads (B. Barry) StoryBeads (B. Barry)

Motivation The HEFTI storytelling engine attempts to merge results and ideas from both communities The HEFTI storytelling engine attempts to merge results and ideas from both communities Recombination, mutation, selection of authored story elements with Genetic Algorithm (GA) Recombination, mutation, selection of authored story elements with Genetic Algorithm (GA) Generate, remove and traverse links in the story elements as the story unfolds using the author’s predefined rules Generate, remove and traverse links in the story elements as the story unfolds using the author’s predefined rules Story elements and rules are encoded in XML Story elements and rules are encoded in XML Provides a small drag-and-drop tool and tree-view tools for authors to create their stories Provides a small drag-and-drop tool and tree-view tools for authors to create their stories

Definitions Story elements – Smallest units in HEFTI’s story search space Story elements – Smallest units in HEFTI’s story search space Story template – Describes combinations of various story elements at a particular stage in the story Story template – Describes combinations of various story elements at a particular stage in the story Template sequences – Subdivision of story template to depict time-based relationships among story elements Template sequences – Subdivision of story template to depict time-based relationships among story elements Story component – Combination of story elements, agent scripts and variables generated by HEFTI based on the given set of story templates and elements Story component – Combination of story elements, agent scripts and variables generated by HEFTI based on the given set of story templates and elements

Generating a Story A story is divided into multiple time steps A story is divided into multiple time steps Chromosomes represent a story component Chromosomes represent a story component Genes represent a collection of story elements pertaining to a template sequence within a story template Genes represent a collection of story elements pertaining to a template sequence within a story template Genes are encoded as floating point numbers for convenience of manipulation (as shown later) Genes are encoded as floating point numbers for convenience of manipulation (as shown later)

Generating a Story (cont.) A gene is generated by constructing valid story element sets based on the current state of the story and various conditions and rules imposed by the author (Encoding) A gene is generated by constructing valid story element sets based on the current state of the story and various conditions and rules imposed by the author (Encoding) The encoding process is sequential due to dependencies and ordering of story elements The encoding process is sequential due to dependencies and ordering of story elements The encoding process is repeated several times to generate individuals in the GA population The encoding process is repeated several times to generate individuals in the GA population

Generating a Story (cont.) After the evolution process, the decoding process steps through each of the genes, decoding each gene based on its story context After the evolution process, the decoding process steps through each of the genes, decoding each gene based on its story context The end result is a story component that describes the next story sequence The end result is a story component that describes the next story sequence The process is repeated to generate subsequent story sequences The process is repeated to generate subsequent story sequences

Generating a Story (cont.)

Operations on Story Components The original genetic operators are modified to handle authored ordering of story elements The original genetic operators are modified to handle authored ordering of story elements Chromosome level operators: Chromosome level operators: Single point crossover Single point crossover Multi point crossover Multi point crossover Gene level operators: Gene level operators: Crossover operators Crossover operators Mutation Mutation

Chromosome Operators The offsets are chosen to share similar starting conditions and consequences The offsets are chosen to share similar starting conditions and consequences The operator generates permutations of the template sequences The operator generates permutations of the template sequences Chromosome A Chromosome B Chosen offsets for multipoint crossover Chromosome A* Chromosome B* … … … … … … … …

Chromosome Operators (cont.) An example from The Three Little Pigs … An example from The Three Little Pigs … Given two chromosomes (A and B) with: Given two chromosomes (A and B) with: Starting conditions: Wolf shows up in front of Angela Pig’s house Consequences: Wolf eats Angela Pig If the state of the story is the same for both, the intermediary stages can be swapped between A and B If the state of the story is the same for both, the intermediary stages can be swapped between A and B

Gene Operators Alter selection of story elements Crossover operators are the same as at the chromosome level except they crossover story elements instead of genes Mutation operator changes the offset into a list of possible story elements Gene A (Before mutation) Gene A* (After mutation) … … … … 1 Chosen offset for mutation

Story Threads Authors create potential story threads Authors create potential story threads Story thread is an indicator for: Story thread is an indicator for: 1. Length of story 2. Choice of story elements from a story template 3. Sets of story templates to be used at certain story time steps 4. Rules that change the flow of the story 5. Evaluation criteria for chromosome fitness

Fitness Evaluation HEFTI is free to generate stories that adhere only so closely (within a threshold) to a story thread HEFTI is free to generate stories that adhere only so closely (within a threshold) to a story thread Fitness evaluation takes place on the chromosomes of a story thread Fitness evaluation takes place on the chromosomes of a story thread Authors can indicate preference, indifference, or dislike towards certain story elements by assigning positive or negative values to the story elements Authors can indicate preference, indifference, or dislike towards certain story elements by assigning positive or negative values to the story elements The existence of certain story elements in story components are influenced accordingly through the selection mechanisms of GA The existence of certain story elements in story components are influenced accordingly through the selection mechanisms of GA

Story Thread with Fitness Evaluation <timestep order="4" name="wolf's plan" loop="{isPigStillAvailable.value} == true AND {isWolfDead.value} == false"> </set></timestep>

Scenarios of Use Interactive fiction: A murder mystery with multiple dynamically generated story threads Interactive fiction: A murder mystery with multiple dynamically generated story threads Sub-module of a computer game engine that dynamically combines various story and agent scripts from existing story elements Sub-module of a computer game engine that dynamically combines various story and agent scripts from existing story elements An educational environment that can present new concepts in various forms while preserving the goals of the story An educational environment that can present new concepts in various forms while preserving the goals of the story

Conclusions HEFTI needs a large enough set of story elements and templates for it to create the story components HEFTI needs a large enough set of story elements and templates for it to create the story components Authoring a story from scratch can be tedious Authoring a story from scratch can be tedious Story templates allow authors to create story elements at different granularities Story templates allow authors to create story elements at different granularities Story elements can be reused in similar story settings Story elements can be reused in similar story settings

Future Work Genetic programming might be used to generate agent scripts given the starting and ending agent actions Genetic programming might be used to generate agent scripts given the starting and ending agent actions Evaluation of fitness data on all of the story variants that HEFTI is capable of generating Evaluation of fitness data on all of the story variants that HEFTI is capable of generating Better support for user interaction and control of the story Better support for user interaction and control of the story