210 likes | 227 Views
COMP305. Part II. Genetic Algorithms. Topic 2. Computational appeal of the Genetic Algorithms. Darwinian theory of Evolution (macroscopic). Species adapt to the environment via natural selection .
E N D
COMP305. Part II. Genetic Algorithms. Genetic Algorithms
Topic 2. Computational appeal of the Genetic Algorithms. Genetic Algorithms
Darwinian theory of Evolution (macroscopic). • Species adapt to the environment via natural selection. • The selection favors those species for survival and further evolution that are best adapted to the environmental condition – “survival of the fittest”. • Phenotypeis the manner of response and physical embodiment of an individual. • There occur small, apparently random and undirected variations between the phenotypes of parents and their offspring. • These mutations prevail through selection, if they prove their worth in light of the current environment; otherwise they perish. Genetic Algorithms
NeoDarwinism - synthetic theory of Evolution(microscopic). • Genes are transfer units of heredity, andgenotype is the total genetic information of an individual. • Selection acts on an individual, thusan individual is a selection unit. • Population is the evolving unit. It confines a common gene pool including genotypes of all individuals. Modern biochemistry and genetics explain microscopic mechanisms of heredity. Genetic Algorithms
Natural Evolution. What is the Fitness ? • Individual fitness is measured indirectly as the individual growth rate in comparison to others. The fitness is the individualpropensity to survive and reproduce in a particular environment. • Thus, Natural Selection according to the individual fitness • is NOT an active driving force, • ISdifferential survival and reproduction within a population. • SO, what is the fitness? • I mean, can we • map a given genotype into the corresponding phenotype and • map the phenotype into the individual fitness to survive and reproduce? • Not, actually… • But the idea is so beautiful... Genetic Algorithms
Natural Evolution. Computational appeal. =forecast ? 1 • SO, what is the fitness? • I mean, can we • map a given genotype into the corresponding phenotype and • map the phenotype into its fitness ? • Question: How does Nature solve the problem? Genotype Phenotype ? =testing 2 Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • SO, what is the fitness? • I mean, can we • map a given genotype into the corresponding phenotype and • map the phenotype into its fitness ? • Question: • How does Nature solve the problem? … Genotype Genotype ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • SO, what is the fitness? • I mean, can we • map a given genotype into the corresponding phenotype and • map the phenotype into its fitness ? • Question: • How does Nature solve the problem? … Genotype Genotype The Nature does it in parallel !!! ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • SO, what is the fitness? • I mean, can we • map a given genotype into a corresponding phenotype and • map the phenotype into the fitness ? … Genotype Genotype The Nature does it in parallel !!! ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Coming up with better fitted population: Genetic Algorithms
Natural Evolution. Computational appeal. • Parallelism. • Adaptation to a changing environment. • Optimisation. … Genotype Genotype The Nature does it in parallel and comes up with better fitted population. ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • Parallelism. Every individual in the population is tested independently in parallel with the others, and that speeds up evolution of the population. • Adaptation to a changing environment. • Optimisation. … Genotype Genotype The Nature does it in parallel and comes up with better fitted population. ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • Parallelism. • Adaptation to a changing environment. Due to the natural selection, only those individuals best fitted for the current environment do survive. The selection results in the population as a whole best adapted to the environment. • Optimisation. … Genotype Genotype The Nature does it in parallel and comes up with better fitted population. ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • Parallelism. • Adaptation to a changing environment. • Optimisation. Due to the natural selection, only individuals best fitted or “optimal” for the current environment do survive and reproduce. Thus, the selection also performs optimisation on an individual level. … Genotype Genotype The Nature does it in parallel and comes up with better fitted population. ?=forecast Phenotype Phenotype ?=testing … Fitness Fitness Genetic Algorithms
Natural Evolution. Computational appeal. • Parallelism. • Adaptation to a changing environment. • Optimisation. The listed features of the natural selection are very attractive for many problems in computer science. As these parallelism, adaptation, and optimisation are achieved in nature by very simple manipulation of individual DNA sequences, it is tempting to use the algorithm for non-bio problem solving in engineering, computer science, etc. Genetic Algorithms
Genetic Algorithms. Historical Introduction. By 1950s, it became clear that ifa solution of a computational problem might be formulated, i.e. coded, in a form of string of “characters”, then the optimal solution to the problem might be searched for using the natural selection technique among a “population”, i.e. set of candidate solutions. Genetic Algorithms
Genetic Algorithms. Historical Introduction. 1950s-1960s - several computer scientists independently studied evolutionary systems with the idea to use the algorithm to solve optimisation problems in engineering. 1960s – Rechenberg introduced “evolutionary strategies” as a method to optimise real-valued parameters for airfoils 1966 – Fogel, Owens, and Walsh developed “evolutionary programming”. They represented candidate solutions to a problem as a finite-state machines evolving by randomly mutating their state-transition diagrams and selecting the fittest. Genetic Algorithms
Genetic Algorithms. Historical Introduction. 1960s – Genetic Algorithms (GAs) were invented by John Holland of Michigan University and further developed by his students, colleagues, and himself in the 1960s and 1970s. In contrast with “evolutionary strategies” and “evolutionary programming”, Holland was not interested in finding solutions to particular problems, but rather formally studied the phenomenon of adaptation as it occurs in nature and how the algorithm might be used in the computer systems. 1975 – Holland’s book “Adaptation in Natural and Artificial Systems” presented the genetic algorithm as an abstraction of natural evolution and gave a theoretical framework for adaptation under GA. Genetic Algorithms
GAs by John Holland. Holland introduced a “population” of binary strings which he called “chromosomes”. The “population” evolves using kind of “natural selection” together with the genetics-inspired operators of crossover, mutation, and inversion. Bits in a “chromosome” represent genes, and each “gene” is an instance of a particular “allele”, 0 or 1. The selection operator chooses those chromosomes in the population that will be allowed to reproduce, and on average the fitter chromosomes produce more offspring than the less fit ones. Crossoverexchange subparts of two chromosomes Mutation randomly changes the allele values at some locations in the chromosome. Inversion reverses the order of a contiguous section of the chromosome rearranging the genes order. Genetic Algorithms
Coding for Genetic Algorithms. • In contrast with Nature, • there is no universal code in GAs, • every coding is problem dependent. • The art of coding, though left beyond the scope, is very important in Genetic Algorithms, as from the very beginning the approach depends on whether or not the problem can be coded as a string of characters at all. • The above implies serious restrictions on the class of problems capable of solving by GAs. Genetic Algorithms