Steady State Genetic Algorithm


This GA is steady state meaning that there are no generations. It differs from the generic GA in that tournament selection does not replace the selected individuals in the population, and instead of adding the children of the selected parents into the next generation, the two best individuals out of the two parents and two children are added back into the population so that the population size remains constant.

Pseudo code

P <- generate a population of individuals randomly
while stopping criterion has not been met:
	parent1 <- tournament_selection(P)
	parent2 <- tournament_selection(P)
	child1, child2 <- with probability cross_rate crossover parent1, parent2
	child1 <- mutate child1
	child2 <- mutate child2
	best1, best2 <- get the two highest fitness individuals out of parent1, parent2, child1, child2
	replace parent1 with best1
	replace parent2 with best2


Code for this algorithm can be found in ga_modules/classicSteady1.py in any of the tarballs available here.