Once a genetic representation and fitness function are defined , a genetic algorithm will instantiate initial candidates as described previously , and then improve through repetitive application of mutation , crossover , inversion and selection operators ( as defined according to the problem domain ) . Once we have the genetic representation and the fitness function defined , GA proceeds to initialize a population of solutions randomly , then improve it through repetitive application of mutation , crossover , inversion and selection operators .