ME 697: INTELLIGENT SYSTEMS presentation/2016...Β Β· β€œEggholder Function”[1] Constraints:...

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

Transcript of ME 697: INTELLIGENT SYSTEMS presentation/2016...Β Β· β€œEggholder Function”[1] Constraints:...

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.