48 views

Uploaded by Firas Mohammed

- IJOPCM(vol.2.4.12.D.9)
- A Hybrid System Composed of Neural Networks and Genetic Algorithms
- Scheduling in Job Shop Process Industry
- Genetic Algorithm based Analysis of Rigid and Non Rigid Medical Images
- dp0241.pdf
- Genetic Algorithms 01
- Optimizing the reservoir operating rule curves by genetic algorithms
- IRJET-A Review Paper On “Particle Swarm Optimization and Genetic Algorithm Techniques For System Stability”
- Early Theories of Evolution2
- A_More_Developed_Sign.pdf
- cap observation form 1 announced polizzoitti
- Using Genetic Algorithm to Do Quality Control
- ControleOtimo_AlgoritmosGeneticos.pdf
- Heuristic Algorithm for Constrained 3D Container Loading Problem: A Genetic Approach
- ap biology chapter 22 darwin
- Genetic Algorithm and a Particle Swarm Optimizer
- abbott unit outline
- What I See Emerging
- 2001Maize, Matrilocality, Migration, And Northern Iroquoian Evolution.
- Survey Optimization Probabilistic Models AIJ

You are on page 1of 65

Genetic Algorithms:

Basic notions and some advanced topics

Francisco Herrera

Grupo de Investigación

“Soft Computing y Sistemas de Información Inteligentes”

Universidad de Granada

18071 – ESPAÑA

herrera@decsai.ugr.es

http://sci2s.ugr.es

Genetic Algorithms:

Basic notions and some advanced topics

SESSIONS

b. Advanced topics

Multimodal problems and multiple solutions

Multiobjective genetic algorithms

Memetic algorithms

Genetic Learning

Session a.

Genetic Algorithms

2. HOW TO CONSTRUCT THEM?

3. ON THE USE OF GENETIC ALGORITHMS

4. MODELS: GENERATIONAL VERSUS STEADY STATE

5. APPLICATIONS

6. EXAMPLE: TSP

7. SOFTWARE AND IMPLEMENTATIONS

8. CONCLUDING REMARKS

1. GENETIC ALGORITHMS.

INTRODUCTION

THE INGREDIENTS

What is a genetic algorithm?

Genetic algorithms

search

and learning

inspired in the process of

Natural and Genetic

Evolution

What is a genetic algorithm?

Natural Evolution

What is a genetic algorithm?

Artificial Evolution

EVOLUTIONARY COMPUTATION

based on populations whose individuals

represent solution to problems.

What is a genetic algorithm?

Artificial Evolution

There are 4 classic paradigms: John Holland

Inventor of genetic

algorithms

Professor of CS

Genetic Algorithms. 1975, Michigan University and Psychology at

the U. of Michigan.

Evolution

Strategies

Hans-Paul Schwefel Bionics & Evolutiontechnique

Universität Dortmund Technical University Berlin

http://www.bionik.tu-berlin.de/

Lawrence J. Fogel,

Natural Selection, Inc.

Inventor of Evolutionary

Programming

Stanford University.

Inventor of Genetic

Programming

F. Herrera - Introduction to Genetic Algorithms 8

Thre exist other modelos based on population evolution

What is a genetic algorithm?

Artificial Evolution

The ingredients

t reproduction t+1

selection

mutation

Crossover

(or recombination)

The evolution cycle

Selection

PARENTS

Crossover

Mutation

POPULATION

Replacement

DESCENDANTS

Genetic Algorithm Structure

Beginning (1)

t=0

Initialization P(t)

evalution P(t)

While (the stop contition is not verified) do

Beginning (2)

t=t+1

selection P’(t) from P(t-1)

P’’(t) ← crossover P’(t)

P’’’(t) ← mutation P’’(t)

P(t) ← replacement (P(t-1),P’’’(t))

evaluation P(t)

Final(2)

Final(1)

F. Herrera - Introduction to Genetic Algorithms 12

2. HOW TO CONSTRUCT A GA?

PE LEM

T

EN

Representation

