Genetic algorithm implemented, but still has some bugs.