mx {adana}R Documentation

Mask crossover

Description

This crossover function copies parent1 and parent2 to offspring1 and offspring2, respectively. A vector of length m is then randomly generated for each parent, containing the values 0 and 1. Elements in this vector are then compared for each gene location. If the element at the ith position of the first vector is equal to that of the second vector, no change is made. However, if the first is 0 and the second is 1, the ith gene of Parent2 is copied as the ith gene of Offspring1. If the ith elements of the vectors are 1 and 0, the i th gene of Parent1 is copied as the i th gene of Offspring2 (Louis & Rawlins, 1991).

Usage

mx(x1, x2, cxon, ...)

Arguments

x1

A vector. It contains the chromosomal information of parent-1.

x2

A vector. It contains the chromosomal information of parent-2.

cxon

Number of offspring to be generated as a result of crossover

...

Further arguments passed to or from other methods.

Value

A matrix containing the generated offsprings.

Author(s)

Zeynel Cebeci & Erkut Tekeli

References

Louis S.J. and Rawlins G.J. (1991). Designer Genetic Algorithms: Genetic Algorithms in Structure Design. In 4th Int. Conf. on Genetic Algorithms. (pp. 53-60)

See Also

cross, px1, kpx, sc, rsc, hux, ux, ux2, rrc, disc, atc, cpc, eclc, raoc, dc, ax, hc, sax, wax, lax, bx, ebx, blxa, blxab, lapx, elx, geomx, spherex, pmx, mpmx, upmx, ox, ox2, mpx, erx, pbx, pbx2, cx, icx, smc

Examples

parent1 = c(1, 0, 1, 0, 1, 1, 1, 0)
parent2 = c(1, 1, 1, 0, 1, 0, 0, 1)
mx(parent1, parent2, cxon=3)

[Package adana version 1.1.0 Index]