ND

DE OB

Initial population

PR

Fitness function (How to evaluate a GA?)

Chromosomes selection for parents

Design of crossover operator

ON THM

TS

EN

Design of mutation operator

I

CO GOR

Chromosomes replacement

MP

Stop condition

AL

Representación

according to the evaluation and genetic the

operators.

Example: Binary representation

CHROMOSOME

GEN

F. Herrera - Introduction to Genetic Algorithms 15

Example: Binary representation

Fenotype

8 bits genotype • integer

• real number

•

• ...

• ¿Others?

Example: Real coding

real valued vector:

⎡ x1 ⎤

⎢x ⎥

X= ⎢ 2⎥

, xi ∈ R

⎢M⎥

⎢ ⎥

⎣ xn ⎦

The evaluation function associates a real

value to a vector:

f :R n → R

F. Herrera - Introduction to Genetic Algorithms 17

Example: Order representation

permutations.

Ej. Travelling salesman problem (TSP), ...

It needs special operators for obtaining a new

permutation.

Initialization

Binary string: 0 or 1 with probability 0.5

Real value: uniform on the interval

chromosomes.

Fitness function

Subrutine, simulator or other external processes (ej.

Robot experiment, ...)

It is possible to use an approximation function

(reducing the cost)

Constraint problems can introduce a penalization in

the fitness function.

dominated solutions).

HOW TO CONSTRUCT A GA?

Selection

PARENTS

Representation

Initialization

Population

Chromosomes selection

possibility for being parents.

reproduction. They can include useful genetic information in

the reproduction process.

degree of influence of the best individuals.

Strategy of selection

Tournament selection

For each parent:

Selection of the best

selective pressure and vice versa.

HOW TO CONSTRUCT A GA?

Selection

PARENTS

Representation Crossover

Initialization

Population

Crossover operator

Features:

associated to the parent features. In other case it

would be a mutation operator.

between 0.6 and 0.9, usually).

Example: Simple crosover on the

binary representation

Population: ...

recombined (example for n = 2)

cut cut

parents

1 1 1 1 1 1 1 0 0 0 0 0 0 0

descendants

1 1 1 0 0 0 0 0 0 0 1 1 1 1

Crossover operator

Example: Two points crossover

Example: uniform crossover

a b c d e f g h

a b C d E f g H

A B CDE F GH

Example: Real coding crossover

operator

Arithmetic crossover:

a b c d e f

A B CDE F

↓

(a+A)/2 (b+B)/2 (c+C)/2 (d+D)/2 (e+E)/2 (f+F)/2

Example: real coding crossover

operator BLX-α

Two chromosomes

C1 = (c11,…, c1n) y C2 = (c21,…, c2n) ,

Hk = (hk1,…, hki,…, hkn) , k =1,2

[Cmin – I·α, Cmax + I·α]

Cmin = min {c1i , c2i}

I = Cmax - Cmin , α ∈ [0,1]

Ejemplo: Operador de cruce para

representación real: BLX-α

Exploration Exploration

ai c1i c2i bi

Exploitation

Example: Crossover operator for order

representation: OX

Parent 1 Parent 2

7 3 1 8 2 4 6 5 4 3 2 8 6 7 1 5

7, 3, 4, 6, 5

Order

1 8 2 4, 3, 6, 7, 5

Hijo 1

7 5 1 8 2 4 3 6

F. Herrera - Introduction to Genetic Algorithms 33

HOW TO CONSTRUCT A GA?

Selection

PARENTS

Representation Crossover

Initialization

Population Mutation

POPULATION Fitness function

DESCENDANTS

Mutation operator

Features:

runs.

We must control the size.

It must produce valid chromosomes.

It is used with a low running probability on the descendant

obtained after the application of the crossover operator.

Example: binary mutation

before 1 1 1 1 1 1 1

after 1 1 1 0 1 1 1

Mutated gen

The mutation happens with a low running

probability per gen pm

Example: real coding mutation

•Using a gaussian/normal distribution N(0,σ),

