landscapeGeneratorMUL: Multimodal Fitness Landscape

Description Usage Arguments Value See Also Examples

View source: R/distanceBasedLandscapeGenerators.R

Description

This function generates multi-modal fitness landscapes based on distance measures. The fitness is the minimal distance to several reference individuals or centers. Hence, each reference individual is an optimum of the landscape.

Usage

1
landscapeGeneratorMUL(ref, distanceFunction)

Arguments

ref

list of reference individuals / centers

distanceFunction

Distance function, used to evaluate d(x,ref[[n]]), where x is an arbitrary new individual

Value

returns a function. The function requires a list of candidate solutions as its input, where each solution is suitable for use with the distance function. The function returns a numeric vector.

See Also

landscapeGeneratorUNI, landscapeGeneratorGaussian

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fun <- landscapeGeneratorMUL(ref=list(1:7,c(2,4,1,5,3,7,6)),distancePermutationCos)
x <- 1:7
fun(list(x))
x <- c(2,4,1,5,3,7,6)
fun(list(x))
x <- 7:1
fun(list(x))
x <- sample(7)
fun(list(x))
## multiple solutions at once:
x <- append(list(1:7,c(2,4,1,5,3,7,6)),replicate(5,sample(7),FALSE))
fun(x)

CEGO documentation built on May 14, 2021, 1:08 a.m.