genetic algorithm integration with example