If no crossover is performed, the offspring is an exact copy of one of the parents. If no mutation occurred, the offspring is the direct result of crossover, or a copy of one of the parents 3.4. Use new generated population for a further run of algorithm 5. If the end condition is satisfied, stop, and return the best solution in current population 6. Format of chromosome is called encoding.
Binary encoding is the most common and simplest one.
In permutation encoding, every chromosome is a string of numbers, which represents number in a sequence. Use of binary encoding for this type of problems would be very difficult. In value encoding, every chromosome is a string of some values. Values can be anything connected to problem, form numbers, real numbers or chars to some complicated objects. In tree encoding every chromosome is a tree of some objects, such as functions or commands in programming language.