fitness

package
v0.0.0-...-b9e61c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnemaxABS = MaxABS(1)

OnemaxABS is a fitness function which returns the absolute difference in an environment from an environment of all ones.

Functions

func AlternatingABS

func AlternatingABS(e *env.F) int

AlternatingABS is a fitness function which returns the best fitness for alternating ones and zeroes

func FourPeaks

func FourPeaks(t int) func(e *env.F) int

FourPeaks represents a problem where there are four explicit maxima in the search space and two of the maxima can hide the other two.

func MaxABS

func MaxABS(t float64) func(e *env.F) int

MaxABS is an abstracted form of Onemax for targeting any floating point value

func OnemaxChance

func OnemaxChance(e *env.F) int

OnemaxChance is a fitness function which rolls rng on every value in an environment and returns the number of values which were not rolled under.

func Quadratic

func Quadratic(e *env.F) int

Quadratic is similar to Onemax, but specifically wants pairs of digits to be the same, and offers similar but not optimal fitness for pairs of 0s over pairs of 1s

func SixPeaks

func SixPeaks(t int) func(e *env.F) int

func TrapABS

func TrapABS(t int) func(e *env.F) int

TrapABS takes in the bitlength t of the trap trap fitnesses follow reward worse fitness for increasing numbers of ones in subgroups of the environment until all elements in the subgroup are one, at which point the reward the best fitness. A graph:

Good fitness | -

|--------
|        -----------
|                   ----------
|------------------------------

Poor Fitness No ones More ones

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL