rewrite mutation according to master

rand() function in GeneticAlgorithm::mutation()