16
ME 697: INTELLIGENT SYSTEMS OPTIMIZATION ALGORITHMS Daniel McArthur PhD Student

ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

ME 697: INTELLIGENT SYSTEMS

OPTIMIZATION ALGORITHMS

Daniel McArthur PhD Student

Page 2: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

EVOLUTIONARY STRATEGIES

Page 3: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PROBLEM DEFINITION 2-INPUT NONLINEAR FITNESS FUNCTION TO MINIMIZE

Domain: โˆ’512 โ‰ค ๐‘ฅ๐‘ฅ,๐‘ฆ๐‘ฆ โ‰ค 512

โ€œEggholder Functionโ€[1]

Constraints: ๐‘”๐‘”1 = ๐‘ฅ๐‘ฅ + 512 ๐‘”๐‘”2 = 512 โˆ’ ๐‘ฅ๐‘ฅ ๐‘”๐‘”3 = ๐‘ฆ๐‘ฆ + 512 ๐‘”๐‘”4 = 512 โˆ’ ๐‘ฆ๐‘ฆ

Page 4: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

EVOLUTIONARY STRATEGIES ALGORITHM & PARAMETERS

ฮผ = Number of parents ฮป = Number of children (offspring)

Parameters to Select โ€ข Population Size

โ€ข Number of parents โ€ข Number of children

โ€ข Maximum number of generations โ€ข Elitism Factor

โ€ข Which individuals reproduce? โ€ข Include parents in next population?

โ€ข Mutation Rate โ€ข Cross-over Rate

Parameter Types โ€ข Object Parameter (OP)

โ€ข Individual = vector of real numbers โ€ข Strategy Parameter (SP)

โ€ข Standard Deviation for each input variable of each individual (controls individual mutation)

Standard (ฮผ,ฮป) Algorithm[2]:

Page 5: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

EVOLUTIONARY STRATEGIES MATLAB IMPLEMENTATION

Mutation โ€ข Modify OP by adding ๐‘๐‘(๐œ‰๐œ‰,๐œŽ๐œŽ) with ๐œ‰๐œ‰=0

โ€ข ๐‘‚๐‘‚๐‘‚๐‘‚๐‘š๐‘š๐‘š๐‘š๐‘š๐‘š(๐‘–๐‘–) = ๐‘‚๐‘‚๐‘‚๐‘‚(๐‘–๐‘–) + ๐‘๐‘(0,๐œŽ๐œŽ(๐‘–๐‘–)) โ€ข Vary mutation step size (๐œŽ๐œŽ) by โ€œ1/5

success ruleโ€ โ€ข After k iterations, reset ๐œŽ๐œŽ by:

๐œŽ๐œŽ = ๐œŽ๐œŽ๐‘๐‘

๐‘–๐‘–๐‘–๐‘– ๐‘๐‘๐‘ ๐‘  > 15

๐œŽ๐œŽ = ๐œŽ๐œŽ โˆ— ๐‘๐‘ ๐‘–๐‘–๐‘–๐‘– ๐‘๐‘๐‘ ๐‘  < 15

๐œŽ๐œŽ = ๐œŽ๐œŽ ๐‘–๐‘–๐‘–๐‘– ๐‘๐‘๐‘ ๐‘  = 15

Fitness & Elitism

โ€ข fit_fun.m & constr_fun.m โ€ข Evaluate fitness and constraint

values for an individual โ€ข Individuals are sorted by fitness value

using min(), and only the best individuals reproduce

โ€ข Parents included in selection pool

Random Population โ€ข rng()

โ€ข Set seed for repeatable tests โ€ข rand()

โ€ข Select (x,y)-pairs in domain โ€ข Set each ๐œŽ๐œŽ between 0 & ๐œŽ๐œŽ๐‘ ๐‘ ๐‘š๐‘š๐‘ ๐‘ ๐‘ ๐‘ ๐‘š๐‘š

Recombination

โ€ข randperm() โ€ข Select unique parent pairs

โ€ข Discrete โ€ข Select ๐‘‚๐‘‚๐‘‚๐‘‚๐œ†๐œ†(i) from random parent

