Implemented the basic genetic algorithm scheme