xovmp: Crossover operators for binary representation

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

View source: R/xovmp.R

Description

Taking a matrix OldChrom containing the binary representation of the individuals in the current population, applying crossover to consecutive pairs of individuals with defined probability and returns the resulting population.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
xovmp(OldChrom, Px = 0.7, Npt = 0, Rs = FALSE)

xovsp(OldChrom, Px = 0.7)

xovdp(OldChrom, Px = 0.7)

xovsh(OldChrom, Px = 0.7)

xovsprs(OldChrom, Px = 0.7)

xovdprs(OldChrom, Px = 0.7)

xovshrs(OldChrom, Px = 0.7)

Arguments

OldChrom

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

Px

a number indicating the probability of recombination ocurring between pairs of individuals. If omitted, 0.7 is set.

Npt

an optinal number indicating the number of crossover points to use. Specifically, 1 indicates single point recombination; 2 indicates double point recombination; and 0 indicates shuffle point recombination. Default is set to 0.

Rs

an optional logical value indicating whether or not to force the production of offspring different from their parents. Default is set to FALSE.

Details

xovmp is the general crossover function for binary representation and can be called by all other crossover functions. When xovmp called by recombin, high-level crossover function, its arguments can also be passed on to. With different combination of argumetents, it can be used identically to xovsp, xovdp, xovsh, xovsprs, xovdprs and xovshrs. Althogh these replicatical use, other form of crossover funcions are maintained for completence reason.

xovsp performs single-point crossover between pairs of individuals. When called by recombin, recombin("xovsp",Chrom) is identical to recombin("xovmp",Chrom,Npt=1).

xovdp performs double-point crossover between pairs of individuals. When called by recombin, recombin("xovdp",Chrom) is identical to recombin("xovmp",Chrom,Npt=2).

xovsh performs shuffle-point crossover between pairs of individuals. When called by recombin, recombin("xovsh",Chrom) is identical to recombin("xovmp",Chrom).

xovsprs performs single-point reduced surrogate crossover between pairs of individuals. When called by recombin, recombin("xovsprs",Chrom) is identical to recombin("xovmp",Chrom,Npt=1,Rs=TRUE).

xovdprs performs double-point reduced surrogate crossover between pairs of individuals. When called by recombin, recombin("xovdprs",Chrom) is identical to recombin("xovmp",Chrom,Npt=2,Rs=TRUE).

xovshrs performs shuffle-point reduced surrogate crossover between pairs of individuals. When called by recombin, recombin("xovshrs",Chrom) is identical to recombin("xovmp",Chrom,Rs=TRUE).

Value

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

Author(s)

The original matlab implementation was written by Carlos Fonseca and updated by Andrew Chipperfield. The R implementation was written by David Zhao.

See Also

recombin

Examples

1
2
3
Chrom = crtbp(40,10)$Chrom

Selch = xovmp(OldChrom=Chrom)

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