โ€ข Intermediate: โ€ข ๐‘‚๐‘‚๐‘‚๐‘‚๐œ†๐œ†(i) = average of ๐‘‚๐‘‚๐‘‚๐‘‚๐œ‡๐œ‡ ๐‘–๐‘–

Page 6: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION POPULATION SIZE: NUMBER OF PARENTS

Page 7: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION POPULATION SIZE: NUMBER OF CHILDREN

Page 8: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION RECOMBINATION

Mutation Only

Discrete Recombination

Intermediate Recombination

ฯƒ = 5

ฯƒ = 20

Page 9: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION MUTATION: STANDARD DEVIATION

Page 10: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION MUTATION: STRATEGY PARAMETER DISTRIBUTION

ฯƒ Randomly Distributed

at Start (๐ŸŽ๐ŸŽ โ‰ค ๐ˆ๐ˆ โ‰ค ๐ˆ๐ˆ๐’Ž๐’Ž๐’Ž๐’Ž๐’Ž๐’Ž)

ฯƒ Same at Start (๐ˆ๐ˆ = ๐ˆ๐ˆ๐’Ž๐’Ž๐’Ž๐’Ž๐’Ž๐’Ž)

Page 11: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

PARAMETER SELECTION SENSITIVITY TO RANDOMIZATION

Run 1

ฮผ = 5

ฮผ = 150

Run 2 Run 3

Page 12: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

FINAL PARAMETERS BEST COMBINATION

Population Size โ€ข Number of Parents (ฮผ) = 150 โ€ข Number of Children (ฮป) = 2 * ฮผ

Number of Generations โ€ข 50 Generations

โ€ข Typically converged much sooner (e.g. < 30 generations)

Recombination โ€ข Discrete outperforms Intermediate

Mutation โ€ข ฯƒ = 5 โ€ข Reset after every 5 iterations

Elitism โ€ข Include parents in fitness competition

Page 13: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

TEST RESULTS EVOLUTIONARY STRATEGIES OPTIMIZATION VS. ACTUAL VALUES

Actual Global Minimum: -959.6407 Location of Minimum: 512,404.2319

Evolutionary Strategies Global Minimum: -959.6308 Location of Minimum: 511.9982,404.1737

Absolute Error: 0.001 %

Page 14: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

TEST RESULTS EVOLUTIONARY STRATEGIES OPTIMIZATION VS. ACTUAL VALUES

Actual Global Minimum: 0 Location of Minimum: 0, 0

Evolutionary Strategies Global Minimum: 0.000092 Location of Minimum: โˆ’0.000028, 0.000017

Absolute Error: 0.0092 %

Page 15: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

CONCLUSIONS EVOLUTIONARY STRATEGIES

โ€ข ES is able to optimize complex nonlinear functions with very little error โ€ข Each parameter in the ES method requires careful tuning, and will vary

depending on the function being optimized โ€ข The performance of ES can vary significantly due to randomization,

but proper selection of population size (number of parents/children) can reduce this variation

โ€ข Mutation parameters can affect the efficiency of the algorithm and the average fitness of each population, but within a reasonable range, the ES method will still come close to the global solution

โ€ข Thus, some experimentation may be required to get the parameters into a useable range, but the parameters generally donโ€™t need to be perfect to get a reasonable solution

Page 16: ME 697: INTELLIGENT SYSTEMS presentation/2016...ย ยท โ€œEggholder Functionโ€[1] Constraints: ๐‘”๐‘”1= ๐‘ฅ๐‘ฅ+ 512 ๐‘”๐‘”2= 512 โˆ’๐‘ฅ๐‘ฅ ๐‘”๐‘”3= ๐‘ฆ๐‘ฆ+ 512 ๐‘”๐‘”4=

REFERENCES

1. Test Functions for Optimization. (n.d.). Retrieved March 04, 2016, from https://en.wikipedia.org/wiki/Test_functions_for_optimization

2. Shin, Yung C., and Chengying. Xu. Intelligent Systems Modeling, Optimization, and Control. Automation and Control Engineering. Hoboken: Taylor and Francis, 2008.