Real coded genetic algorithm in Python