44
Parametric Optimization CS 5764 Evolutionary Computation Hod Lipson

Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Parametric Optimization

CS 5764

Evolutionary Computation

Hod Lipson

Page 2: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Why parametric?

• Useful on many simpler problems

where EAs are an “overkill”

• Forms a baseline for performance

comparison and diagnostic

• Used in the “inner loop” of more

sophisticated algorithms

Page 3: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Optimization

x

f(x)

Fitness

Landscape

Individual

Solution

Page 4: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 6: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 7: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 8: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Challenge

• Think of three strategies to search a

landscape: Find x that maximize f(x)

Page 9: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 10: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 11: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 12: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 13: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 14: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 15: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 16: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Hierarchical search

Page 17: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Hierarchical search

Page 18: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Hierarchical search

Page 19: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Hierarchical random search

1. Sample n initial random points

2. Rank top m points

3. Sample a new point within the convex

hull of the m points

– How?

4. Repeat from 2

Page 20: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 21: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Pattern search

• Test nearby locations in a pattern, then

move to best point, and repeat

– Random pattern (RMHC, k)

– One along every axis (d)

– Two along every axis (2d)

– Corners of cube (2d)

• Inefficient

Page 25: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 26: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

http://paula.univ.gda.pl/~dokgrk/simplex.html

Page 27: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Simplex Method

• Reflect the point with the highest WSS through centroid of the simplex – If this produces the lowest WSS (best point) expand the simplex and reflect further

– If this is just a good point start at the top and reflect again

– If this the highest WSS (worst point) compress the simplex and reflect closer

http://www.boomer.org/c/p3/c11/c1106.html

Page 28: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Gradient Methods

• Principal axis direction

• Best random direction (Hooke-Jeeves)

• Steepest decent direction

• Adaptive directions

Page 29: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 30: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 31: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 32: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 33: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Neutral “Sideways” moves

Take new state even if not strictly better (just equal)

Why? Allows exploring plateaus …But can get into cycles

Page 35: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 36: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Random restarts

Random restarts: Simply restart at a new random state after a pre-defined number of steps.

Is it worth it?

Page 37: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Parallelization: Beam Search

01011010010

10010101010

11101011101

10101001000

00100101001

00010111101

11111001001

11010101001

01011010110

10011101010

11100011101

10101000000

00101101001

00011111101

11011001001

11110101001

One Change

01011010010

10010101010

11101011101

10101001000

00100101001

00010111101

11111001001

11010101001

01011010110

10011101010

11100011101

10101000000

00101101001

00011111101

11011001001

11110101001

Combine

and

Rank

01011010010

11101011101

00100101001

11111001001

10011101010

10101000000

00011111101

11110101001

Down

Select

Iterate

Page 38: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Summary

• Global methods

– Random / Grid scan / Hierarchical

• Local methods

– Hill climbers / Gradient followers / Simplex

• Alternatives

– Annealing

– Multiple restart

– Parallelism

Page 39: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

0 500 1000 1500 2000 2500 3000

4

5

6

7

8

9

10

11

12

13

Random Search

GA (Roulette, Tight Linkage)Parallel HillclimberParallel Simulated Annealing

GA (Diversity, Poor Linkage)

GA (Diversity, Tight Linkage)

Be

st

Fitn

ess

GenerationEvaluations

Error of the mean = σ/n

Computational effort

Baselines

Consider log axis

Page 40: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Con

ver

gen

ce R

ate

[%

] Convergence plots

Page 41: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Assignment #1

Path length = 25.19

Path Length 25.19 Path Length 6.21

Path length = 6.21

Page 42: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape
Page 43: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Neutral moves with restart

Strategy 1: without sideways

Stuck 86% time

4 steps to succeed

3 to get stuck

Strategy 2: with sideways

Succeeds 94% time

21 steps to succeed

64 to get stuck

Page 44: Parametric Optimization - Cornell University · Parametric Optimization CS 5764 ... • Used in the “inner loop” of more sophisticated algorithms . Optimization x x) Fitness Landscape

Random restarts

Random restarts: Simply restart at a new random state after a pre-defined number of steps.

Is it worth it?

If probability of success is p, then Expected number of trials to success is 1/p