Chapter 14 Genetic Algorithms.

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

Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Genetic Algorithm.
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Linkage Learning in Evolutionary Algorithms. Recombination Missouri University of Science and Technology Recombination explores the search space Classic.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Introduction to AI (part two) Tim Watson G6.71
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Introduction to Genetic Algorithms Yonatan Shichel.
COMP 578 Genetic Algorithms for Data Mining Keith C.C. Chan Department of Computing The Hong Kong Polytechnic University.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
16 November, 2005 Statistics in HEP, Manchester 1.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Programming.
Slides are based on Negnevitsky, Pearson Education, Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming n Evolution.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Computer Implementation of Genetic Algorithm
Evolutionary Intelligence
© Negnevitsky, Pearson Education, Lecture 11 Evolutionary Computation: Genetic algorithms Why genetic algorithm work? Why genetic algorithm work?
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic algorithms Prof Kang Li
Schemata Theory Chapter 11. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Theory Why Bother with Theory? Might provide performance.
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
By Prafulla S. Kota Raghavan Vangipuram
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
1 Chapter 14 Genetic Algorithms. 2 Chapter 14 Contents (1) l Representation l The Algorithm l Fitness l Crossover l Mutation l Termination Criteria l.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 16 February 2007 William.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 12.1 An Introduction to Genetic Algorithms.
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.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
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 Algorithms CSCI-2300 Introduction to Algorithms
Edge Assembly Crossover
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
MAE 552 Heuristic Optimization Instructor: John Eddy Lecture #12 2/20/02 Evolutionary Algorithms.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
1 Chapter 3 GAs: Why Do They Work?. 2 Schema Theorem SGA’s features: binary encoding proportional selection one-point crossover strong mutation Schema.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
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 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 And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Advanced AI – Session 7 Genetic Algorithm By: H.Nematzadeh.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Chapter 14 Genetic Algorithms.
Chapter 14. Genetic Algorithms
Genetic Algorithms.
Evolution strategies and genetic programming
Genetic Algorithms Chapter 3.
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
Chapter 14. Genetic Algorithms
Population Based Metaheuristics
Presentation transcript:

Chapter 14 Genetic Algorithms

Chapter 14 Contents (1) Representation The Algorithm Fitness Crossover Mutation Termination Criteria Optimizing a mathematical function

Chapter 14 Contents (2) Schemata The Effect of Reproduction on Schemata The Effect of Crossover and Mutation The Schema Theorem The Building Block Hypothesis Deception Messy Genetic Algorithms Evolving Pictures Co-Evolution

Representation Genetic techniques can be applied with a range of representations. Usually, we have a population of chromosomes (individuals). Each chromosome consists of a number of genes. Other representations are equally valid.

The Algorithm The algorithm used is as follows: Generate a random population of chromosomes (the first generation). If termination criteria are satisfied, stop. Otherwise, continue with step 3. Determine the fitness of each chromosome. Apply crossover and mutation to selected chromosomes from the current generation to generate a new population of chromosomes (the next generation). Return to step 2.

Fitness Fitness is an important concept in genetic algorithms. The fitness of a chromosome determines how likely it is that it will reproduce. Fitness is usually measured in terms of how well the chromosome solves some goal problem. E.g., if the genetic algorithm is to be used to sort numbers, then the fitness of a chromosome will be determined by how close to a correct sorting it produces. Fitness can also be subjective (aesthetic)

Crossover (1) Crossover is applied as follows: Select a random crossover point. Break each chromosome into two parts, splitting at the crossover point. Recombine the broken chromosomes by combining the front of one with the back of the other, and vice versa, to produce two new chromosomes.

Crossover (2) Usually, crossover is applied with one crossover point, but can be applied with more, such as in the following case which has two crossover points: Uniform crossover involves using a probability to select which genes to use from chromosome 1, and which from chromosome 2.

Mutation A unary operator – applies to one chromosome. Randomly selects some bits (genes) to be “flipped” 1 => 0 and 0 =>1 Mutation is usually applied with a low probability, such as 1 in 1000.

Termination Criteria A genetic algorithm is run over a number of generations until the termination criteria are reached. Typical termination criteria are: Stop after a fixed number of generations. Stop when a chromosome reaches a specified fitness level. Stop when a chromosome succeeds in solving the problem, within a specified tolerance. Human judgement can also be used in some more subjective cases.

