## Goldstein-Price

### Problem definition

##### Objective function
```f = @(x) (1+((x(:,1) + x(:,2) + 1).^2).*(19 - 14*x(:,1) + ...
3*x(:,1).^2 - 14*x(:,2) + 6*x(:,1).*x(:,2) + ...
3*x(:,2).^2)).*(30 + ((2*x(:,1) - 3*x(:,2)).^2).* (18 - 32*x(:,1)+ ...
12*x(:,1).^2 + 48*x(:,2) - 36*x(:,1).*x(:,2) + 27*x(:,2).^2))```
##### Optimization settings
```o = struct	% initializing struct
o.d = 2	% dimension of decision variable
o.lb = -2	% lower bounds
o.ub = 2	% upper bounds```
##### Graphic representation
```[x,y] = meshgrid(o.lb:0.4:o.ub)
surf(x,y,f([x(:),y(:)]))```

### Problem properties

 convexity smoothness minimum 0 ∞ f(0,-1) = 3

### Optimization example with ga

##### Optimization
```rng(0)	% for tractability
[xmin,fmin,popPos,popCost] = ga(f,o)	% running minimization  ```
##### Animation
```rng(0)
[~,~,~,~,info] = ga(f,o)
info.sol = [0 -1 3]	% solution
info.animate = true	% plot animation
info.animfreq = 2	% frame frequency
optimview('ga',info)```

#### References

[1] A. A. Goldstein, J. F. Price, "On Descent from Local Minima", Mathematics and Computation, vol. 25, no. 115, pp. 569-574, 1971

#### Resources

Goldstein-Price optimization source code