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.
from pymoo.algorithms.soo.nonconvex.es import ES from pymoo.factory 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.16017273e-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]
ES(self, n_offsprings=200, pop_size=None, rule=1.0 / 7.0, phi=1.0, gamma=0.85, sampling=FloatRandomSampling(), survival=FitnessSurvival(), display=SingleObjectiveDisplay(), **kwargs)
Evolutionary Strategy (ES)
The number of individuals created in each iteration.
The number of individuals which are surviving from the offspring population (non-elitist)
The rule (ratio) of individuals surviving. This automatically either calculated n_offsprings or pop_size.
Expected rate of convergence (usually 1.0).
If not None, some individuals are created using the differentials with this as a length scale.
The sampling method for creating the initial population.