Evolutionary Computation and Game Development Part 1: Background.

Slides:



Advertisements
Similar presentations
Logical and Artificial Intelligence in Games Lecture 14
Advertisements

Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Bio-Inspired Optimization. Our Journey – For the remainder of the course A brief review of classical optimization methods The basics of several stochastic.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Evolutionary Computing A Practical Introduction Presented by Ben Paechter Napier University with thanks to the EvoNet Training Committee and its “Flying.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Hybridization of Search Meta-Heuristics Bob Buehler.
Evolving Neural Network Agents in the NERO Video Game Author : Kenneth O. Stanley, Bobby D. Bryant, and Risto Miikkulainen Presented by Yi Cheng Lin.
Introduction to Genetic Algorithms Yonatan Shichel.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
CS 447 Advanced Topics in Artificial Intelligence Fall 2002.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Programming.
Genetic Algorithms: A Tutorial
Prepared by Barış GÖKÇE 1.  Search Methods  Evolutionary Algorithms (EA)  Characteristics of EAs  Genetic Programming (GP)  Evolutionary Programming.
Evolutionary algorithms
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
Introduction to Genetic Algorithms and Evolutionary Computation
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Genetic Algorithms Michael J. Watts
ART – Artificial Reasoning Toolkit Evolving a complex system Marco Lamieri Spss training day
Design & Analysis of Algorithms Combinatory optimization SCHOOL OF COMPUTING Pasi Fränti
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Evolutionary Computation Dean F. Hougen w/ contributions from Pedro Diaz-Gomez & Brent Eskridge Robotics, Evolution, Adaptation, and Learning Laboratory.
Artificial Intelligence Chapter 4. Machine Evolution.
1 Genetic Algorithms and Ant Colony Optimisation.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Edge Assembly Crossover
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
1. Genetic Algorithms: An Overview  Objectives - Studying basic principle of GA - Understanding applications in prisoner’s dilemma & sorting network.
Pac-Man AI using GA. Why Machine Learning in Video Games? Better player experience Agents can adapt to player Increased variety of agent behaviors Ever-changing.
CITS7212: Computational Intelligence An Overview of Core CI Technologies Lyndon While.
Optimization Problems
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
Genetic Algorithms MITM613 (Intelligent Systems).
Genetic Search Algorithms Matt Herbster. Why Another Search?  Designed in the 1950s, heavily implemented under John Holland (1970s)  Genetic search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Solution Search in Problem Space.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
March 1, 2016Introduction to Artificial Intelligence Lecture 11: Machine Evolution 1 Let’s look at… Machine Evolution.
Presented By: Farid, Alidoust Vahid, Akbari 18 th May IAUT University – Faculty.
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
Evolution Strategies Evolutionary Programming
An evolutionary approach to solving complex problems
Advanced Artificial Intelligence Evolutionary Search Algorithm
Basics of Genetic Algorithms (MidTerm – only in RED material)
Artificial Intelligence Chapter 4. Machine Evolution
Multi-Objective Optimization
GENETIC ALGORITHMS & MACHINE LEARNING
Introduction to Artificial Intelligence Lecture 11: Machine Evolution
Basics of Genetic Algorithms
Artificial Intelligence Chapter 4. Machine Evolution
Searching for solutions: Genetic Algorithms
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Beyond Classical Search
Population Based Metaheuristics
Presentation transcript:

Evolutionary Computation and Game Development Part 1: Background

Overview What is Evolutionary Computation (EC)? EC in the Real World EC and the Gaming Industry What is EC? (Continued) EC and Games Some Ideas Questions

What is Evolutionary Computation? Evolutionary Computation is the study of algorithms inspired by the natural process of evolution. o Genetic Algorithms (GA) o Evolution Strategies (ES) o Evolutionary Programming (EP) o Genetic Programming (GP) o Particle Swarm Optimization (PSO) o Ant Systems (AS) o Ant Colony Optimization (ACO)

EC in the Real World Scheduling o Scheduling of flights o Task scheduling Routing o FedEx o UPS o Disney World Tour Planning Design o Aircraft design o Factory layout

EC in the Gaming Industry IEEE CIG IEEE Transactions on Computational Intelligence and AI in Games Started in 2005 NERO with rtNEAT Using EC to create actual AI opponents Dynamic Content Creation Play Testing

NERO and rtNEAT NERO – Neuro-Evolving Robotic Operatives NEAT – Neuro-Evolution of Augmenting Topologies The NERO game was a sandbox where players evolved AI bots –Supervised learning Evolved Neural Network controllers with a Genetic Algorithm

EC for AI Opponents RTS games have recently become a test-bed for evolving AI opponents There is also interest in evolving support functions, units, and features in RTS Research and competition have also been held and are still being held for AI bots in FPS games However, most research still center around classic board games

Dynamic Content Creation Key questions –How can a game keep the player engaged? –How can a game keep players interested? –How can a game challenge a player? –How can a game satisfy a player? Two possible approaches –Adaptive difficulty or gameplay –Adaptive game content

Play Testing Use EC to find potential cheats or exploits Use EC to test feature balancing Use EC to possibly find better reproduction steps for isolating bugs/crashes One research done using Fifa ’99 –EA Burnaby

