Genetic algorithm in c#