Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
83 views

Genetic Algorithm: Manu Dev Hembrom

Genetic algorithms are a type of evolutionary algorithm used to find approximate solutions to optimization and search problems. They work by encoding potential solutions into a genetic representation and using processes like selection, crossover and mutation to generate new solutions. A fitness function evaluates the solutions and selects the best ones to pass on their genes to the next generation. Genetic algorithms were developed in the 1970s by John Holland and have been successfully applied to problems like the traveling salesman problem, where they can find near-perfect solutions in minutes by evolving random tours into optimal routes.

Uploaded by

Manu Dev
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
83 views

Genetic Algorithm: Manu Dev Hembrom

Genetic algorithms are a type of evolutionary algorithm used to find approximate solutions to optimization and search problems. They work by encoding potential solutions into a genetic representation and using processes like selection, crossover and mutation to generate new solutions. A fitness function evaluates the solutions and selects the best ones to pass on their genes to the next generation. Genetic algorithms were developed in the 1970s by John Holland and have been successfully applied to problems like the traveling salesman problem, where they can find near-perfect solutions in minutes by evolving random tours into optimal routes.

Uploaded by

Manu Dev
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

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

Genetic algorithms became a widely recognized

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.

Genetic Algorithmic Process 5


Potential solution for problem domains are

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

Initial population must be a representative sample

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

Each member of the population can be seen as

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

Genetic Algorithm Flowchart

Application

File allocation for a distributed system. . Software engineering.

Traveling Salesman Problem.

Disadvantages :

Involves longer running times on the

computer. Fortunately, this disadvantage continues to be minimized by the ever-increasing processing speeds of today's computers.

Travelling salesman problem


This application is an attempt to solve the

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.

Mathematical Attempts at TSP


Testing every possibility would require N!

separate additions For a 15 city tour:


15! = 1.31 x 1012 separate calculations Assuming 1 million calculations per second 15.2 days

Increasing complexity

1.

Generates a near-perfect solution in minutes Steps:


Create group of random tours

Solving TSP using GA

Stored as sequence of numbers (parents) Combine and create new sequences (children)

2.

Choose 2 of the better solutions

Problems here:

City 1 repeated in Child 1 City 5 repeated in Child 2

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.

You might also like