mutbga: Mutation of real-valued population

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

View source: R/mutbga.R

Description

This function implements the mutation operator of the Breeder Genetic Algorithm.

Usage

1
mutbga(OldChrom, FieldDR, MutOpt)

Arguments

OldChrom

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

FieldDR

a matrix of 2 rows by number of variables describing the boundaries of each variable.

MutOpt

an optional vector containing mutation rate and shrink value:

  1. MutOpt[1] a number containing the mutation rate in the range [0, 1]. By default this value is assumed to 1/Nvar, where Nvar is the number of variables per individual defined by NCOL(FieldDR).

  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

mutbga takes a matrix OldChrom containing the real representation of the individuals in the current population, mutates the individuals with given probability and returns the resulting population.

The mutataion of a variable is computed as follows:
mutated variable = variable + MutMx * range * MutOpt[2] * delta, where MutMx = 1 or -1 with probability MutOpt[1], (+ or - with equal probability) 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.

With m = 20, the mutation operator is able to locate the optimum up to a precision of range * MutOpt[2] * 2^-19

mutbga is able to generate most points in the hypercube defined by the variable of the individual and the range of the mutation. However, it test more often near the variable, that is, the probability of small step size is greater than that of larger step sizes.

Value

a matrix containing the chromosomes of the population after mutation in the same format as OldChrom.

Author(s)

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

References

Muhlenbein, H., Schlierkamp-Voosen, D. (1993) Predictive Models for the Breeder Genetic Algorithm: I. Continuous Parameter Optimization. Evolutionary Computation.

See Also

mutate, recdis, recint, recmut, 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 mutation
NewChrom = mutbga(Chrom,FieldDR)

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