What is EC? (Continued) Evolutionary Computation is the study of algorithms inspired by the natural process of evolution. So, what does that mean? Here's the High Level Pseudo-code 1.Randomly Generate a Population (Generation) 2.Evaluate Initial Population (Evaluation) 3.Select Parents (Selection) 4.Perform Crossover (Crossover) 5.Apply Mutation (Mutation) 6.Evaluate Offspring (Evaluation) 7.Replace Parents (Replacement) 8.Goto 3.

Characteristics of an Evolutionary Algorithm (EA) "Any-time" Algorithms o The longer you run them, the better the solution (ideally) Stochastic in Nature o There is alot of randomness involved o This is the primary property Meta-heuristics o "a heuristic method for solving a very general class of computational problems by combining user-given black- box procedures in a hopefully efficient way" Flexibility Black Box operator that can be swapped out

Black Box Components Problem Encoding o How is the problem encoded/represented o Genotype and Phenotype Operators o Selection o Crossover o Mutation o Replacement o Evaluation Candidate Solution

Problem Encoding Genotype - the representation of the problem that is being manipulated by the EA Phenotype - the physical representation of the problem that the genotype maps to Encoding is a key component o is important no matter what EA you are using o improper encoding will cause bad results o too complicated an encoding runs the risk of bogging down the algorithm There are guidelines, known methods, and encoding requirements based on the EA you want to use However, there will always be some black magic involved

Example: Knapsack Problem Sword10 Shield20 Helmet4 Chain Mail14 Gauntlet6 Running Shoes2 Healing Potion1 Magic Wand3 Healing Potion1

Knapsack Problem Large number of items, limited space Simplified form of a inventory/resource management problem –Inventory management in RPG’s –Resource allocation in RTS’s

Phenotype vs. Genotype Sword10 Shield20 Helmet4 Chain Mail14 Gauntlet6 Running Shoes2 Healing Potion1 Magic Wand3 Healing Potion

Some Known Encodings Bit Arrays Integer/Floating Point Arrays A mix of the above two Finite State Machines –First used in Evolutionary Programming Expression Tree –Mainly used in Genetic Programming

Evaluation Function Just as important if not more important than how the problem is encoded The quality of the evaluation function directly influences the results o EA's have no eyes o The evaluation function is an EA's guide dog There are also known good methods of formulating an evaluation function To get optimal results, the evaluation function must be customized for the problem There is a whole subfield of EC that doesn't use an evaluation function o Interactive Evolutionary Computation

Knapsack Problem (Cont.) How would we evaluate a candidate solution? –How do we judge which item combination is better than any other? –Do we just want to fill the sack as much as possible, or is there a reason to prefer certain items over others?

Knapsack Problem (cont.) Sword10 Shield20 Helmet4 Chain Mail14 Gauntlet6 Running Shoes2 Healing Potion1 Magic Wand3 Healing Potion

Selection Natural Selection How do we select parents? Which parents should be paired up for crossover? Common selection methods o Random Selection o Rank-Based Selection o Roulette Wheel Selection o Tournament Selection o No Selection

Random Selection

Roulette Wheel Selection

??? P1P4P3 ??? P6P2P3 Tournament Selection

Crossover How do we create offspring(s) with the parents? Completely dependent on problem representation and how many parents are involved Arrays of discrete values o Single Point or Multi-point Crossover o Uniform Crossover Array of real values o Discrete Crossover o Interpolation Trees or Finite State Machines o Pruning and Grafting

Mutation Also representation dependent Any form of random perturbation o random bit flips o random value replacements o random insertions or deletions

Replacement This is where Natural Selection kicks in a second time How will the offsprings replace the parents? Who will survive? Two common approaches o Offsprings replace parents completely o Offsprings and parents compete for survival

Operators Evolutionary Algorithms are meta-heuristics Operators are black boxes Doesn’t matter how they are implemented They just have to perform some specific task –The algorithm doesn’t care how task is accomplished

Additional Notes Crossover and mutation are sometimes considered optional o Some have found better results with only one of the two The truth is that there is alot of voodoo magic involved o Experience will tell you how best to encode a problem o But each problem type tends to have its own trick o There are known best practices for certain problem types  Traveling Salesman  Knapsack Problem o More often than not, your problem will fall into something totally new

Precautionary Warning EC is a tool –Used for exploratory purposes –Used when a pretty good solution is needed in a short period of time –Used when there is no known solution especially when there is no clear definition of what a solution is It will never perform better than a specialized algorithm

EC in Games Why is EC rarely used in real games? Complexity (Space and Time) –Which portion of the game do we want to evolve? –How would we encode the problem and where would we store the population? –Where will we find the clock cycles needed for the evolution? –What is a good evaluation function? –How would the producers tune this and what are behaviors they should expect? Uniform Experience –How do we control the overall user experience? –Can we even guarantee a predictable user experience? –Will predictability sacrifice algorithm performance?

Interactive Evolutionary Computation Replaces the evaluation function with some form of human response –Great for when the fitness cannot to quantitatively evaluated and qualitative measures are fuzzy at best The response can be a quantitative value or just a qualitative classification NERO is an example of an interactive EC

Adaptive Gaming Gameplay adapting to user action oDynamic scaling of difficulty (already been done) The game adapts to user actions –Dynamic content generation –“No one really knows what they really want” –“They know what they want when they see it”

Questions?