2. Genetic Algorithms
• Genetic algorithms are a part
of evolutionary computing, which is
a rapidly growing area of artificial
intelligence.
• It is a search-based optimization
technique based on the principles
of Genetics and Natural Selection
(Survival of the Fittest).
• It is frequently used to find optimal
or near-optimal solutions to difficult
problems which otherwise would
take a lifetime to solve.
3. Ant Colony Optimization
• Real ants follow a path between
nest and food source.
• An obstacle appears on the path:
• Ants choose whether to turn left or
right with equal probability.
• Pheromone is deposited more
quickly on the shorter path.
• All ants have chosen the shorter
path.
4. Genetic Algorithms-A Biological
Background
• All living organisms consist of
cells.
• In each cell there is the same
set of chromosomes.
• Chromosomes are strings
of DNA and serves as a model
for the whole organism.
• DNA carrying genetic
instructions for the
development, functioning,
growth and reproduction of
all known organisms.
6. Outline of the Basic Genetic
Programming
• Step 1 Generate random population of n chromosomes (suitable solutions for the
problem)
• Step 2 Evaluate the fitness f(x) of each chromosome x in the population
• Step 3 Create a new population by repeating following steps until the new
population is complete
– Select two parent chromosomes from a population according to their fitness
(the better fitness, the bigger chance to be selected)
– With a crossover probability cross over the parents to form a new offspring
(children). If no crossover was performed, offspring is an exact copy of
parents.
– With a mutation probability mutate new offspring at each locus (position in
chromosome).
– Place new offspring in a new population
• Step 4 Use new generated population for a further run of algorithm
• Step 5 If the end condition is satisfied, stop, and return the best solution in current
population
• Step 6 Go to step 2
7. Representation
• Expressed as Syntax trees rather than lines of
code.
• Variables and constants are the leaves of the
trees, which are called Terminals, while the
arithmetic operations are called Functions.
• The Root node acts as a glue
19. Merits of Genetic Programming
• After the termination criteria is satisfied the
single best program in population produced is
the solution.
• It saves time by freeing the human from
having to design complex algorithms.
• Not only designing the algorithms but
creating ones that give optimal solutions.