how to solve one max problem using genetic algorithm