Learn R Programming

adana (version 1.1.0)

selrss: Remainder Stochastic Selection

Description

The fitness probability of individuals is multiplied by the population size to calculate the number of times the individual will reproduce in the mating pool, ie the expected number of copies. The expected number of copies is a fractional number. An exact fraction of the expected number of copies of the individual is sent to the mating pool. It is also determined whether it can go back to the mating pool for the fraction part (Brindle, 1981).

Usage

selrss(fitvals, ns, ...)

Arguments

fitvals

Vector of fitness values belonging to individuals

ns

Number of individuals to be selected

Further arguments passed to or from other methods.

Value

The indices of randomly selected individuals are returned.

References

Brindle, A. (1981). Genetic algorithms for function optimization. PhD thesis, University of Alberta.

See Also

select, selrand, selrswrp, selrws, selrws2 , selsus, seldet, selwscale, selsscale, selsscale2, sellscale, selrscale, selrscale2, selpscale, selescale, seltour, seltour2

Examples

Run this code
# NOT RUN {
fitvals = c(6, 1, 2, 4, 5)
cnames = paste0("C",1:length(fitvals))
matpool = selrss(fitvals)
cat("Selected Chromosomes: ", cnames[matpool], "\n")
# }

Run the code above in your browser using DataLab