Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

benchmarkGeneratorNKL

NK-Landscape Benchmark Creation


Description

Function that generates a NK-Landscapes.

Usage

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

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

Combinatorial Efficient Global Optimization

v2.4.0
GPL (>= 3)
Authors
Martin Zaefferer <mzaefferer@gmail.com>
Initial release
2019-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.