#' @title
#' Simple (naive) selector.
#'
#' @description
#' Just for testing. Actually does not really select, but instead returns a random
#' sample of \code{ncol(fitness)} indizes.
#'
#' @template arg_fitness
#' @template arg_n_select
#' @return [\code{setOfIndividuals}]
#' @family selectors
#' @export
EASelectorRandom = function() {
EASelector$new(
name = "Random selector",
params = list(),
minimize = TRUE,
setting = c("single", "multi"),
direction = "minimize",
fun = function(fitness, size) {
sample(1:ncol(fitness), size = size, replace = TRUE)
}
)
} # EASelectorRandom
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.