Genetic algorithm that solves the eight queens problem in C++