benchmarkGeneratorNKL: NK-Landscape Benchmark Creation

Description Usage Arguments Value Examples

View source: R/binaryBenchmarkFunctions.R

Description

Function that generates a NK-Landscapes.

Usage

1
benchmarkGeneratorNKL(N = 10, K = 1, PI = 1:K, g)

Arguments

N

length of the bit strings

K

number of neighbours contributing to fitness of one position

PI

vector, giving relative positions of each neighbour in the bit-string

g

set of fitness functions for each possible combination of string components. Will be randomly determined if not specified. Should have N rows, and 2^(K+1) columns.

Value

the function of type cost=f(bitstring). Returned fitness values will be negative, for purpose of minimization.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fun <- benchmarkGeneratorNKL(6,2)
fun(c(1,0,1,1,0,0))
fun(c(1,0,1,1,0,1))
fun(c(0,1,0,0,1,1))
fun <- benchmarkGeneratorNKL(6,3)
fun(c(1,0,1,1,0,0))
fun <- benchmarkGeneratorNKL(6,2,c(-1,1))
fun(c(1,0,1,1,0,0))
fun <- benchmarkGeneratorNKL(6,2,c(-1,1),g=matrix(runif(48),6))
fun(c(1,0,1,1,0,0))
fun(sample(c(0,1),6,TRUE))

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