Genetic algorithm in python using pygame module