Genetic Algorithm

hostitchAI and Robotics

Oct 23, 2013 (3 years and 5 months ago)

63 views

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 .



HISTORY
continue:


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

G A PROCEDURE

A typical genetic algorithm requires two
things to be defined:


a genetic representation of the solution
domain.


a fitness function to evaluate the solution
domain.

PROBLEM DOMAINS


Problems which appear to be particularly
appropriate for solution by genetic algorithms
include timetabling and scheduling problems,
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.

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

Applications :


Artificial Creativity.


Automated design of mechatronic systems
using bond graphs and genetic programming
(NSF).


Code
-
breaking, using the GA to search large
solution spaces of ciphers for the one correct
decryption.


Design of water distribution systems.



Distributed computer network topologies.


Electronic circuit design, known as Evolvable
hardware.



Application :
continue.


File allocation for a distributed system.


JGAP: Java Genetic Algorithms Package,
also includes support for Genetic
Programming .


Representing rational agents in economic
models such as the cobweb model.


Software engineering.


Traveling Salesman Problem.


Mobile communications infrastructure
optimization.




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. 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.

Genetic Algorithm Presenting
Generation Cycle

Travelling
Salesman
Problem

The traveling salesman
problem is a simple
problem: given a 2D
graph of cities, what is
the shortest circuit
-

the
shortest route that visits
each city exactly once?
The triviality of this task
is deceptive: it is, in fact,
NP
-
complete: while
many algorithms can
produce a very good
route, no known method
exists of finding the
shortest route without
some measure of brute
-
force trial
-
and
-
error
computation.


Travelling salesman problem
Continue.


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. In
this way, 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.


Genetic
Optimization

With genetic algorithm
optimization, we may have a
more difficult time in coming up
with a better solution than the
computer program.

The
genetic algorithm does not
examine every single timing
plan candidate either, but is a
random guided search,
capable of intelligently tracking
down the global optimum
solution.

As with the human
race, the weakest candidates
are eliminated from the gene
pool, and each successive
generation of individuals
contains stronger and stronger
characteristics.

It’s survival of
the fittest, and the unique
processes of
crossover

and
mutation

conspire to keep the
species as strong as possible.



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. As a
result, the GA
technique has
advantages over
traditional non
-
linear
solution techniques
that cannot always
achieve an optimal
solution.

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
continue.


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


Schema Analysis


In this analysis we assume that the GA is a way
of processing genotype
features

rather then
genotypes themselves
-

a feature being simply a
set of values in specific positions. 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. An example is:


*10**0****
-------
This schema has ten characters
in all, including seven "don't care" values. It will
match any 10
-
character genotype with a 1 in the
second position, a 0 in the third position and a 0
in the sixth position.

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. 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. 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.


Disadvantages :


A practical disadvantage of the genetic
algorithm involves longer running times on
the computer.

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



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.