• 0 is the mean

• σ is the typical desviation

x’i = xi + N(0,σi)

For each parameter.

Example: order representation

mutation

7 3 1 8 2 4 6 5

7 3 6 8 2 4 1 5

HOW TO CONSTRUCT A GA?

Selection

PARENTS

Representation Crossover

Initialization

Population Mutation

POPULATION Fitness function

Replacement

DESCENDANTS

Replacement strategy

Complete population

….

Stop condition

Limited CPU:

Maximum of evaluations

improvement.

Components

Selection

PARENTS

Representation Crossover

Initialization

Population Mutation

POPULATION Fitness function

Replacement

DESCENDANTS

3. MODELS: GENERATIONAL vs STEADY

STATE

complete population

parents are used with genetic operators for

getting one/two descendants.

population.

The steady state is elitist. High selection pressure

when we replace the worst individuals.

Generational model

SELECTION CROSSOVER

C1 C’1 C’’1

C2 C’2 WITH PROB. Pc C’2

… … …

CM C’M C’’M

MUTATION

WITH PROB.

Pm

H1 H1= C’’m1

REPLACEMENT

H2

… H 2 =C’m

2

With elitism (maintaining the

HM-1 …

CF.best best individual from P(t))

Herrera - Introduction to Genetic AlgorithmsH =C’’

M M 44

Steady state model

Pactual(t)

SELECTION PPAREN CROSSOVER PINTERM.

C1 TS

C’’1

C2 C’1 WITH PROB. 1

C’’2

… C’2

CM

MUTATION

WITH PROB.

Pm

t ← t+1 C1 H1= C’’1

C2 (TWO OFFSPRING

… H2=C’’m2

COMPETE WITH

H1

INDIVIDUALS IN P(t))

CM

F. Herrera - Introduction to Genetic Algorithms 45

4. APPLICATIONS

Clasification control

Learning

Structural

optimization

Trayectory

generation

Planification

1 2 m

5. EXAMPLE: TRAVELLING SALESMAN

PROBLEM

Order representation

(3 5 1 13 6 15 8 2 17 11 14 4 7 9 10 12 16)

17 cities

Objective: Sum of distance among cities.

Population: 61 chromosomes - Elitism

Crossover: OX (Pc = 0,6)

Mutation: List inversion (Pm = 0,01 – chromosome)

TSP

F. Herrera - Introduction to Genetic Algorithms 48

TSP

Optimum solution: 226.64

F. Herrera - Introduction to Genetic Algorithms 49

TSP

Optimum solution: 226,64

F. Herrera - Introduction to Genetic Algorithms 50

TSP

Iteration: 250

Iteration: 200 Costo: 231,4

Optimum

F. Herrera - Introduction to Genetic solution:

Algorithms 226,64

51

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 52

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 53

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 54

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 55

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 56

TSP

size 50 and 70 iterations

F. Herrera - Introduction to Genetic Algorithms 57

6. SOFTWARE AND IMPLEMENTATIONS

library. It contains classes for almost any kind of evolutionary computation

you might come up to at least for the ones we could think of. It is

component-based, so that if you don't find the class you need in it, it is

very easy to subclass existing abstract or concrete classes.

http://eodev.sourceforge.net/

<jjmerelo@gmail.com>

6. SOFTWARE AND IMPLEMENTATIONS

developed in the Java programming language. It provides a high-level

software environment to do any kind of Evolutionary Algorithm (EA), with

support for genetic algorithms (binary, integer and real encoding), genetic

programming (Koza style, strongly typed, and grammar based) and

evolutionary programming.

http://jclec.sourceforge.net/

for Evolutionary Computing. Soft Computing, 2007, in press.

6. SOFTWARE AND IMPLEMENTATIONS

JCLEC Features

• Wide audience. Software can be used by both expert people (EC

researchers) and novice people (students or people from another field).

• Several execution modes

• Batch mode (expert) based on a configuration file

• Interactive mode (novice) based on a GUI with charting

• Multiple individual encodings

