
220 Chapter 8 GenetiC alGorithms
Depending on the nature of the problem, one can adopt other ways of
encoding individuals, such as numbers and alphabets.
8.5.1 Mutation
Mutating a bit involves flipping it, changing a gene with another one with
the help of a small mutation probability P
mutation
. A number between 0 and
1 is chosen at random. If the random number is smaller than P
mutation
, the
outcome of flipping is true; otherwise, the outcome is false. If, at any bit, the
outcome is true, the bit is altered; otherwise, the bit is kept unchanged. For
binary encoding, a mutation means to flip one or more randomly chosen
bits from 1 to 0 or