Genetic fitting algorithm (Qt)