Presentation on theme: "Representing Hypothesis Operators Fitness Function Genetic Programming"— Presentation transcript:
1 Representing Hypothesis Operators Fitness Function Genetic Programming Genetic AlgorithmsIntroductionRepresenting HypothesisOperatorsFitness FunctionGenetic ProgrammingModels of Evolution and LearningWhat is machine learning?
2 Population concentrates in a small region of the search space. CrowdingA problem in genetic algorithms where one individual is much more fit than others. The population then begins to concentrate around this individual and variations of it. Population diversity is then reduced.What is machine learning?F(X)XPopulation concentrates in a small regionof the search space.
3 Fitness sharing (similar individuals see their fitness value reduced). A Solution to CrowdingOne solution is to change the selection function, using for example rank selection. In the case where an individual is better fit than others, the ranking would not show the magnitude of the difference.Other solutions:Fitness sharing (similar individuals see their fitnessvalue reduced).b. Spatially distribute individuals and only allow nearbyindividuals to recombine.c. Restrict certain kinds of individuals to recombine.What is machine learning?
4 To do this let’s begin with the concept of a schema. The Schema TheoryCan we characterize mathematically the evolution of a population over time?To do this let’s begin with the concept of a schema.A schema is a pattern over a sequence of bits represented using 0, 1, or * for don’t care.Example:0*10 is the set of all sequences with 010 in the 1st, 3rd, and 4rd positions.What is machine learning?
5 The theory tells us what to expect of m(s,t+1). The Schema TheorySchema theory tells us how each schema in the population evolves through time.Let m(s,t) be the number of instances representing schema s at time or step t.The theory tells us what to expect of m(s,t+1).We start by remembering what is the probability of selecting a hypothesis h:P(hi) = Fitness (hi) / Σj Fitness (hj)What is machine learning?
6 The probability can be expressed similarly as The Schema TheoryThe probability can be expressed similarly asP(hi) = f (hi) / n f’ (ti)Where f(hi) is the fitness of hi (for short) and f’(t) is themean of the fitness value for all hypotheses in the populationat time t.Now let us define the mean of the fitness value of the membersof schema s in the following way:u(s,t) = Σ f(h) / m(s,t)Where the sum goes through only those hypotheses in schema s.What is machine learning?
7 E[ m(s, t+1) ] = ( u(s,t) / f’(t) ) m(s,t) The Schema TheoryThen the expected value of the number of instances in schema s at time t+1 is:E[ m(s, t+1) ] = ( u(s,t) / f’(t) ) m(s,t)which means the value is proportional to the average fitness of those individuals in schema s at time t and inversely proportional to the average fitness of all individuals at time t.The theory provides a more general formulation based on the effect of crossover and mutation.What is machine learning?
8 Genetic programming is a form of evolutionary computation in which the individuals in the population are computer programs.Programs are normally represented by trees. A program is executedby parsing the tree. Example:+F = sin(x) + sqrt( x^2 + y)What is machine learning?Sin sqrtx^ yx 2
9 To apply genetic programming one has to define the functions VocabularyTo apply genetic programming one has to define the functionsthat can be applied:Example: sin, cos, sqrt, +, -, etc.A genetic programming algorithm explores the space ofcombinations of these functions.The fitness of an individual is determined by executingthe program on a set of training data.What is machine learning?
10 The crossover operator is performed by replacing subtrees of one program with subtrees of another program.++Sin ^Sin sqrt2xx yWhat is machine learning?x^ yx
11 Cross Over: Result + + Sin ^ Sin sqrt 2 x ^ x y x + + y x 2 What is machine learning?xyx
12 Learning an algorithm for stacking blocks: An ExampleLearning an algorithm for stacking blocks:NESWhat is machine learning?RV U L A ILearn an algorithm to stack the blocks so that itreads “UNIVERSAL”
13 The only valid operations are An ExampleThe only valid operations aremove a block from the stack to the surface of the tablemove a block from the surface of table to the stackThe primitive functions areCS (current stack) returns the name of the block on top of the stack.TB (top current block) returns the name of the topmost block whereall blocks and itself are in correct order.c. NN (next necessary) name of the block needed above TB to readthe word “UNIVERSAL”.What is machine learning?
14 Additional functions are An ExampleAdditional functions are(MS x) move block x to stack if x is on table.(MT x) move block x to table if x is on the stack.(EQ x y) returns true if x = y.(NOT x) returns the complement of x.DO( x y) do x until expression y is trueWhat is machine learning?
15 What is the fitness value? An ExampleWhat is the fitness value?In this experiment the author provided 166 different examples havingeach different initial block configurations. The fitness of a program ishow many problem were correctly solved by the program.Initial population = 100 programsAfter 10 generations the genetic programming strategy found thefollowing program:(EQ (DU (MT CS)(NOT CS)) (DU (MS NN)(NOT NN)) )which solved all 166 programs correctly.What is machine learning?
16 Designing filter circuits. Another ExampleDesigning filter circuits.Programs are evolved to transform a fixed circuit into afinal circuit design. Primitive functions:Insert circuit componentsDelete circuit componentsFitness: measure how well the design meets the specificationsPopulation size = 640,000What is machine learning?
17 Models of Evolution and Learning What is the relationship between what one individual learns duringhis lifetime compared to what evolution learns as the populationevolves?Lamarckian Evolution:Lamarck (late 19th century) hypothesized that the experience ofan individual during its lifetime affects the characteristics of itsoffspring.But evidence points to the contrary: the genetic makeup of anindividual is unaffected by the experience of its parents.What is machine learning?
18 The Baldwin effect relies on the following: After J. M. Baldwin (1986).The Baldwin effect relies on the following:If the environment is continually changing, those individualscapable of learning and adapting quickly to the environmentwill have greater advantage compared to other individuals.Those individuals who can learn and adapt quickly will haveless dependence on the genetic code and will help to achievemore rapid evolutionary adaptation.What is machine learning?
19 Parallel Genetic Agorithms It seems very natural to produce a parallel version of genetic algorithms.Some approaches divide the population into groups called demes.Each deme resides on a computational node, and a standard search iscarried out on each node.There is communication and combination among demes but theseare rare compared to those occurring within demes.What is machine learning?
20 Genetic algorithm do a parallel, hill climbing search looking SummaryGenetic algorithm do a parallel, hill climbing search lookingto optimize a fitness function.The search resembles the mechanism of biological evolution.Genetic algorithms have many application outside machinelearning. In machine learning the goal is to evolve a populationof hypotheses to find the hypothesis with highest accuracy.Genetic programming is similar to genetic algorithms but whatwe evolve is computer programs.What is machine learning?