Diapositiva 1 - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Diapositiva 1

Description:

Fitness Landscape (Paisaje Adaptativo) ... Fitness Landscape (2 traits) M todos ... No information as to how much the discovered local optimum deviates from the ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 26
Provided by: Gabr241
Category:

less

Transcript and Presenter's Notes

Title: Diapositiva 1


1
Clase 3 Heurísticas Ascenso de Colina y
Recocido Simulado
Gabriela Ochoa http//www.ldc.usb.ve/gabro/
2
Fitness Landscape (Paisaje Adaptativo)
  • Can envisage population with n traits as
    existing in a n1-dimensional space (landscape)
    with height corresponding to fitness
  • Each different individual (phenotype) represents
    a single point on the landscape
  • Population is therefore a cloud of points,
    moving on the landscape over time as it evolves
    - adaptation

3
Fitness Landscape (2 traits)
4
Métodos de Ascenso de Colina - 1
  • Usan una técnica de mejoramiento iterativo
  • Comienzan a partir de un punto (punto actual) en
    el espacio de búsqueda
  • En cada iteración, un nuevo punto es seleccionado
    de la vecindad del punto actual
  • Si el nuevo punto es mejor, se transforma en em
    punto actual, sino otro punto vecino es
    seleccionado y evaluado
  • El método termina cuando no hay mejorías, o
    cuando se alcanza un numero predefinido de
    iteraciones

5
Hillclimbing Methods - 2
  • May converge to local optima
  • usually have to start search from various
    starting points
  • Initial starting points may be chosen,
  • randomly
  • according to some regular pattern
  • based on other information (e.g. results of a
    prior search)

6
Hillclimbing Methods - 3
  • Variations of hillclimbing algorithms differ in
    the way a new string is selected for comparisons
    with the current string
  • One version of simple (iterated) hillclimbing
    method is the steepest ascent hillclimbing

7
Hillclimbing Methods - 4
  • Example problem
  • The search space is a set of binary strings v of
    length 30
  • The objective function f (to be maximized)
  • f(v)11one(v)-150
  • where one(v) returns the number of ones in v.
  • e.g. v1(110111101111011101101111010101)
  • f(v1) 1122 - 150 92

8
Hillclimbing Methods - 5
  • procedure iterated hillclimber
  • begin
  • t ? 0
  • repeat
  • local ? FALSE
  • select a curent string vc at random
  • evaluate vc
  • repeat
  • form 30 new strings in the neigborhood of
    vc by
  • flipping single bits of vc
  • select vn from the set of new strings with
    the
  • largest value of the objective function f
  • if f(vc) lt f(vn) then vc ? vn
  • else local ? TRUE
  • until local
  • t ? t1
  • until tMAX
  • end

9
Hillclimbing Methods - 6
  • success/failure of each iteration depends on
    starting point
  • success defined as returning a local or a global
    optimum
  • in problems with many local optima a global
    optimum may not be found

10
Hillclimbing Methods - 7
  • Weaknesses
  • Usually terminate at solutions that are local
    optima
  • No information as to how much the discovered
    local optimum deviates from the global (or even
    other local optima)
  • Obtained optimum depends on starting point
  • Usually no upper bound on computation time

11
Hillclimbing Methods - 8
  • Advantages
  • Very easy to apply (only a representation, the
    evaluation function and a measure that defines
    the neigborhood around a point is needed)

12
Search Techniques Revisited - 1
  • Effective search techniques provide a mechanism
    to balance exploration and exploitation
  • exploiting the best solutions found so far
  • exploring the search space

13
Search Techniques Revisited - 2
  • Hillclimbing methods exploit the best available
    solution for possible improvement but neglect
    exploring a large portion of the search space
  • Random search (points in the search space are
    sampled with equal probability) explores the
    search space thoroughly but misses exploiting
    promising regions.

14
Search Techniques Revisited - 3
  • Aim is to design search algorithms that can
  • escape local optima
  • balance exploration and exploitation
  • make the search independent from the initial
    configuration

