This document describes how genetic algorithms work through an example. It shows three iterations of a genetic algorithm optimizing a function y=x1-x2, where x1 and x2 are integers between 0-7 and 0-3 respectively. In each iteration, the algorithm calculates the y value for different combinations of x1 and x2. The best solutions are used to generate the values for the next iteration, getting closer to the highest y value each time.
8. 20.2.2015 8
iterasyon #1
y = -1
y = 3
y = 3
y = 1
y = -1
y = 2
y = 2
y = -2
y = 2
y = -1
iterasyon #2
y = 3
y = 3
y = 4
y = 6
y = 6
y = 4
y = 2
y = 3
y = 4
y = 3
iterasyon #3
y = 6
y = 6
y = 3
y = 4
y = 4
y = 6
y = 3
y = 3
y = 6
y = 7