This is one of the two new invented GA operators. Swap chooses r chromosomes
for alternation the same way mutation chooses some chromosome for alternation.
Then in each chromosome randomly s pairs of genes are selected. The
values r and s are determined by the user.
The operation is to swap the values of these paired genes. Formally a
chromosome which is chosen for mutation and produce the off-spring
is defined as
where
Similar to mutation replaces
in the population.
For example assume that 8th and 12th genes are selected randomly:
3mmBefore swap:
After swap: