There are two mutation parameters: the mutation probability and the mutation operator. Members of the next generation are chosen to undergo mutation with the mutation probability you specify. To set the mutation probability, you use a SetMutProb call:
call SetMutProb(
prob);
where prob is a real number between 0 and 1. This probability is usually fairly low (0.05 or less), since mutation tends to slow the convergence of the genetic algorithm. If you do not explicitly set the mutation probability with this call, a default value of 0 is used.
The GA procedure enables you to choose your mutation operator from several standard mutation operators appropriate for each type of encoding, or to code your own mutation operator as a subroutine. To specify one of the mutation operators provided by the GA procedure, use a SetMut call. See the section Mutation Operators for more detail on the available operators. To supply your own operator, use a SetMutRoutine call:
call SetMutRoutine(
'routine');
where routine is the name of your mutation subroutine. See the section Defining User Genetic Operators for a description of defining genetic operators with user subroutines. If the mutation probability is greater than 0, you must use a SetMut or SetMutRoutine call to set the mutation operator.
After initialization, you can reset any of the mutation parameters or their properties during the optimization process by calling one of the preceding routines from a user update routine. This makes it possible to adapt the mutation operators to create more or less diversity as needed in the optimization process.