Genetic Algorithm: Manu Dev Hembrom
Genetic Algorithm: Manu Dev Hembrom
DEFINATION
A genetic algorithm (or short GA) is a search
technique used in computing to find true or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms.
HISTORY
optimization method as a result of the work of John Holland in the early 1970s .
PROCEDURE
A typical genetic algorithm requires two things to be defined: a genetic representation. a fitness function.
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
6 Initialization
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
7 Evaluation
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 magic ways to create them)
Selection 8
Want to give preference to better individuals
to add to mating pool 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 9
In sexual reproduction the genetic codes of both
parents are combined to create offspring A sexual 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
Mutation 10
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 intelligence Example: The occasional (low probably) alteration of a bit position in a string
Application
Disadvantages :
computer. Fortunately, this disadvantage continues to be minimized by the ever-increasing processing speeds of today's computers.
Traveling Salesman Problem with a genetic algorithm. This algorithm creates a number of full solutions, measures their comparative finesses, and selects the best ones for a new generation of solutions, while also featuring genetic mutation, and immigration features.
15! = 1.31 x 1012 separate calculations Assuming 1 million calculations per second 15.2 days
Increasing complexity
1.
Stored as sequence of numbers (parents) Combine and create new sequences (children)
2.
Problems here:
Conclusion
Evolutionary algorithms have been around since the early sixties. They apply the rules of nature: evolution through selection of the fittest individuals, the individuals representing solutions to a mathematical problem. Genetic algorithms are so far generally the best and most robust kind of evolutionary algorithms.