Logical and Artificial Intelligence in Games Lecture 14

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

© Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems Introduction.
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Tetris and Genetic Algorithms Math Club 5/30/2011.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Evolutionary Computational Intelligence
Introduction to Genetic Algorithms Yonatan Shichel.
Intro to AI Genetic Algorithm Ruth Bergman 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 Algorithms: A Tutorial
Genetic Algorithm.
Gene flow is the movement of alleles between populations.
1 Introduction to Genetic Algorithms. 2 Genetic Algorithms What are they? –Evolutionary algorithms that make use of operations like mutation, recombination,
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
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.
Artificial Intelligence Lecture No. 31 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
16-2 Evolution as Genetic Change
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
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.
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms Czech Technical University in Prague, Faculty of Electrical Engineering Ondřej Vaněk, Agent Technology Center ZUI 2011.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Parallel Genetic Algorithms By Larry Hale and Trevor McCasland.
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Genetic Algorithms.
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
School of Computer Science & Engineering
Introduction to Genetic Algorithm (GA)
CSC 380: Design and Analysis of Algorithms
CIS 488/588 Bruce R. Maxim UM-Dearborn
Basics of Genetic Algorithms (MidTerm – only in RED material)
Genetic Algorithms: A Tutorial
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
Basics of Genetic Algorithms
Machine Learning: UNIT-4 CHAPTER-2
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Population Based Metaheuristics
Genetic Algorithms: A Tutorial
CSC 380: Design and Analysis of Algorithms
Presentation transcript:

Logical and Artificial Intelligence in Games Lecture 14 Genetic Algorithms Logical and Artificial Intelligence in Games Lecture 14

Genetic Algorithms What are they? Uses? Evolutionary algorithms that make use of operations like mutation, recombination, and selection Uses? Difficult search problems Optimization problems Machine learning Adaptive rule-bases

Theory of Evolution Every organism has unique attributes that can be transmitted to its offspring Offspring are unique and have attributes from each parent Selective breeding can be used to manage changes from one generation to the next Nature applies certain pressures that cause individuals to evolve over time

Evolutionary Pressures Environment Creatures must work to survive by finding resources like food and water Competition Creatures within the same species compete with each other on similar tasks (e.g. finding a mate) Rivalry Different species affect each other by direct confrontation (e.g. hunting) or indirectly by fighting for the same resources

Natural Selection Creatures that are not good at completing tasks like hunting or mating have fewer chances of having offspring Creatures that are successful in completing basic tasks are more likely to transmit their attributes to the next generation since there will be more creatures born that can survive and pass on these attributes

Genetics Genome 基因組 (class) Genomics Alleles 等位基因 Genotype (instance) Sequence of genes describing the overall structure of the genetic for a particular species Genomics Study of the meaning of the genes for a particular species Alleles 等位基因 Values that can be assigned to a given gene (individual creature) Genotype (instance) Sequence of alleles

Physical Properties Phenetics 表型學 Phenome Phenotype 表現某一顯性特徵之生物個體 Study of physical properties and morphology 形態 of creatures independent of genetic information Phenome General structure of creatures body and attributes Phenotype 表現某一顯性特徵之生物個體 Particular instance of phenome realized as a unique creature Product of genotype and environment forces Examples Phenome: Hair color, skin tone, height Phenotype: Black, Dark, 1.75 m

Conversions In real-world mapping between genotypes and phenotypes is hard In AI work it can be done by defining a convenient function or even designing encodings by hand It is often easier to adapt genetic operators to work with the evolutionary data structure used to represent the phenotype than to encode and decode phenotypes

Genetic Algorithmic Process Potential solution for problem domains are encoded using machine representation (e.g. bit strings) that supports variation and selection operations Mating and mutation operations produce new generation of solutions from parent encodings Fitness function judges the individuals that are “best” suited (e.g. most appropriate problem solution) for “survival”

Genetic Algorithm Evolutionary Process Here’s the generic outline of the evolutionary process in Genetic Algorithm Initialization – A population of individuals is created Selection – Parents are picked from the population Crossover – Their genetic code is combined together to form the child. Mutation – A few genes of the offspring are changed arbitrarily. Replacement – The offspring is potentially reinserted into the population

Initialization Initial population must be a representative sample of the search space Random initialization can be a good idea (if the sample is large enough) Random number generator can not be biased Can reuse or seed population with existing genotypes based on algorithms or expert opinion or previous evolutionary cycles

Evaluation Each member of the population can be seen as candidate solution to a problem The fitness function determines the quality of each solution The fitness function takes a phenotype and returns a floating point number as its score It is problem dependent so can be very simple It can be a bottleneck if it is not carefully thought out (there are no magic ways to create them)

Selection Want to to give preference to “better” individuals to add to mating pool Mating can be sexual or asexual If entire population ends up being selected it may be desirable to conduct a tournament to order individuals in population Would like to keep the best in the mating pool and drop the worst (elitism) Elitism is trade-off with search space completeness

Crossover - 1 In sexual reproduction the genetic codes of both parents are combined to create offspring Asexual crossover has no impact on the mating pool Would like to keep 60/40 split between parent contributions 95/5 splits negate the benefits of crossover (too much like asexual reproduction)

Crossover - 2 If we have selected two strings A = 11111 and B = 00000 We might choose a uniformly random site (e.g. position 3) and trade bits This would create two new strings A’ =11100 and B’ = 00011 These new strings might then be added to the mating pool if they are “fit”

Mutation Mutations happen at the genome level (rarely and not good) and the genotype level (better for the GA process) Mutation is important for maintaining diversity in the genetic code In humans, mutation was responsible for the evolution of intelleigence Example: The occasional (low probably) alteration of a bit position in a string

Operators Selection and mutation Selection, crossover, and mutation When used together give us a genetic algorithm equivalent of to parallel, noise tolerant, hill climbing algorithm Selection, crossover, and mutation Provide an insurance policy against losing population diversity and avoiding some of the pitfalls of ordinary “hill climbing”

Replacement Determine when to insert new offspring into the mating pool and which individuals to drop out based on fitness Steady state evolution calls for the same number of individuals in the population, so each new offspring processed one at a time so fit individuals can remain a long time In generational evolution, the offspring are placed into a new population with all other offspring (genetic code only survives in kids)

Genetic Algorithm Set time t = 0 Initialize population P(t) While termination condition not met Evaluate fitness of each member of P(t) Select members from P(t) based on fitness Produce offspring form the selected pairs Replace members of P(t) with better offspring Set time t = t + 1

Why use genetic algorithms? They can solve hard problems Easy to interface genetic algorithms to existing simulations and models GA’s are extensible GA’s are easy to hybridize GA’s work by sampling, so populations can be sized to detect differences with specified error rates Use little problem specific code

GA Strengths Do well at avoiding local minima and can often times find near optimal solutions since search is not restricted to small search areas Easy to extend by creating custom operators Perform well for global optimizations Work required to to choose representations and conversion routines is acceptable

GA Weaknesses Do not take advantage of domain knowledge Not very efficient at local optimization (fine tuning solutions) Randomness inherent in GA make them hard to predict (solutions can take a long time to stumble upon) Require entire populations to work (takes lots of time and memory) and may not work well for real-time applications