15
Simulated Annealing - 1
  • derived from statistical mechanics
  • based on analogy between annealing of solids and
    the solving of combinatorial optimization problems

16
Simulated Annealing - 2
  • annealing the physical process of heating up a
    solid and then cooling it down until it
    crystallizes
  • at higher temperatures atoms have higher energies
    and more freedom to arrange themselves
  • as temperature is decreased atomic energies
    decrease

17
Simulated Annealing - 3
  • a crystal with regular structure is obtained at
    minimum energy state
  • rapid quenching very rapid cooling which causes
    widespread irregularities in the crystal
    structure and system does not reach minimum
    energy state

18
Simulated Annealing - 4
  • the states of the solid represent feasible
    solutions of the optimization problem
  • the energies of the states correspond to values
    of the objective function calculated at those
    states
  • minimum energy state corresponds to optimal
    solution
  • rapid quenching corresponds to converging to
    local optima

19
Simulated Annealing - 5
  • Four principle choices to make
  • representation of solutions
  • definition of cost function
  • definition of generation function for neighbors
    (can be random)
  • designing a cooling schedule four parameters
    must be specified
  • initial temperature, temperature update rule,
    number of iterations to be performed at each
    temperature, stopping criteria

20
Simulated Annealing - 6
  • procedure simulated annealing
  • begin
  • create an initial solution
  • repeat
  • evaluate solution
  • if accepted then update current solution
  • if time to change temperature then
  • decrease temperature
  • if stopping-criteria NOT satisfied then
  • generate new solution
  • until stopping-criteria satisfied
  • end

21
Problema Optimización Numérica
  • Función
  • Vencindad
  • x (x1, , xn), li xi ui
  • x xi N(0,si), si (ui - li)/6
  • Hillclimbing iterado, generar vecindad de tamaño
    fijo
  • Simulated Annealing, dos tipos de puntos vecinos.

22
Simulated Annealing in Matlab
for i1TRIES, nAccep 0 for
j1NOVER, solNew NewSolution(solCurr,bo
unds,i,TRIES) Generate new solution
solNew(1,) solNew(1,totLen)
EvalSol(solNew,evalOps) Evaluate new Solution
deltaE solCurr(1,totLen) -
solNew(1,totLen) if (deltaE gt 0)
(rand lt exp(deltaE/T)) solCurr
solNew Accept Solution
nAccep nAccep 1
end if (solCurr(1,totLen) lt
solBest(1,totLen)) Minimization Problem
solBest solCurr bestTrace
bestTrace solBest(1,totLen) end
currTrace currTrace solCurr(1,totLen)
end T T TFACTR
Annealing Schedule cbTrace cbTrace
solBest(1,totLen) Current best trace end
23
Parámetros y variables del SA
  • solCurr zeros(1,totLen) Allocate the
    current solution
  • solNew zeros(1,totLen) Allocate the new
    solution
  • solBest zeros(1,totLen) Allocate the best
    solution
  • TFACTR 0.85 Ann Sched
    Reduce T by this factor on each step
  • TRIES 100 Number of
    Temperature Steps to try
  • TMAX 10 Maximun
    Initial Temperature
  • T TMAX Current
    Temperature
  • NOVER 30 Max. No. of
    solutions tried at any temp
  • NLIMIT 10 Max. No. of
    successful solutions before continuing
  • nAccep 0 Counter for
    the number of accepted solutions
  • deltaE 0 Maintains
    difference in performance between current and new
    solution
  • bestFitness 0 Maintais
    best-so-far fitness

24
EAs and Other Search Heuristics
  • avoid converging to local optima
  • use exploration of the search space and
    exploitation of promising areas
  • not dependent on initial starting point(s)
  • start search from many points in the search space
    space

25
EAs and Other Search Heuristics
  • conduct search in parallel over the search space
  • implicit parallelism
  • through recombination operators, reach better
    solutions by combining already found good
    solutions (building block hypothesis and the
    schema theorem)
  • may be used together with other approaches
    (hybrids)
Write a Comment
User Comments (0)
About PowerShow.com