# Local search

From Adaptive Population based Simplex

## Basic local search (l0)

The idea is to perform a random search "around" a good point, but only if the current point is worse than average, i.e. if $\frac{f(x_i)}{N}>C$. In that case, the process is the following:

- Compute the maximum distance $\rho$ between $x_{best}$ and all the other individuals of the population.
- Select the $x_l$ position at random in the hypersphere of centre $x_{best}$ and of radius $\rho$. The basic random choice makes use of two distributions, an uniform one, and a non-uniform one (see below).

If $x_{l}$ is better than $x_i$, decrease the population cost
$$ C\leftarrow C-f(x_i)+f(x_l)$$

If $x_{l}$ is better than the best ever found (i.e. $Best$), set $Best=x_{l}$.

### Random choice

The distribution that is used is itself selected at random (uniform distribution) between two ones:

- the uniform one. The components of the direction vector follow the normalised Gaussian distribution, and the radius is $r=\rho*rand(0,1)^{\frac{1}{D}}$
- a non uniform one (more dense near to the centre). Here the radius is simply $r=\rho*rand(0,1)$.