Evolutionary is a Julia package implementing various evolutionary and genetic algorithm.
To use this package, install the OptimizationEvolutionary package:
import Pkg; Pkg.add("OptimizationEvolutionary")
The methods in
Evolutionary are performing global optimization on problems without constraint equations. These methods work both with and without lower and upper constraints set by
ub in the
Evolutionary algorithm is called by one of the following:
Evolutionary.GA(): Genetic Algorithm optimizer
Evolutionary.DE(): Differential Evolution optimizer
Evolutionary.ES(): Evolution Strategy algorithm
Evolutionary.CMAES(): Covariance Matrix Adaptation Evolution Strategy algorithm
Algorithm specific options are defined as
kwargs. See the respective documentation for more detail.
The Rosenbrock function can optimized using the
Evolutionary.CMAES() as follows:
rosenbrock(x, p) = (p - x)^2 + p * (x - x^2)^2 x0 = zeros(2) p = [1.0, 100.0] f = OptimizationFunction(rosenbrock) prob = Optimization.OptimizationProblem(f, x0, p, lb = [-1.0,-1.0], ub = [1.0,1.0]) sol = solve(prob, Evolutionary.CMAES(μ =40 , λ = 100))