basic binary genetic algorithm