0% found this document useful (0 votes)
9 views

3 5-GeneticAlgorithms

Uploaded by

Sujithra Jones
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

3 5-GeneticAlgorithms

Uploaded by

Sujithra Jones
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

NPTEL

Video Course on Machine Learning

Professor Carl Gustaf Jansson, KTH

Week 3 Forms of Representation

Video 3.5 Genetic Algorithms


General characteristics of this
Representation

Genetic algorithms is a specific and early representative for a class of


computational models called Evolutionary Computing. As for all
efforts in evolutionary computing it is inspired by theories and models
from Evolutionary Biology.

Genetic algorithms are commonly used to generate global solutions


to optimization/search problems. Genetic algorithms are particularly
useful for problem domains that have a complex optimality landscape.

The simplest form of Genetic algoritms is based upon a representation


of chromosoms (data-items) as simple binary strings, with discrete
functions for evaluating fitness of the chromosoms and syntactically
defined breeding and mutation operators designed for the binary
strings.

More complex representations are possible but not treated in this


Interdisciplinary sources
of Inspiration for this
Representation

Genetic algorithms are inspired by


Darwinian evolutionary theory and ideas of
the survival of the fittest by natural
selection.
Core components of this Representation
The main idea is to start with an initial ´population´ of ´chromosoms´,
where each chromosome represents a potential solution to a problem.

The simplest representation of a chromosome is as a binary string, where


each position represents a ´gene´.

Typically a ´fitness´ function ranks the chromosoms. The goal of the


computation is to produce ´the fittest´ chromosom.
Problemsolving for
this Representation
The core computation cycle of a genetic
algorithm has the following main steps:
- Evaluating the fitness of all chromosoms
- Selecting a subset of the fittest for
survival to next generation
- Mating pairs of chromosoms to generate
children to restore the epopulation size
Mating is carried out through Crossover
- Mutate a subset of chromosoms
- Re-establish a full new generation.
Core components of this Representation
cont.
A Fitness Function (Object or Evaluation Function)
evaluates how close a given solution is to the optimum
solution of the desired problem.

Common sense requirements on a fitness function:


• The fitness function should be clearly defined.
• The fitness function should generate intuitive results.
• The fitness function should be implemented efficiently.
• The fitness function should produce a quantitative measure
(real value) that discriminates the chromosoms as much as
possible.
Core components of this
Representation revisited
New chromosoms can be generated from parent
chromosoms through Crossover (mating) and Mutation
operations.

Crossover operation
Single-point crossover
A point on both parents' chromosomes is picked randomly, and
designated a 'crossover point'. Bits to the right of that point are
swapped between the two parent chromosomes. This results in two
offspring, each carrying some genetic information from both
parents.
.
Mutiple-point crossover
In two-point crossover, two crossover points are picked randomly
from the parent chromosomes. The bits in between the two points
are swapped between the parent organisms. This can be generalized
to k-point.
Mutation operation
The mutation of bit strings means bit flips at random
positions.
e.g. 1 0 1 0 0 -> 1 0 1 0 1
Problemsolving for this Representation cont.
The binary representation genetic programming scheme
is very simple, straightforward and appealing,
...but there are some drawbacks:

1. It is crucial and non-trivial how the features of a problem are


mapped to binary string

2. The choice of fitness function is absolutely crucial

3. The crossover and mutation operators need to be constrained to


what is meaningful from a problem domain point of view.

4. A lot of parameters (hyper parameters) have to be set to adjust


the behaviour of the computation (size of reproduction subset,
mutation frequency, cross-over policies etc.)

4. The amount of computations needed are typically immense.


Example 3
Example 4
Eight queens problem
Example 3 Finding the maximum for f(x)=-x^2+15x
Learning for this Representation = Classifier System

Genetic algorithms can be used in several ways to enable


Machine Learning.

The classical approach is called Classifier Systems:


- Problemsolving Solving Rules (Classifiers) are mapped onto
genetic algorithm binary strings
- In a separate systems module every generation of the population of
classifiers is applied to a specific problem given as input to the system
typically in the fashion of a rule-based system
- Classifier applications in the problem solving and re-inforcement feedback is designed
so that credit and blame can be given to individual contributing classifiers (bucket brigade algorithm)
- The feedback to the individual classifiers forms the basis for fitness
evaluation of the population of classifiers
- For the rest, the normal Genetic algorithm machinery is run.
Learning for this Representation
NPTEL

Video Course on Machine Learning

Professor Carl Gustaf Jansson, KTH

Thanks for your attention!

The next lecture 3.6 will be on the topic:

Logic Programming

You might also like