ES: Evolutionary Strategy

Evolutionary Strategy is a well-known algorithm in evolutionary computation consisting of selection and mutation. The standard version has been proposed for real-valued optimization where a gaussian mutation is applied, and the selection is based on each individual’s fitness value.

In this implementation the 1/7 rule creates seven times more offspring than individuals in the current population. The \(sigma\) values for the mutation are based on a meta-evolution of surviving individuals.

[1]:
from pymoo.algorithms.soo.nonconvex.es import ES
from pymoo.problems import get_problem
from pymoo.optimize import minimize

problem = get_problem("ackley", n_var=10)

algorithm = ES(n_offsprings=200, rule=1.0 / 7.0)

res = minimize(problem,
               algorithm,
               ("n_gen", 200),
               seed=1,
               verbose=False)

print("Best solution found: \nX = %s\nF = %s" % (res.X, res.F))
Best solution found:
X = [ 4.16017242e-08  2.05075037e-06 -1.45371994e-06  3.00645747e-06
 -3.48088699e-06 -8.84105527e-07  7.43515081e-07 -1.52894719e-06
  2.22753896e-07  1.54870696e-06]
F = [7.33188753e-06]

API

class pymoo.algorithms.soo.nonconvex.es.ES(self, n_offsprings=200, pop_size=None, rule=1.0 / 7.0, phi=1.0, gamma=0.85, sampling=FloatRandomSampling(), survival=FitnessSurvival(), output=SingleObjectiveOutput(), **kwargs)

Evolutionary Strategy (ES)

Parameters
n_offspringsint

The number of individuals created in each iteration.

pop_sizeint

The number of individuals which are surviving from the offspring population (non-elitist)

rulefloat

The rule (ratio) of individuals surviving. This automatically either calculated n_offsprings or pop_size.

phifloat

Expected rate of convergence (usually 1.0).

gammafloat

If not None, some individuals are created using the differentials with this as a length scale.

samplingobject

The sampling method for creating the initial population.