The way genetic algorithms work is not accidentally similar to the phenomenon of biological evolution, since it is biology where the creator of the algorithms John Henry Holland found his inspiration.

Genetic algorithm works on population of units:

 

where: n is the number of the population, whereas R stands for its size.

Genetic algorithms in their classic form do not in any way use the knowledge on the the problem solved. It is the fact that the better units from the previuos generation get to every next population, and that genetic operators exchange information included in the units,thus creating new, potantially better solutions, that the algorithms find the solutions. The process of creating of a new population is depicted below.