science University of Peshawar Introduction to Genetic Algorithms (II)
Advanced Algorithms AdvAlgo-Spr08
Genetic Algorithms: Example
Mechanics of GA are surprisingly simple, not more complex than copying strings and swapping partial strings. Good results are obtained for many practical problems consisting of following three operators: Reproduction Crossover Mutation AdvAlgo-Spr08
Genetic Algorithms: Example
Reproduction (copying) Strings copied according to their objective function values f (biologists call it the fitness function). Fitness is some measure of profit, utility or goodness to be maximized. Fittest strings have a higher probability of contributing one or more offspring in the next generation. In natural systems fitness determined by creatures ability to survive predators, other obstacles to adulthood and subsequent reproduction. In our artificial environment objective function is the final arbiter of the string-creatures life or death. AdvAlgo-Spr08
Genetic Algorithms: Example
Crossover This proceeds in two steps: 1. Members of the copied strings are combined at random. 2. Each pair of strings undergoes crossover (as follows): An integer position is selected uniformly at random |1, l 1| where l is string length. Two new strings are created by swapping all characters between positions k + 1 and l inclusively AdvAlgo-Spr08
Genetic Algorithms: Example
Mutation Although selective reproduction and crossover generate bulk of next generation, but these operations may miss-out potentially useful material i.e. 1s and 0s at particular locations. In GA mutation is the random (with small probability) alteration of the value of a string position.
Soumen Paul Department of Computer Science and Informatics Haldia Institute of Technology ICARE Complex, HIT Campus, P.O - HIT, PIN 721657 Haldia, West Bengal