• Linear genotype (binary, integer and real)

• Tree genotype (expression tree and syntax tree)

• Multiple crossover and mutation operators for each type of individual.

• A variety of Evolutionary Algorithms

• Classical: SGA, Steady state and CHC

• Multiobjective: SPEA2 and NSGA-II

• Niching: Clearing, sequential and fitness sharing

• Memetic: Generational and steady state

6. SOFTWARE AND IMPLEMENTATIONS

• Extensible and reusable:

• New problems can be easily added to the system.

• New components (encodings, genetic operators and/or algorithms) can

be easily added to the system.

• Multithreading

• Speeds up evaluation in multiprocessor architectures

• Parallel genetic algorithms implementation.

• Future work

• New toolboxes planned:

• Real optimization: ES, DE, MGG and GGG.

• Evolutionary neural networks.

• Native JCLEC. In complex problems, would be desirable to sacrifice

the portability of the Java version to get a bigger efficiency (some

applications increase their speed 10 times). This version has been

developed using GNU gcj (java to native) compiler.

F. Herrera - Introduction to Genetic Algorithms 61

6. SOFTWARE AND IMPLEMENTATIONS

<<interface>> <<interface>> Evolutionary system and algorithm

contains

ISystem IAlgorithm

contains

Evaluated

<<interface>> <<interface>>

IIndividual ISpecies

<<interface>>

Created

contains

ITool

Data in an Evolutionary

Individual commonalities

Algorithm

Operations performed in an EA

CONCLUDING REMARKS

Genetic Algorithms

o Based in a biological metaphor: evolution

o high applicability

o very popular

o High performance and low cost

o Powerful algorithms for a lot of applications

CONCLUDING REMARKS

EVOLUTIONARY COMPUTATION

CLASSIC PARADIGMS MODELS

ESTIMATION DISTRIBUTIION

ALGORITHMS: PBIL, EDA, ...

GENETIC EVOLUTION

PARTICLE SWARM: SOCIAL

ALGORITHMS STRATEGIES

ADAPTATION

PROGRAMMING PROGRAMMING CULTURAL EVOLUTIOARY

ALGORITHMS

DIFFERENTIAL EVOLUTION

MEMETIC ALGORITHMS

F. Herrera - Introduction to Genetic Algorithms 64

BIBLIOGRAPHY

BOOKS - Classics

D.E. Goldberg, Genetic Algorithms in Search, Optimization and Machine

Learning. Addison Wesley, 1989.

Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution

Programs. Springer Verlag, 1996.

D.B. Fogel (Ed.) Evolutionary Computation. The Fossil Record.

(Selected Readings on the History of Evolutionary Computation).

IEEE Press, 1998.

BOOK – Recent

A.E. Eiben, J.E. Smith. Introduction to Evolutionary Computation.

Springer Verlag 2003. (Natural Computing Series)

D. Whitley "A Genetic Algorithm Tutorial". Statistics and Computing, 4 (1994) 65-85.

F. Herrera, M. Lozano, J.L. Verdegay, Tackling Real-Coded Genetic Algorithms:

Operators and tools for the Behaviour Analysis. Artificial Intelligence Review 12

(1998) 265-319.

