seltour | R Documentation |
The best one is selected in the group consisting of t individuals selected by random sampling with or without replacement from the current population (Smith et.al, 1991).
seltour(fitvals, ns, selt, reptype, ...)
fitvals |
Vector of fitness values belonging to individuals |
ns |
Number of individuals to be selected |
selt |
Number of tournament size |
reptype |
Type of Sampling, |
... |
Further arguments passed to or from other methods. |
The indices of randomly selected individuals are returned.
Zeynel Cebeci & Erkut Tekeli
Smith, R.E., Goldberg, D.E. and Earickson, J.A. (1991). SGA-C: A C-language implementation of a simple gewnetic algorithm. Technical report 91002, Illinois Genetic Algorithms Laboratory, Urbana, IL, USA.
select
,
selrand
,
selrswrp
,
selrws
,
selrws2
,
selrss
,
selsus
,
seldet
,
selwscale
,
selsscale
,
selsscale2
,
sellscale
,
selrscale
,
selrscale2
,
selpscale
,
selescale
,
seltour2
selt = 2 # Size of tournament fitvals = c(6, -1, 2, 4, 5) # Fitness values cnames = paste0("C",1:length(fitvals)) # Chromosome names matpool = seltour(fitvals, selt=selt) cat(cnames[matpool],"\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.