Styblinski-Tang
Problem definition
Objective function
f = @(x) (x(:,1).^4 - 16*x(:,1).^2 + 5*x(:,1) + x(:,2).^4 - 16*x(:,2).^2 + 5*x(:,2))/2
Optimization settings
o = struct% initializing struct
o.lb = -5% lower bounds
o.ub = 5% upper bounds
Graphic representation
[x,y] = meshgrid(o.lb:0.5:o.ub) surf(x,y,f([x(:),y(:)]))
Problem properties
convexity | smoothness | minimum |
0 | ∞ | f(-2.903534,-2.903534) = -78.332 |
Optimization example with fminsearch
Optimization
rng(0)% for tractability
x0 = [3,3]% initial guess
[xmin,fmin,info] = fminsearch(f,x0,o)% running minimization
Animation
rng(0) x0 = [3,3] [~,~,info] = fminsearch(f,x0,o) info.sol = [-2.903534 -2.903534 -78.332]% solution
info.animate = true% plot animation
info.animfreq = 5% frame frequency
info.np = 20% number of points for meshgrid
optimview('fminsearch',info)
References
[1] M.A. Styblinski and T.S. Tang, "Experiments in nonconvex optimization: Stochastic approximation with function smoothing and simulated annealing", Neural Networks 3, 467-483, 1990