Genetic Operators
200 likes | 322 Vues
This overview explores key genetic operators used in evolutionary computation, including reproduction, crossover, mutation, permutation, editing, encapsulation, decimation, inversion, hoisting, creation, compression, and expansion. Each operator plays a vital role in maintaining genetic diversity and facilitating the evolution of solutions within a population. The processes involve selecting parents, manipulating subtrees, and applying various techniques to refine and enhance individuals in each generation, contributing to the overall effectiveness of genetic algorithms and programming methods.
Genetic Operators
E N D
Presentation Transcript
Genetic Operators • Reproduction • Crossover • Mutation • Permutation • Editing • Encapsulation • Decimation • Inversion • Hoist • Create • Compress • Expand
Reproduction • A parent is chosen from the population (using one of the selection methods). • The individual is copied into the next generation. • The fitness of the individual does not have to be calculated.
Crossover • Two parents are selected from the population. • A crossover point is selected in each individual randomly. • The subtrees rooted at the crossover points are swapped. • In some cases the crossover operator can be reduced to mutation or reproduction. • A limit is usually set on the offspring size. • Variations of crossover
Crossover Example Crossover Fragments
Mutation • A parent is selected from the population. • A mutation point is selected at random. • The subtree rooted at this point is removed and replaced with a newly created subtree (could be a terminal). • Variations of mutation. • Can be reduced to reproduction. • Is used to maintain genetic diversity.
Permutation • A parent is chosen from the population. • A function node is randomly selected. • A permutation of the function arguments is randomly selected. • If the arity of the function node is two, the arguments are merely swapped.
Editing • Is used to remove redundant code. • A parent is selected. • Examples • (+ 1 2 ) will be replaced by 3 • (/ x 1) will be replaced with x • (AND T T) will be replaced with T • GP Parameters • A frequency parameter Effect on Diversity
Encapsulation • Selection a parent. • Select a function node at random. • Remove the subtree rooted at this node. • This subtree forms the a new function and is given a label, e.g. E0, E1, etc. • The new function is added to the terminal set as it does not have arguments.
Decimation • Is to prevent loss of genetic diversity. • A percentage of the population is deleted during the specified generations. • Usually starts with a larger population. • GP parameters • Application rate • Frequency Rate
The Inversion Operator • Select a parent. • Select two subtrees randomly. • Swap the subtrees. • Subtrees to be swapped must not be contained in each other
Hoist • Select a parent. • Randomly select a subtree within a the parent. • Copy the subtree into the next generation. • Example:
Create • A new tree is created using initial population generation and added to the next generation. • Maintain genetic diversity.
Compress • Select a parent. • Select a subtree. • The part of the subtree up until a certain depth is defined as a new function. • The nodes below the level of the cut-off depth are considered as arguments to the module. • The module is named and added to the function set. • GP Parameters • Cut-off depth
Compress: Example Cut-off Depth = 1 Arity=2
Expand • Select a parent that contains a function node created by the compression operator. • Replace the function node with its corresponding subtree.