Random search


Random search is a family of numerical optimization methods that do not require the gradient of the problem to be optimized, and RS can hence be used on functions that are not continuous or differentiable. Such optimization methods are also known as direct-search, derivative-free, or black-box methods.
The name "random search" is attributed to Rastrigin who made an early presentation of RS along with basic mathematical analysis. RS works by iteratively moving to better positions in the search-space, which are sampled from a hypersphere surrounding the current position.
The algorithm described herein is a type of local random search, where every iteration is dependent on the prior iteration's candidate solution. There are alternative random search methods which sample from the entirety of the search space, but these are not described in this article.

Algorithm

Let be the fitness or cost function which must be minimized. Let designate a position or candidate solution in the search-space. The basic RS algorithm can then be described as:
  1. Initialize x with a random position in the search-space.
  2. Until a termination criterion is met, repeat the following:
  3. # Sample a new position y from the hypersphere of a given radius surrounding the current position x
  4. # If then move to the new position by setting

    Variants

A number of RS variants have been introduced in the literature: