How to find Minimum of Function with Many Local Minima

573 Views Asked by At

I'm trying to find the smallest local minima within a given boundary condition, e.g., a circle. Currently, I'm using a monte carlo algorithm to approximate the minimum, followed by a gradient descent to hone in on the particular point. I would rather only use the gradient descent but it gets stuck in all the local minima.

The problem is that the monte carlo isn't accurate enough either, so I get different minima each time. This wouldn't be a problem if they at least had the same z value, but they don't more often than not.

How should I go about designing this algorithm?

Edit: The function, $G_{R}(x,y)$ to optimize is defined below.

$f(r)$ is a continuous piecewise equation composed of linear segments defined for $x \geq 0$. E.g.,

$$f(r) = \begin{cases} 1-r, & 0 \leq r \lt 1/2 \\ 2-3r, & 1/2 \leq r \lt 2/3 \\ 0, & r \geq 2/3 \end{cases}$$

g rotates the function, f, about the z axis, making look like a hill. $$g(x,y) = f(\sqrt{x^2+y^2})$$

$g_{n,m}$ centers the hill at $(x_{n,m},y_{n,m})$. $$g_{n,m}(x,y) = g(x-x_{n,m},y-y_{n,m}) $$

The centers are triangulated throughout $\Bbb R^2$. $\alpha$ is some constant. $$x_{n,m} = \alpha (n+\frac{|n|}{n} \frac{1+(-1)^{m+1}}{4}) $$ $$y_{n,m} = \alpha (m \frac{\sqrt 3}{2}) $$

Plot of $(x_{n,m},y_{n,m})$ for $R = 120$ and $\alpha = 30 $ Plot of Centers

The final function sums over all the centers within a circle of radius R, like a macro hill that is the superposition of all the micro hills. $$G_{R}(x,y) = \sum_{n,m\in \Bbb Z}^{n^2+m^2 \leq R^2} g_{n,m}(x,y)$$

Plot of $G_{R}(x,y)$ Plot of function with many local minima

Edit 2:

The problem is highlighted in the following figure. The algorithm must find the absolute minimum within the red circle. It finds the red dot, as there are many relative minima with that value within the red circle. However, the absolute minimum is at the purple dot, of which there are fewer values.

enter image description here

Edit 3: The function, $G_R$ is further optimized by linear factors $\beta_{n,m}$.

$$G_R(x,y) = \sum_{n,m\in\Bbb Z}^{n^2+m^2\leq R^2}\beta_{n,m}g_{n,m}(x,y) $$

Some of the $g_{n,m}(x,y)$ are scaled up and others down in order to minimize the difference between the max and min. To keep the number of variables being optimized low, the $\beta$ are equivalent for $(x_{n,m} ,y_{n,m})$ of equal radii.

$$\beta_{n,m} = \beta_{i,j} \text{ if } x_{n,m}^2+y_{n,m}^2 = x_{i,j}^2+y_{i,j}^2$$

After optimizing with the $\beta$, the distribution looks like this:

enter image description here

So the optimization has to work over at least one quadrant.

A close-up of he last picture:

enter image description here