Optimizing a mathematical function A genetic algorithm can be used to find the highest value for f(x) = sin (x). Each chromosome consists of 4 bits, to represent the values of x from 0 to 15. Fitness ranges from 0 (f(x) = -1) to 100 (f(x) = 1). By applying the genetic algorithm it takes just a few generations to find that the value x =8 gives the optimal solution for f(x).

Schemata (1) As with the rules used in classifier systems, a schema is a string consisting of 1’s, 0’s and *’s. E.g.: 1011*001*0 Matches the following four strings: 1011000100 1011000110 1011100100 1011100110 a schema with n *’s will match a total of 2n chromosomes. Each chromosome of r bits will match 2r different schemata.

Schemata (2) The defining length dL(S) of a schema, S, is the distance between the first and last defined bits. For example, the defining length of each of the following schemata is 4: **10111* 1*0*1** The order O(S) is number of defined bits in S. The following schemata both have order 4: **10*11* 1*0*1**1 A schema with a high order is more specific than one with a lower order.

Schemata (3) The fitness of a schema is defined as the average fitness of the chromosomes that match the schema. The fitness of a schema, S, in generation i is written as follows: f(S, i) The number of occurrences of S in the population at time i is : m(S, i)

The Effect of Reproduction on Schemata The probability that a chromosome c will reproduce is proportional to its fitness, so the expected number of offspring of c is: a(i) is the average fitness of the chromosomes in the population at time i If c matches schema S, we can rewrite as: c1 to cn are the chromosomes in the population at time i which match the schema S.

The Effect of Reproduction on Schemata Since: We can now write: This tells us that a schema that is fit will have more chance of appearing in a subsequent generation than less fit chromosomes.

The Effect of Crossover For a schema S to survive crossover, the crossover point must be outside the defining length of S. Hence, the probability that S will survive crossover is: This tells us that a short schema is more likely to survive crossover than a longer schema. In fact, crossover is not always applied, so the probability that crossover will be applied should also be taken into account.

The Effect of Mutation The probability that mutation will be applied to a bit in a chromosome is pm Hence, the probability that a schema S will survive mutation is: We can combine this with the effects of crossover and reproduction to give:

The Schema Theorem Holland’s Schema Theorem, represented by the above formula, can be written as: Short, low order schemata which are fitter than the average fitness of the population will appear with exponentially increasing regularity in subsequent generations. This helps to explain why genetic algorithms work. It does not provide a complete answer.

The Building Block Hypothesis Genetic algorithms manipulate short, low-order, high fitness schemata in order to find optimal solutions to problems.” These short, low-order, high fitness schemata are known as building blocks. Hence genetic algorithms work well when small groups of genes represent useful features in the chromosomes. This tells us that it is important to choose a correct representation.

Deception Genetic algorithms can be deceived by fit building blocks that happen not to combine to give the optimal solutions. Deception can be avoided by inversion: this involves reversing the order of a randomly selected group of bits within a chromosome.

Messy Genetic Algorithms (1) An alternative to standard genetic algorithms that avoid deception. Each bit in the chromosome is represented as a (position, value) pair. For example: ((1,0), (2,1), (4,0)) In this case, the third bit is undefined, which is allowed with MGAs. A bit can also overspecified: ((1,0), (2,1), (3,1), (3,0), (4,0))

Messy Genetic Algorithms (2) Underspecified bits are filled with bits taken from a template chromosome. The template chromosome is usually the best performing chromosome from the previous generation. Overspecified bits are usually dealt with by working from left to right and using the first value specified for each bit.

Messy Genetic Algorithms (3) MGAs use splice and cut instead of crossover. Splicing involves simply joining two chromosomes together: ((1,0), (3,0), (4,1), (6,1)) ((2,1), (3,1), (5,0), (7,0), (8,0)) ((1,0), (3,0), (4,1), (6,1), (2,1), (3,1), (5,0), (7,0), (8,0)) Cutting involves splitting a chromosome into two: ((1,0), (3,0), (4,1)) ((6,1), (2,1), (3,1), (5,0), (7,0), (8,0))

Evolving Pictures Dawkins used genetic algorithms with subjectives metrics for fitness to evolve pictures of insects, trees and other “creatures”. The human selection of fitness can be used to produce amazing pictures that a person would otherwise not be able to produce.

Co-Evolution In the real world, the presence of predators is responsible for many evolutionary developments. Similarly, in many artificial life systems, introducing “predators” produces better results. This process is known as co-evolution. For example, Ramps, which were evolved to sort numbers: “parasites” were introduced which produced sets of numbers that were harder to sort, and the ramps produced better results.