ES: Evolutionary Strategy

Contents

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 = [ 6.20750432e-08 -1.19247306e-06  2.59579287e-06 -8.70949813e-07
  7.78530099e-07  1.19484336e-07  1.22093334e-06  2.31173667e-07
  2.03891256e-06 -6.35412238e-07]
F = [5.00375523e-06]

API#

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

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.