Basic genetic algorithm engine