Implemented a toy genetic algorithm