This action might not be possible to undo. Are you sure you want to continue?

# Genetic Algorithm

Surma Mukhopadhyay

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 that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and recombination.

HISTORY • Computer simulations of evolution started with Nils Aall Barricelli in 1954. Barricelli was simulating the evolution of automata that played a simple card game. . • Although Barricelli had also used evolutionary simulation as a general optimization method. genetic algorithms became a widely recognized optimization method as a result of the work of John Holland in the early 1970s .

and these algorithms are now used by a majority of Fortune 500 companies to solve difficult scheduling. The New York Times writer John Markoff wrote about Evolver. As academic interest grew. In 1989. Custom computer applications began to emerge in a wide variety of fields. and virtually any other type of combinatorial optimization problem. trend spotting and budgeting problems. the dramatic increase in desktop computational power allowed for practical application of the new technique. when The First International Conference on Genetic Algorithms was held at The University of Illinois. the first commercially available desktop genetic algorithm.HISTORY continue: • Research in GAs remained largely theoretical until the mid-1980s. data fitting. .

. • a fitness function to evaluate the solution domain.G A PROCEDURE A typical genetic algorithm requires two things to be defined: • a genetic representation of the solution domain.

and many scheduling software packages are based on GAs. GAs have also been applied to engineering Genetic algorithms are often applied as an approach to solve global optimization problems. • As a general rule of thumb genetic algorithms might be useful in problem domains that have a complex fitness landscape as recombination is designed to move the population away from local optima that a traditional hill climbing algorithm might get stuck in.PROBLEM DOMAINS • Problems which appear to be particularly appropriate for solution by genetic algorithms include timetabling and scheduling problems. .

What Do We Mean By Genetic Algorithm? • It is started with a set of randomly generated solutions and recombine pairs of them at random to produce offspring. . • Only the best offspring and parents are kept to produce the next generation.

It Is A Search Technique .

Genetic Algorithm Flow Chart .

known as Evolvable hardware. • Design of water distribution systems. using the GA to search large solution spaces of ciphers for the one correct decryption.Applications : • Artificial Creativity. . • Automated design of mechatronic systems using bond graphs and genetic programming (NSF). • Distributed computer network topologies. • Electronic circuit design. • Code-breaking.

• Software engineering. • Traveling Salesman Problem. • Mobile communications infrastructure . • JGAP: Java Genetic Algorithms Package. also includes support for Genetic Programming . • File allocation for a distributed system.Application : continue. • Representing rational agents in economic models such as the cobweb model.

We can use these algorithms for problems that are difficult to solve with traditional optimization techniques. including problems that are not well defined or are difficult to model mathematically. .An Example Of GA Application • The Genetic Algorithm and Direct Search Toolbox extends the optimization capabilities in MATLAB (A numerical computing environment specially for engineering field)and the Optimization Toolbox with tools for using the genetic and direct search algorithms.

Genetic Algorithm Presenting Generation Cycle .

no known method exists of finding the shortest route without some measure of bruteforce trial-and-error . in fact.Travelling Salesman Problem The traveling salesman problem is a simple problem: given a 2D graph of cities. NP-complete: while many algorithms can produce a very good route. what is the shortest circuit .the shortest route that visits each city exactly once? The triviality of this task is deceptive: it is.

the algorithm borrows from the process of biological evolution in order to "evolve" a very good solution for the Traveling Salesman Problem in a short timeframe. This algorithm creates a number of full solutions. • This application is an attempt to solve the Traveling Salesman Problem with a genetic algorithm. while also featuring genetic mutation. and immigration features. measures their comparative finesses. and selects the best ones for a new generation of solutions. In this way. .Travelling salesman problem Continue.

but is a random guided search. capable of intelligently tracking down the global optimum solution. we may have a more difficult time in coming up with a better solution than the computer program.Genetic Optimization With genetic algorithm optimization. the weakest candidates are eliminated from the gene pool. . The genetic algorithm does not examine every single timing plan candidate either. and each successive generation of individuals contains stronger and stronger characteristics. and the unique processes of crossover and mutation conspire to keep the species as strong as possible. As with the human race. It’s survival of the fittest.

As a result.Genetic Algorithm Approach Ultimately this search procedure finds a set of variables that optimizes the fitness of an individual and/or of the whole population. the GA technique has advantages over traditional non-linear solution techniques that cannot always .

Pseudo-code For Genetic Algorithm • Initialize the population : Evaluate initial population— Repeat— Perform competitive selection : Apply genetic operators to generate new solutions : Evaluate solutions in the population : Until some convergence criteria is satisfied . .

Genetic Algorithm : Concept of Crossover .

crossover is a genetic operator used to vary the programming from one generation to the next. • In genetic algorithms. . It is an analogy to reproduction and biological crossover. upon which genetic algorithms are based.Crossover continue.

Schema Analysis • In this analysis we assume that the GA is a way of processing genotype features rather then genotypes themselves . An example is: *10**0**** -------This schema has ten characters in all. A particular feature is defined in terms of a schema. This is a genotype-like string with specific values in some positions and `don't care' values (asterisks) in others. It will match any 10-character genotype with a 1 in the second position. a 0 in the third position and a 0 .a feature being simply a set of values in specific positions. including seven "don't care" values.

. If this were not the case it would be meaningless to talk about a "building-block process" operating over and above the usual evolutionary process.Building Block Hypothesis • The building-block hypothesis assumes that the fitness of any one block is typically affected by the other blocks on the genotype. Thus the building-block hypothesis implicitly assumes only a positive effect of epistasis on fitness and thus contradicts the low-epistasis assumption introduced by the schema theorem.

Building Block Hypothesis continiue. .

Advantages : A GA has a number of advantages. #It can quickly scan a vast solution set. # Bad proposals do not effect the end solution negatively as they are simply discarded. . #The inductive nature of the GA means that it doesn't have to know any rules of the problem it works by its own internal rules. #This is very useful for complex or loosely defined problems.

. this disadvantage continues to be minimized by the ever-increasing processing speeds of today's computers.Disadvantages : • A practical disadvantage of the genetic algorithm involves longer running times on the computer. Fortunately.

the individuals representing solutions to a mathematical problem.Conclusion Evolutionary algorithms have been around since the early sixties. They apply the rules of nature: evolution through selection of the fittest individuals. Genetic algorithms are so far generally the best and most robust kind of evolutionary algorithms. .