- IJOPCM(vol.2.4.12.D.9)Uploaded byDa Na
- A Hybrid System Composed of Neural Networks and Genetic AlgorithmsUploaded byOvidiu Dumitrescu
- Scheduling in Job Shop Process IndustryUploaded bymac2022
- Genetic Algorithm based Analysis of Rigid and Non Rigid Medical ImagesUploaded byIRJET Journal
- dp0241.pdfUploaded bybarbie
- Genetic Algorithms 01Uploaded bynirmal_inbox
- Optimizing the reservoir operating rule curves by genetic algorithmsUploaded byRobert Aguedo
- IRJET-A Review Paper On “Particle Swarm Optimization and Genetic Algorithm Techniques For System Stability”Uploaded byIRJET Journal
- Early Theories of Evolution2Uploaded byRey Pineda
- A_More_Developed_Sign.pdfUploaded bySantiago Reghin
- cap observation form 1 announced polizzoittiUploaded byapi-317761911
- Using Genetic Algorithm to Do Quality ControlUploaded byAniket Bera
- ControleOtimo_AlgoritmosGeneticos.pdfUploaded byDani Fernandes
- Heuristic Algorithm for Constrained 3D Container Loading Problem: A Genetic ApproachUploaded byIntegrated Intelligent Research
- ap biology chapter 22 darwinUploaded byapi-277471896
- Genetic Algorithm and a Particle Swarm OptimizerUploaded byrrathore
- abbott unit outlineUploaded byapi-457996845
- What I See EmergingUploaded byJohn Strohl
- 2001Maize, Matrilocality, Migration, And Northern Iroquoian Evolution.Uploaded byo_djura
- Survey Optimization Probabilistic Models AIJUploaded byBinYuQLI
- 07-RecurrentselectionUploaded byjiban15
- IMECS2011_pp1113-1118Uploaded byDavid Valle
- Evolutionary principles and their practical applicationUploaded byKarito
- Outline Evolution IIUploaded bypatryk_wieckowski
- aimcat11Uploaded byArvindShankar
- The Scientific Conquest of DeathUploaded byBruceKlein
- Science Volume 27 issue 696 1908 [doi 10.1126_science.27.696.698] Jennings, H. S. -- THE INTERPRETATION OF THE BEHAVIOR OF THE LOWER ORGANISMS.pdfUploaded byAnonymous D0fu6XjKL
- Evolution - How Species ChangeUploaded byGhaash Baba
- SUSTAINABILITY-AND-STRUGGLEUploaded byPier Paolo Dal Monte
- evolusi 5 (1)Uploaded byRamawati Dwi Wahyuningtiyas

- Ece SyllabusUploaded byPriyanka Thillan
- Two Point Source Interference.pdfUploaded byJonathan Majaw
- Paper Gaza RiosUploaded byJavier Herrera Vicenzot
- Material balance estimation for oil.docxUploaded byPraveen Ran Subhe
- introduction to algebra curriculum mapUploaded byapi-310051256
- 1710.08362Uploaded byZsolt Bagoly
- Dimensional Analysis for Meds.pdfUploaded bysimi
- M.E. Data Structures LabUploaded byDharma Lingam
- Transportation ModelUploaded byFrancis Martin
- sipartps2_ps2_fi01enUploaded byLeonardo Bispo
- WSN - CopyUploaded bymido221
- Motors_and_Drives_Solutions_with_ansoft_softwareUploaded byapi-3805241
- PET524-6-steadystateUploaded bydesancheze
- Chapter 04Uploaded byAbdul Rafi Shaikh
- EXP (12)Logical InstructionUploaded bysrikaanth3811
- 02 Chapter 3_Weight Volume Relationships.pdfUploaded byAbd El Rhman Mohamed
- SyllabusLedolter216HK2012Uploaded byRyan Lam
- Engineering Drawings Lecture Introduction newUploaded byFawad Hassan
- Esper ReferenceUploaded byfristaile
- Ambulance SchedulingUploaded bySong Joong Ki
- Scherer.portfolio.construction.and.Risk.budgeting.4edUploaded bypballispapanastasiou
- Modelling and Simulation of Die Casting ProcessUploaded byPrabhat Kumar
- Tutorial 11 Introduction to Differential Equation V3Uploaded byMovanniish Singh
- ISO AMB standardizationUploaded bymaverick411
- Computer Systems Servicing Nc IIUploaded byRubyrosa Luna
- Unity Educator Toolkit Professional Skills StandardUploaded byCristi Rusu
- Second-Grade-Spelling-Dictation.pdfUploaded byraymond_ilaya12
- Wayne Gorman - How You Can Identify Turning Points Using FibonacciUploaded bypetefader
- Solubility Product.pdfUploaded byWsad Wsad
- Bamboo PilesUploaded byKenny Yee