selectparents {seao}R Documentation

Select the parents to mate

Description

Select the parents which are the basis for the next (child) generation. The individuals (set-ups) with highest fitness have the highest chance to be chosen, so some parents may be chosen a few times.

Usage

  selectparents(struc.ea, gen=NULL,
                method=list(base="fit", rescale=0))

Arguments

struc.ea An evolutionary algorithm structure
gen The number of the generation (batch) for which the parents have to be chosen. The standard value is the last generation.
method A list containing the base for selection, and possible selection. The base can be either "fit" (standard value) or "rank"; rescaling a number, standard value is 0, but 1.5 is a value which gives often nice results.

Details

The method is a list of base and rescale. base gives which basis should be used for calculating the weights of the different individuals:

"fitness"
The fitness values are the weights given, before rescaling
"rank"
The individuals are ranked from 1 to the number of individuals in the generation. The higher the number, the higher the fitness of the individual. If two individuals have exactly the same fitness, the average of the next and previous ranking is used, e.g. imagene that two fitnesses should be at ranking 7 and 8. However, they have the same value, so they are both set to 7.5 (in this case, the sum is still 15).

In many cases, the difference between the lowest and highest weights are very high. This would result in choosing the same parent(s) every time. In order to decrease this extreme selection, one can rescale the weights. Rescaling is done so that the highest fitness is recale times the average value of the fitnesses.

Value

The function returns an evolutionary algorithm object, which is actually the same as the input argument struc.ea, but with new individuals (experimental set-ups) and the selection method added in the generation (batch) of selection:

genes a list containing the genome (parameter set) stucture. This is the same as the genome (parameter set) structure of in the input (struc.ea$genes).
generations a list of structures with information of each generation:
fit:
a vector containing the fitnesses of all individuals (experimental set-ups) of the generation (batch); this are just copies of the fitnesses of the selected parents.
allele:
a matrix containing the allele-values of all individuals (experimental set-ups) of the generation (batch); this are just copies of the alleles (parameter values) of the selected parents.
parents:
a string vector with the numbers of the parent generations.
selection:
a list containing the selection base and rescaling.

Note

As for all functions in this package, evolutionary terminology is used as described in seao.terminology.

Author(s)

Kurt Sys (kurt.sys@rug.ac.be)

See Also

genomestruc, newgen, chooseparents

Examples






[Package seao version 0.2-1 Index]