xegaGaUCross2Gene {xegaGaGene}R Documentation

Uniform crossover of 2 genes.

Description

xegaGaUCross2Gene swaps alleles of both genes with a probability of 0.5. It generates a random mask which is used to build the new genes. It returns 2 genes.

Usage

xegaGaUCross2Gene(gg1, gg2, lF)

Arguments

gg1

A binary gene.

gg2

A binary gene.

lF

The local configuration of the genetic algorithm.

Value

A list of 2 binary genes.

References

Syswerda, Gilbert (1989): Uniform Crossover in Genetic Algorithms. In: Schaffer, J. David (Ed.) Proceedings of the Third International Conference on Genetic Algorithms, Morgan Kaufmann Publishers, Los Altos, California, pp. 2-9. (ISBN:1-55860-066-3)

See Also

Other Crossover (2): xegaGaCross2Gene(), xegaGaUPCross2Gene()

Examples

gene1<-xegaGaInitGene(lFxegaGaGene)
gene2<-xegaGaInitGene(lFxegaGaGene)
xegaGaDecodeGene(gene1, lFxegaGaGene)
xegaGaDecodeGene(gene2, lFxegaGaGene)
newgenes<-xegaGaUCross2Gene(gene1, gene2, lFxegaGaGene)
xegaGaDecodeGene(newgenes[[1]], lFxegaGaGene)
xegaGaDecodeGene(newgenes[[2]], lFxegaGaGene)

[Package xegaGaGene version 1.0.0.1 Index]