A genetic algorithm is a search heuristic (related to making guesses) algorithm that is inspired by Charles Darwin’s theory of natural evolution. We have explained the basic concepts of genetic algorithms including initial population, fitness function, selection, crossover and mutation.