ilmdhc | R Documentation |
ILM/DHC is an adaptive function with an increasing low mutation rate (ILM) and a decreasing high crossover rate (DHC) as the generation progresses (Hassanat et.al., 2019).
ilmdhc(g, gmax, ...)
g |
Current generation |
gmax |
Maximum generation |
... |
Further arguments passed to or from other methods. |
pc |
Crossover rate |
pm |
Mutation rate |
Zeynel Cebeci & Erkut Tekeli
Hassanat, A., Almohammadi, K., Alkafaween, E., Abunawas, E., Hammouri, A. and Prasath, V.B. (2019). Choosing mutation and crossover ratios for genetic algorithm: A review with a new dynamic approach. Information, 10(12), 390.
fixpcmut
,
adana1
,
adana2
,
leitingzhi
,
adana3
N = 50 gmax = 1000 g = c(1, 10, 50, 100, 250, 500, 750, gmax) pc = ilmdhc(g=g, gmax=gmax)$pc pc nc = round(pc*N) nc pm = ilmdhc(g=g, gmax=gmax)$pm pm nm = round(pm*N) nm nm = ifelse (!nm, 1, nm) nm plot(pm, type="l", col=4, lwd=2, lty=1, xaxt="n", ylab="Ratio", xlab="Generation") lines(pc, type="l", col=2, lwd=2, lty=2) legend("top", inset=.02, c("pm","pc"), col=c(4,2), lty=c(1,2), horiz=TRUE, cex=0.8) axis(1, at=1:length(g),labels=g, col.axis="red", las=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.