recmut: Line recombination with mutation features

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/recmut.R

Description

This function performs line recombination with mutation features between pairs of individuals.

Usage

1
recmut(OldChrom, FieldDR, MutOpt = NULL)

Arguments

OldChrom

matrix containing the chromosomes of the old population. Each line corresponds to one individual.

FieldDR

matrix describing the boundaries of each variable (real-values) or defining the base of the variables of each individual (discrete values). Optional for (binary) discrete values

MutOpt

an optional vector containing mutation rate and shrink value:

  1. MutOpt[1] a number containing the recombination rate in the range [0, 1]. By default this value is set to 1.

  2. MutOpt[2] a number for shrinking the mutation range in the range [0, 1]. By default this vaule is assumed to 1 (no shrinking).

Details

recmut is a function only applicable to populations of real-value variables ( and not binary or integer). The pairs are mated in order, odd row with the next even row. If the number of rows in the matrix OldChrom is odd the the last row is not mated and added at the end of NewChrom. The population should therefore be organised into contiguous pairs that require mating. This can be achieved by using the function ranking to assign a fitness level to each individual and a selection function (e.g. select) to select individuals with a probability related to their fitness in the current population.

The offsprings of a pair of two parents are computed as follows:
offsping1 = parent1 + RecMx * range * Mutopt[2] * delta *Diff
offsping2 = parent2 + RecMx * range * Mutopt[2] * delta * -Diff
where,
MutMx = 1 or -1 with probability MutOpt[1], (- with probability 0.9) else 0.
range = 0.5 * domain of variable (search interval defined by FieldDR).
delta = sum(0 to m-1)pi*2^-i, pi = 1 wiht probability 1/m, else 0, m = 20.
Diff = (parent2 - parent1)/absolute(parent1 - parent2).

The recombiantion operator recmut generates offspring in a direction defined by the parents (line recombination). It tests more often outside the area defined by the parents and in the direction of parent1. The point for the offspring is defined by features of the mutation operator. The probability of small step sizes is greater than that of bigger steps (see mutbga).

Value

a matrix containing the chromosomes of the population after mating, ready to be mutated and/or evaluated, in the same format as OldChrom.

Note

This function doesn't work with high level recombination function recombin

Author(s)

The original matlab implementation of crtrp was written by Hartmut Pohlheim. The R implementation was written by David Zhao.

See Also

mutate, mutbga, reclin

Examples

1
2
3
4
5
6
## Initial a real-valued population
FieldDR = matrix(c(-100,-50,-30,-20,100,50,30,20),2,4,byrow=TRUE) 
Chrom = crtrp(6,FieldDR)

## Perform line recombination with mutation
NewChrom = recmut(Chrom,FieldDR)

drizztxx/gatbxr documentation built on Dec. 27, 2021, 2:26 a.m.