ExpDE {ExpDE} | R Documentation |
Experimental Differential Evolution - ExpDE
Description
Modular implementation of the Differential Evolution Algorithm for the experimental investigation of the effects of different operators on the performance of the algorithm.
Usage
ExpDE(popsize, mutpars = list(name = "mutation_rand", f = 0.2),
recpars = list(name = "recombination_bin", cr = 0.8, nvecs = 1),
selpars = list(name = "standard"), stopcrit, probpars, seed = NULL,
showpars = list(show.iters = "none"))
Arguments
popsize |
population size |
mutpars |
list of named mutation parameters.
See |
recpars |
list of named recombination parameters.
See |
selpars |
list of named selection parameters.
See |
stopcrit |
list of named stop criteria parameters.
See |
probpars |
list of named problem parameters.
See |
seed |
seed for the random number generator.
See |
showpars |
parameters that regulate the echoing of progress indicators
See |
Details
This routine is used to launch a differential evolution algorithm for the minimization of a given problem instance using different variants of the recombination, mutation and selection operators. The input parameters that describe those operators receive list objects describing the operator variants to be used in a given optimization procedure.
Value
A list object containing the final population (sorted by performance) , the performance vector, and some run statistics.
Mutation Parameters
mutpars
is used to inform the routine the type of differential
mutation to use, as well as any mutation-related parameter values. The
current version accepts the following options:
-
mutation_current_to_pbest
(incl. special casecurrent-to-best
)
mutpars
receives a list object with name field mutpars$name
(containing the name of the function to be called, e.g.,
name = "mutation_rand"
) as well as whatever parameters that function
may require/accept (e.g., mutpars$f = 0.7
, mutpars$nvecs = 2
,
etc.). See the specific documentation of each function for details.
Some examples are provided in the Examples
section below.
Recombination parameters
As with the mutation parameters, recpars
is used to define the
desired recombination strategy. The current version accepts the following
options:
-
recombination_blxAlphaBeta
(incl. special casesblxAlpha
andflat
)
recpars
receives a list object with name field recpars$name
(containing the name of the function to be called, e.g.,
name = "recombination_bin"
) as well as whatever parameters that
function may require/accept (e.g., recpars$cr = 0.8
,
recpars$minchange = TRUE
, etc.). See the specific documentation of
each function for details.
Some examples are provided in the Examples
section below.
Selection parameters
selpars
follows the same idea as mutpars
and recpars
,
and is used to define the selection operators. Currently, only the standard
DE selection, selection_standard
, is implemented.
Stop criteria
stopcrit
is similar to recpar
and the other list arguments,
but with the difference that multiple stop criteria can be defined for the
algorithm. The names of the stop criteria to be used are passed in the
stopcrit$names
field, which must contain a character vector. Other
parameters to be used for stopping the algorithm (e.g., the maximum number
of iterations stopcrit$maxiter
) can also be included as
stopcrit
fields. Currently implemented criteria are:
-
"stop_maxiter"
(requires additional fieldstopcrit$maxiter = ?
with the maximum number of iterations). -
"stop_maxeval"
(requires additional fieldstopcrit$maxevals = ?
with the maximum number of function calls).
See check_stop_criteria
for details.
Problem description
The probpars
parameter receives a list with all definitions related
to the problem instance to be optimized. There are three required fields in
this parameter:
-
probpars$name
, the name of the function that represents the problem to be solved. -
probpars$xmin
, a vector containing the lower bounds of all optimization variables (i.e., a vector of length M, where M is the dimension of the problem). -
probpars$xmax
, a vector containing the upper bounds of all optimization variables.
This list can also contain the following optional arguments
-
probpars$matrixEval
, indicates what kind of input is expected by the function provided inprobpars$name
. Valid entries are"vector"
,"colMatrix"
and"rowMatrix"
. Defaults toprobpars$matrixEval = "rowMatrix"
Important: the objective function routine must receive either a vector or a matrix of vectors to be evaluated in the form of an input parameter named either "x" or "X" or "Pop" (any one of the three is allowed).
Random Seed
The seed
argument receives the desired seed for the PRNG. This value
can be set for reproducibility purposes. The value of this parameter defaults
to NULL, in which case the seed is arbitrarily set using
as.numeric(Sys.time())
.
Showpars
showpars
is a list containing parameters that control the printed
output of ExpDE
. Parameter showpars
can have the following
fields:
-
showpars$show.iters = c("dots", "numbers", "none")
: type of output. Defaults to"numbers"
. -
showpars$showevery
: positive integer that determines how frequently the routine echoes something to the terminal. Defaults to1
.
Author(s)
Felipe Campelo (fcampelo@ufmg.br) and Moises Botelho (moisesufop@gmail.com)
References
F. Campelo, M. Botelho, "Experimental Investigation of Recombination Operators for Differential Evolution", Genetic and Evolutionary Computation Conference, July 20-24, 2016, Denver/CO. DOI: 10.1145/2908812.2908852
Examples
# DE/rand/1/bin with population 40, F = 0.8 and CR = 0.5
popsize <- 100
mutpars <- list(name = "mutation_rand", f = 0.8)
recpars <- list(name = "recombination_bin", cr = 0.5, minchange = TRUE)
selpars <- list(name = "selection_standard")
stopcrit <- list(names = "stop_maxiter", maxiter = 100)
probpars <- list(name = "sphere",
xmin = rep(-5.12,10), xmax = rep(5.12,10))
seed <- NULL
showpars <- list(show.iters = "numbers", showevery = 1)
ExpDE(popsize, mutpars, recpars, selpars, stopcrit, probpars, seed, showpars)
# DE/wgi/1/blxAlpha
recpars <- list(name = "recombination_blxAlphaBeta", alpha = 0.1, beta = 0.1)
mutpars <- list(name = "mutation_wgi", f = 0.8)
ExpDE(popsize, mutpars, recpars, selpars, stopcrit, probpars)
# DE/best/1/sbx
recpars <- list(name = "recombination_sbx", eta = 10)
mutpars <- list(name = "mutation_best", f = 0.6, nvecs = 1)
ExpDE(popsize, mutpars, recpars, selpars, stopcrit, probpars)
# DE/best/1/eigen/bin
recpars <- list(name = "recombination_eigen",
othername = "recombination_bin",
cr = 0.5, minchange = TRUE)
showpars <- list(show.iters = "dots", showevery = 10)
stopcrit <- list(names = "stop_maxeval", maxevals = 10000)
ExpDE(popsize, mutpars, recpars, selpars, stopcrit, probpars, seed = 1234)