The theory behind genetic algorithms
The building-block hypothesis underlying genetic algorithms is that the optimal solution to the problem at hand is assembled of small building blocks, and as we bring more of these building blocks together, we get closer to this optimal solution.
Individuals in the population who contain some of the desired building blocks are identified by their superior scores. The repeated operations of selection and crossover result in better individuals conveying these building blocks to the next generations, while possibly combining them with other successful building blocks. This creates genetic pressure, thus guiding the population toward having more and more individuals with the building blocks that form the optimal solution.
As a result, each generation is better than the previous one and contains more individuals that are closer to the optimal solution.
For example, consider a population of four-digit binary strings where our goal is to find...