NPC Adaptation in Interactive Fiction By: Ryen Wilkins Adviser: Dr. C. David Shaffer.

Slides:



Advertisements
Similar presentations
Relevance Feedback Limitations –Must yield result within at most 3-4 iterations –Users will likely terminate the process sooner –User may get irritated.
Advertisements

1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Genetic Algorithms By: Anna Scheuler and Aaron Smittle.
On the Genetic Evolution of a Perfect Tic-Tac-Toe Strategy
EC – Tutorial / Case study Iterated Prisoner's Dilemma Ata Kaban University of Birmingham.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Game Design Serious Games Miikka Junnila.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Mechanics of Genetic Programming
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
1 Protocols are programs too The meta-heuristic search for security protocols By John A. Clark.
Game of Life Changhyo Yu Game of Life2 Introduction Conway’s Game of Life  Rule Dies if # of alive neighbor cells =< 2 (loneliness) Dies.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
1 ENG236: Introduction (1) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
1 Reasons for parallelization Can we make GA faster? One of the most promising choices is to use parallel implementations. The reasons for parallelization.
CHAPTER 12 ADVANCED INTELLIGENT SYSTEMS © 2005 Prentice Hall, Decision Support Systems and Intelligent Systems, 7th Edition, Turban, Aronson, and Liang.
Evolving Multi-modal Behavior in NPCs Jacob Schrum – Risto Miikkulainen –
Genetic Algorithm.
Evolutionary Intelligence
CPSC 171 Introduction to Computer Science 3 Levels of Understanding Algorithms More Algorithm Discovery and Design.
An Approach of Artificial Intelligence Application for Laboratory Tests Evaluation Ş.l.univ.dr.ing. Corina SĂVULESCU University of Piteşti.
林偉楷 Taiwan Evolutionary Intelligence Laboratory.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Othello Artificial Intelligence With Machine Learning
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Appendix B A BRIEF TOUR OF SOLVER Prescriptive Analytics
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Presenter: Chih-Yuan Chou GA-BASED ALGORITHMS FOR FINDING EQUILIBRIUM 1.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Simulation of Plant Growth using Genetic Algorithms Peter Barber Westminster College.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Machine Learning for an Artificial Intelligence Playing Tic-Tac-Toe Computer Systems Lab 2005 By Rachel Miller.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
Controlling the Behavior of Swarm Systems Zachary Kurtz CMSC 601, 5/4/
For Friday Finish chapter 6 Program 1, Milestone 1 due.
Learning Othello The quest for general strategy building.
Evolutionary Programming
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Evolutionary Art (What we did on our holidays) David Broadhurst Dan Costelloe Lynne Jones Pantelis Nasikas Joanne Walker.
Robot Intelligence Technology Lab. Generalized game of life YongDuk Kim.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Practical Issues: Selection.
Othello Artificial Intelligence With Machine Learning Computer Systems TJHSST Nick Sidawy.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
►Search and optimization method that mimics the natural selection ►Terms to define ٭ Chromosome – a set of numbers representing one possible solution ٭
The Implementation of Genetic Algorithms to Locate Highest Elevation By Harry Beddo.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Teaching Computers to Think:
Genetic Algorithm(GA)
George Yauneridge.  Machine learning basics  Types of learning algorithms  Genetic algorithm basics  Applications and the future of genetic algorithms.
GENETIC ALGORITHM By Siti Rohajawati. Definition Genetic algorithms are sets of computational procedures that conceptually follow steps inspired by the.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Genetic Algorithm (Knapsack Problem)
Othello Artificial Intelligence With Machine Learning
Balancing of Parallel Two-Sided Assembly Lines via a GA based Approach
Othello Artificial Intelligence With Machine Learning
Behrouz Minaei, William Punch
Genetic algorithms: case study
Presentation transcript:

NPC Adaptation in Interactive Fiction By: Ryen Wilkins Adviser: Dr. C. David Shaffer

Introduction  Description: - Can Interactive Fiction (IF) take advantage of machine learning to build a more compelling story?  Implementation: - Focus on Genetic Algorithm - Limited story with learning character(s) - TADS 3 Interactive Fiction authoring system - Rock, Paper, Scissors

Genetic Algorithm (GA) a) Create random population (set of chromosomes) b) Evaluate each chromosome using fitness function c) Select best n to continue into next generation d) Perform genetic operations - Mutation - Crossover e) Repeat from b until desired fitness is achieved

Interactive Fiction  Story in which the reader interacts with characters or items, typically impacting the story line.  Several genres exist  There are several IF authoring systems: Inform, TADS, Adrift, Quest…  None include support for machine learning

TADS 3 Dialogue Example

TADS 3  Similar in appearance to C++, Java and Javascript.  Prototype-based language.  Standard object library (Adv3 library).  Built in random generator.  Debugging tool.  Replay function.  Vectors.

Incorporating GA in TADS 3  Used Object-Oriented Implementation of Numerical Methods by Didier Besset  Convert from class-based OOL to prototype-based OOL.  Deal with differences in library, random generator, collections, iteration, etc.

Incorporating GA in TADS 3  Pre-test: Partition Problem  Vector of weights. Each must be assigned to a left or right scale.  Goal is to get as close to balanced as possible.  Chromosome: Vector of 1s (left) and 0s (right)  Results: Simple test shows genetic algorithm is capable of being implemented in TADS 3

Next Step  Can I get a character in the story to react to the reader’s decisions?  Need a setting. - Reader is a wizard trapped in a dungeon. - Discovers that he will be released from the dungeon if he can defeat a guard in a game of rock, cloth, knife.

Rock, Cloth, Knife  Chromosome: Probabilities that this guard will select rock, cloth or knife.  Initial population size: 100  From reader: 5 sets of 5 rounds each  Fitness: Number of sets in which the chromosome defeats the player. (50 iterations per set.)  Compared with system where rock, cloth and knife have equal probability (uniform).

Mutation and Crossover  Mutation: - New random value. - Mutate two at a time.  Crossover: - Cross and switch multiple values across two members. - Add both.

Initial Results  “Good” members were lost in mutation.  Adding both crossover members could trap algorithm when too many poor members were made because of it.

Mutation and Crossover revisited  Creep mutation – Small amount added or subtracted to a value. More even results and don’t lose “good” members.  Crossover over one value and only add a single new member.

Uniform Player RCK Results (50 iterations/set – 5 generations) Total Wins Trial #

Rock focused player (75%) 50 iterations

Cloth focused player (75%) 50 iterations

Knife focused player (75%) 50 iterations

– 50 iterations

Me (R: 11 C: 8 K: 6) 50 iterations

Conclusions  Genetic algorithm creates better opponents for specialized strategies than a uniform strategy, the only option built in with TADS 3.  Results can be used to create a character(s) that will seem to react to how the reader plays the game.

Second level (uniform)

Uniform – 50 generations

Uniform – 100 generations

Second level ( )

Second level ( generations)

Second Level (me)

Second level (me – 50 generations)

Future Work  Expand to a more difficult game: - Waving Hands: ngHands.html