mutate {adana}R Documentation

Function of Mutation Application

Description

With mutation, the chromosomes of individuals are randomly changed and sent to the next generation.

Usage

mutate(mutfunc, population, mutpm, gatype, ...)

Arguments

mutfunc

The name of the mutation operator

population

A matrix. Population of offspring to be mutated

mutpm

Mutation Rate

gatype

Indicates the GA type. "gga" is assigned for generational refresh, and "ssga" for steady-state refresh.

...

Further arguments passed to or from other methods.

Value

A matrix. Population of the mutated offsprings

Author(s)

Zeynel Cebeci & Erkut Tekeli

References

Cebeci, Z. (2021). R ile Genetik Algoritmalar ve Optimizasyon Uygulamalari, 535 p. Ankara:Nobel Akademik Yayincilik.

See Also

bitmut, randmut, randmut2, randmut3, randmut4, unimut, boundmut, nunimut, nunimut2, powmut, powmut2, gaussmut, gaussmut2, gaussmut3, bsearchmut1, bsearchmut2, swapmut, invmut, shufmut, insmut, dismut, invswapmut, insswapmut, invdismut

Examples

offsprings=initbin(25,5)
offsprings[,"fitval"] = evaluate(maxone, offsprings[,1:(ncol(offsprings)-2)])
head(offsprings, 4)          # mutant individual may be further ahead.
mutatedpop = mutate(mutfunc=bitmut, population=offsprings, mutpm=0.1, gatype="gga")
mutatedpop[,"fitval"] = evaluate(maxone, mutatedpop[,1:(ncol(mutatedpop)-2)])
head(mutatedpop, 4)

[Package adana version 1.1.0 Index]